az policy set-definition version
Manage Version.
Commands
| Name | Description | Type | Status |
|---|---|---|---|
| az policy set-definition version create |
Create a policy set definition version. |
Core | GA |
| az policy set-definition version delete |
Delete a policy set definition version. |
Core | GA |
| az policy set-definition version list |
Retrieve policy set definition versions. |
Core | GA |
| az policy set-definition version show |
Retrieves a policy set definition version. |
Core | GA |
| az policy set-definition version update |
Update a policy set definition version. |
Core | GA |
az policy set-definition version create
Create a policy set definition version.
Create a policy set definition version in the given subscription or management group with the given name and other properties.
az policy set-definition version create --name
--version
[--acquire-policy-token]
[--change-reference]
[--definition-groups]
[--definitions]
[--description]
[--display-name]
[--management-group]
[--metadata]
[--params]
Examples
Create a policy set definition with older version
az policy set-definition version create -n readOnlyStorage --definitions "[ { 'policyDefinitionId': '/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/{policyDefinitionName}' } ]" --version 1.1.0
Required Parameters
The name of the policy set definition.
The policy set definition version.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The metadata describing groups of policy definition references within the policy set definition. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
An array of policy definition references. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
The policy set definition description.
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
The display name of the policy set definition.
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
The management group.
The policy set definition metadata. Support shorthand-syntax(full value only), json-file and yaml-file.
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
The policy set definition parameter definitions. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |
az policy set-definition version delete
Delete a policy set definition version.
Delete the policy set definition version in the given subscription or management group with the given name and other properties.
az policy set-definition version delete --name
--version
[--acquire-policy-token]
[--change-reference]
[--management-group]
[--yes]
Examples
Delete a policy set definition version
az policy set-definition version delete --name CostManagement --version 1.2.1
Required Parameters
The name of the policy set definition.
The policy set definition version.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The management group.
Do not prompt for confirmation.
| Property | Value |
|---|---|
| Default value: | False |
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |
az policy set-definition version list
Retrieve policy set definition versions.
Retrieve the list of all policy set definition versions for a policy definition in the given subscription or management group.
az policy set-definition version list --name
[--expand]
[--management-group]
[--max-items]
[--next-token]
[--top]
Examples
List policy set definitions
az policy set-definition version list --name CostManagement
Required Parameters
The name of the policy set definition.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Comma-separated list of additional properties to be included in the response. Supported values are 'LatestDefinitionVersion, EffectiveDefinitionVersion'.
The management group.
Total number of items to return in the command's output. If the total number of items available is more than the value specified, a token is provided in the command's output. To resume pagination, provide the token value in --next-token argument of a subsequent command.
| Property | Value |
|---|---|
| Parameter group: | Pagination Arguments |
Token to specify where to start paginating. This is the token value from a previously truncated response.
| Property | Value |
|---|---|
| Parameter group: | Pagination Arguments |
Maximum number of records to return. When the $top filter is not provided, it will return 500 records.
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |
az policy set-definition version show
Retrieves a policy set definition version.
Retrieve and show the details of the policy set definition version in the given subscription or management group with the given name and version.
az policy set-definition version show --name
--version
[--expand]
[--management-group]
Examples
Retrieve a policy set definition version
az policy set-definition version show --name CostManagement --version 1.2.1
Required Parameters
The name of the policy set definition.
The policy set definition version.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Comma-separated list of additional properties to be included in the response. Supported values are 'LatestDefinitionVersion, EffectiveDefinitionVersion'.
The management group.
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |
az policy set-definition version update
Update a policy set definition version.
Update the policy set definition version in the given subscription or management group with the given name and version by applying the given properties.
az policy set-definition version update --name
--version
[--acquire-policy-token]
[--add]
[--change-reference]
[--definition-groups]
[--definitions]
[--description]
[--display-name]
[--force-string {0, 1, f, false, n, no, t, true, y, yes}]
[--management-group]
[--metadata]
[--params]
[--remove]
[--set]
Examples
Update a policy set definition version
az az policy set-definition version update -n readOnlyStorage --display-name "Updated display name goes here"
Required Parameters
The name of the policy set definition.
The policy set definition version.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.
| Property | Value |
|---|---|
| Parameter group: | Generic Update Arguments |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The metadata describing groups of policy definition references within the policy set definition. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
An array of policy definition references. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
The policy set definition description.
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
The display name of the policy set definition.
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.
| Property | Value |
|---|---|
| Parameter group: | Generic Update Arguments |
| Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
The management group.
The policy set definition metadata. Support shorthand-syntax(full value only), json-file and yaml-file.
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
The policy set definition parameter definitions. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
Remove a property or an element from a list. Example: --remove property.list <indexToRemove> OR --remove propertyToRemove.
| Property | Value |
|---|---|
| Parameter group: | Generic Update Arguments |
Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>.
| Property | Value |
|---|---|
| Parameter group: | Generic Update Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |