Skip to main content

otdfctl policy subject-condition-sets update

update - Update a Subject Condition Set

Synopsis

otdfctl policy subject-condition-sets update [flags]

Description

Replace the existing conditional logic within an SCS with new conditional logic, passing either JSON directly or a JSON file.

For more information about subject condition sets, see the subject-condition-sets subcommand.

Example

This updates the boolean_operator of the subject condition set created in the create example. The following subject condition set would resolve to true if the field at .example.field.one is myvalue or myothervalue AND the field at .example.field.two is not equal to notpresentvalue.

otdfctl policy subject-condition-set update --id bfade235-509a-4a6f-886a-812005c01db5 --subject-sets '[
{
"condition_groups": [
{
"conditions": [
{
"operator": 1,
"subject_external_values": ["myvalue", "myothervalue"],
"subject_external_selector_value": ".example.field.one"
},
{
"operator": 2,
"subject_external_values": ["notpresentvalue"],
"subject_external_selector_value": ".example.field.two"
}
],
"boolean_operator": 1
}
]
}
]'

Options

-i, --id <id>
The ID of the subject condition set to update (required: true)
-s, --subject-sets <subject-sets>
A JSON array of subject sets, containing a list of condition groups, each with one or more conditions (required: false)
-j, --subject-sets-file-json <subject-sets-file-json>
A JSON file with path from the current working directory containing an array of subject sets (required: false)
-l, --label <label>
Optional metadata 'labels' in the format: key=value (required: false)
--force-replace-labels <force-replace-labels>
Destructively replace entire set of existing metadata 'labels' with any provided to this command (required: false)

Aliases

u