open-nomad/website/source/guides/sentinel/job.html.md
Alex Dadgar e5ec915ac3 sync
2017-09-19 10:08:23 -05:00

1.2 KiB

layout page_title sidebar_current description
guides Sentinel Job Object guides-sentinel-job Job objects can be introspected to apply fine grained Sentinel policies.

Sentinel Job Objects

The job object is made available to policies in the submit-job scope automatically, without an explicit import. The object maps to the JSON Specification of jobs, but fields differ slightly for better readability.

Sentinel convention for identifiers is lower case and seperated by underscores. All fields on the job are accessed by the same name, converted to lower case and seperating camal case to underscores. Here are some examples:

Job Field Sentinel Accessor
job.ID job.id
job.AllAtOnce job.all_at_once
job.ParentID job.parent_id
job.TaskGroups job.task_groups
job.TaskGroups[0].EphemeralDisk.SizeMB job.task_groups[0].ephemeral_disk.size_mb