Files
nomad/website/content/docs/commands/sentinel/apply.mdx
Aimee Ukasick 23fd87d9c9 Docs: Commands section move "General options" to page bottom (#26001)
* sectionless files plus acl section

* alloc section

* config, deployment sections

* job section

* licence, namespace

* node, node-pool

* operator

* plugin, quota, recommendation

* scaling, sentinel, server, service, system, var, volume

* Add "ENT" label to left nav for enterprise commands

* job tag break into separate folder and files; update options header
2025-06-12 14:31:38 -05:00

59 lines
1.6 KiB
Plaintext

---
layout: docs
page_title: 'nomad sentinel apply command reference'
description: >
The `nomad sentinel apply` command creates or updates a Sentinel policy in Nomad Enterprise.
---
# `nomad sentinel apply` command reference
The `sentinel apply` command is used to write a new, or update an existing,
Sentinel policy.
<EnterpriseAlert product="nomad"/>
## 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.
Additionally, you must specify the `-scope` option. Refer to the [`-scope` field
description](/nomad/docs/commands/sentinel/apply#scope) for more information.
Sentinel commands are only available when ACLs are enabled. This command
requires a management token.
## Options
- `-description` : Sets a human readable description for the policy
- `-scope` : Required. Sets the scope of the policy and when it
should be enforced. Specify one of the following:
- The `submit-job` scope for registering jobs
- The `submit-host-volume` scope for creating or updating dynamic host
volumes.
Refer to the [Sentinel guide](/nomad/docs/enterprise/sentinel) for scope details.
- `-level` : (default: advisory) Sets the enforcement level of the policy. Must
be one of advisory, soft-mandatory, hard-mandatory.
## Examples
Write a policy:
```shell-session
$ nomad sentinel write -scope "submit-job" -description "My test policy" foo test.sentinel
Successfully wrote "foo" Sentinel policy!
```
## General options
@include 'general_options_no_namespace.mdx'