az policy assignment non-compliance-message
管理策略分配的不符合性消息。
命令
名称 | 说明 | 类型 | Status |
---|---|---|---|
az policy assignment non-compliance-message create |
将不符合性消息添加到策略分配。 |
Core | Deprecated |
az policy assignment non-compliance-message delete |
从策略分配中删除一个或多个不符合性消息。 |
Core | Deprecated |
az policy assignment non-compliance-message list |
列出策略分配的不符合性消息。 |
Core | GA |
az policy assignment non-compliance-message create
在资源命令的未来版本中,返回值将更改。 这将是单个创建的消息对象,而不是消息对象的完整数组。
将不符合性消息添加到策略分配。
az policy assignment non-compliance-message create --message
--name
[--policy-definition-reference-id]
[--resource-group]
[--scope]
示例
将不符合性消息添加到策略分配。
az policy assignment non-compliance-message create -g MyResourceGroup -n MyPolicyAssignment -m 'Resources must follow naming standards'
在分配的策略集定义中为特定策略添加不符合性消息。
az policy assignment non-compliance-message create -g MyResourceGroup -n MyPolicySetAssignment -m 'Resources must use allowed SKUs' --policy-definition-reference-id SkuPolicyRefId
必需参数
检查策略或评估详细信息拒绝资源时将显示的消息。
策略分配的名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
消息应用于的分配计划(策略集)内的策略定义引用 ID。
将应用策略的资源组。
此策略分配子命令适用的范围。 默认为当前上下文订阅。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az policy assignment non-compliance-message delete
在资源命令的未来版本中,返回值将更改。 它将为空,而不是剩余消息对象的完整数组。
从策略分配中删除一个或多个不符合性消息。
az policy assignment non-compliance-message delete --message
--name
[--policy-definition-reference-id]
[--resource-group]
[--scope]
示例
从包含特定消息且不包含策略定义引用 ID 的策略分配中删除不符合性消息。
az policy assignment non-compliance-message delete -g MyResourceGroup -n MyPolicyAssignment -m 'Resources must follow naming standards'
从包含特定消息和特定策略定义引用 ID 的策略分配中删除不符合性消息。
az policy assignment non-compliance-message delete -g MyResourceGroup -n MyPolicySetAssignment -m 'Resources must use allowed SKUs' --policy-definition-reference-id SkuPolicyRefId
必需参数
检查策略或评估详细信息拒绝资源时将显示的消息。
策略分配的名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
消息应用于的分配计划(策略集)内的策略定义引用 ID。
将应用策略的资源组。
此策略分配子命令适用的范围。 默认为当前上下文订阅。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az policy assignment non-compliance-message list
列出策略分配的不符合性消息。
az policy assignment non-compliance-message list --name
[--resource-group]
[--scope]
示例
列出策略分配的不符合性消息。
az policy assignment non-compliance-message list -g MyResourceGroup -n MyPolicyAssignment
必需参数
策略分配的名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
将应用策略的资源组。
此策略分配子命令适用的范围。 默认为当前上下文订阅。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |