open-nomad/website/pages/docs/commands/sentinel/apply.mdx
Jeff Escalante 6c8f079d24
new website
2020-02-06 18:45:31 -05:00

50 lines
1.2 KiB
Plaintext

---
layout: docs
page_title: 'Commands: sentinel apply'
sidebar_title: apply
description: >
The sentinel apply command is used to write a new, or update an existing,
Sentinel policy.
---
# Command: sentinel apply
The `sentinel apply` command is used to write a new, or update an existing,
Sentinel policy.
~> Sentinel commands are new in Nomad 0.7 and are only available with Nomad
Enterprise.
## Usage
```plaintext
nomad sentinel apply [options] <Policy Name> <Policy File>
```
The `sentinel apply` command requires two arguments, the policy name and the
policy file. The policy file can be read from stdin by specifying "-" as the
file name.
## General Options
@include 'general_options.mdx'
## Apply Options
- `-description` : Sets a human readable description for the policy
- `-scope` : (default: submit-job) Sets the scope of the policy and when it
should be enforced.
- `-level` : (default: advisory) Sets the enforcement level of the policy. Must
be one of advisory, soft-mandatory, hard-mandatory.
## Examples
Write a policy:
```shell
$ nomad sentinel write -description "My test policy" foo test.sentinel
Successfully wrote "foo" Sentinel policy!
```