az aks safeguards
管理部署安全措施。
命令
| 名称 | 说明 | 类型 | Status |
|---|---|---|---|
| az aks safeguards create |
为托管群集启用部署安全措施。 |
核心 | GA |
| az aks safeguards delete |
禁用托管群集的部署安全措施。 |
核心 | GA |
| az aks safeguards list |
按父资源列出 DeploymentSafeguards。 |
核心 | GA |
| az aks safeguards show |
显示托管群集的部署保障配置。 |
核心 | GA |
| az aks safeguards update |
更新托管群集的部署保障配置。 |
核心 | GA |
| az aks safeguards wait |
将 CLI 置于等待状态,直到满足条件。 |
核心 | GA |
az aks safeguards create
为托管群集启用部署安全措施。
az aks safeguards create [--cluster --managed-cluster]
[--excluded-namespaces --excluded-ns]
[--level {Enforce, Warn}]
[--name]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--resource-group]
示例
使用托管群集资源 ID 在 Warn 级别创建 DeploymentSafeguards 资源
az aks safeguards create --resource /subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1 --level Warn
使用订阅、资源组和名称标记在警告级别创建 DeploymentSafeguards 资源
az aks safeguards create --subscription subid1 -g rg1 -n cluster1 --level Warn
使用忽略的命名空间在 Warn 级别创建 DeploymentSafeguards 资源
az aks safeguards create -g rg1 -n mc1 --excluded-ns ns1 ns2 --level Warn
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
托管群集的完全限定的 Azure 资源管理器标识符。
用户定义的要从 Deployment Safeguards 中排除的命名空间列表。 不会根据任何安全措施检查这些命名空间中的部署,支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
| 属性 | 值 |
|---|---|
| Parameter group: | Properties Arguments |
部署保护级别。 可能的值为 Warn 和 Enforce。
| 属性 | 值 |
|---|---|
| Parameter group: | Properties Arguments |
| 接受的值: | Enforce, Warn |
托管群集的名称。可以提供“managed_cluster”或“resource_group”和“名称”,但不能同时提供这两者。
不等待长时间运行的操作完成。
| 属性 | 值 |
|---|---|
| 接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。 可以提供“managed_cluster”或“resource_group”和“name”,但不能同时提供两者。
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
只显示错误,取消显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az aks safeguards delete
禁用托管群集的部署安全措施。
az aks safeguards delete [--cluster --managed-cluster]
[--name]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--resource-group]
[--yes]
示例
按托管群集 ID 删除 DeploymentSafeguard 资源
az aks safeguards delete -c subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1
使用 resourceGroup 和 clusterName 参数删除 DeploymentSafeguard 资源
az aks safeguards delete -g rg1 -n cluster1
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
托管群集的完全限定的 Azure 资源管理器标识符。
托管群集的名称。可以提供“managed_cluster”或“resource_group”和“名称”,但不能同时提供这两者。
不等待长时间运行的操作完成。
| 属性 | 值 |
|---|---|
| 接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。 可以提供“managed_cluster”或“resource_group”和“name”,但不能同时提供两者。
不要提示确认。
| 属性 | 值 |
|---|---|
| 默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
只显示错误,取消显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az aks safeguards list
按父资源列出 DeploymentSafeguards。
az aks safeguards list [--cluster --managed-cluster]
[--max-items]
[--name]
[--next-token]
[--resource-group]
示例
按父资源列出 DeploymentSafeguards
az aks safeguards list --managed-cluster subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1
按父资源列出 DeploymentSafeguards
az aks safeguards list -g rg1 -n cluster1
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
托管群集的完全限定的 Azure 资源管理器标识符。
命令输出中要返回的项总数。 如果可用的项总数大于指定的值,则会在命令的输出中提供令牌。 若要恢复分页,请在后续命令的 --next-token 参数中提供令牌值。
| 属性 | 值 |
|---|---|
| Parameter group: | Pagination Arguments |
托管群集的名称。可以提供“managed_cluster”或“resource_group”和“名称”,但不能同时提供这两者。
用于指定开始分页的位置的令牌。 这是先前截断的响应中的令牌值。
| 属性 | 值 |
|---|---|
| Parameter group: | Pagination Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。 可以提供“managed_cluster”或“resource_group”和“name”,但不能同时提供两者。
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
只显示错误,取消显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az aks safeguards show
显示托管群集的部署保障配置。
az aks safeguards show [--cluster --managed-cluster]
[--name]
[--resource-group]
示例
按托管群集 ID 获取 DeploymentSafeguard 资源
az aks safeguards show --managed-cluster subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1
获取包含 resourceGroup 和 clusterName 参数的 DeploymentSafeguard 资源
az aks safeguards show -g rg1 -n cluster1
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
托管群集的完全限定的 Azure 资源管理器标识符。
托管群集的名称。可以提供“managed_cluster”或“resource_group”和“名称”,但不能同时提供这两者。
资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。 可以提供“managed_cluster”或“resource_group”和“name”,但不能同时提供两者。
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
只显示错误,取消显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az aks safeguards update
更新托管群集的部署保障配置。
az aks safeguards update [--add]
[--cluster --managed-cluster]
[--excluded-namespaces --excluded-ns]
[--force-string {0, 1, f, false, n, no, t, true, y, yes}]
[--level {Enforce, Warn}]
[--name]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--remove]
[--resource-group]
[--set]
示例
按群集 ID 将 DeploymentSafeguards 资源更新为强制级别
az aks safeguards update -c /subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/mc1 --level Enforce
使用 resourceGroup 和名称参数更新 DeploymentSafeguards 资源以强制实施级别
az aks safeguards update --level Enforce -g rg1 -n mc1
通过添加 2 个新命名空间来更新 DeploymentSafeguards 资源以忽略
az aks safeguards update -g rg1 -n mc1 --excluded-ns ns1 ns2
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
通过指定路径和键值对将对象添加到对象列表。 示例:--add property.listProperty <key=value, string or JSON string>。
| 属性 | 值 |
|---|---|
| Parameter group: | Generic Update Arguments |
托管群集的完全限定的 Azure 资源管理器标识符。
用户定义的要从 Deployment Safeguards 中排除的命名空间列表。 不会根据任何安全措施检查这些命名空间中的部署,支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。
| 属性 | 值 |
|---|---|
| Parameter group: | Properties Arguments |
使用“set”或“add”时,保留字符串文本,而不是尝试转换为 JSON。
| 属性 | 值 |
|---|---|
| Parameter group: | Generic Update Arguments |
| 接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
部署保护级别。 可能的值为 Warn 和 Enforce。
| 属性 | 值 |
|---|---|
| Parameter group: | Properties Arguments |
| 接受的值: | Enforce, Warn |
托管群集的名称。可以提供“managed_cluster”或“resource_group”和“名称”,但不能同时提供这两者。
不等待长时间运行的操作完成。
| 属性 | 值 |
|---|---|
| 接受的值: | 0, 1, f, false, n, no, t, true, y, yes |
从列表中删除属性或元素。 示例: --remove property.list <indexToRemove> OR --remove propertyToRemove.
| 属性 | 值 |
|---|---|
| Parameter group: | Generic Update Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。 可以提供“managed_cluster”或“resource_group”和“name”,但不能同时提供两者。
通过指定要设置的属性路径和值来更新对象。 示例:--set property1.property2=<value>。
| 属性 | 值 |
|---|---|
| Parameter group: | Generic Update Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
只显示错误,取消显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az aks safeguards wait
将 CLI 置于等待状态,直到满足条件。
az aks safeguards wait --cluster --managed-cluster
[--created]
[--custom]
[--deleted]
[--exists]
[--interval]
[--name]
[--resource-group]
[--timeout]
[--updated]
必需参数
托管群集的完全限定的 Azure 资源管理器标识符。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
等待在“Succeeded”中使用“provisioningState”创建。
| 属性 | 值 |
|---|---|
| Parameter group: | Wait Condition Arguments |
| 默认值: | False |
等待条件满足自定义 JMESPath 查询。 例如 provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running']。
| 属性 | 值 |
|---|---|
| Parameter group: | Wait Condition Arguments |
等到删除为止。
| 属性 | 值 |
|---|---|
| Parameter group: | Wait Condition Arguments |
| 默认值: | False |
等待资源存在。
| 属性 | 值 |
|---|---|
| Parameter group: | Wait Condition Arguments |
| 默认值: | False |
轮询间隔(以秒为单位)。
| 属性 | 值 |
|---|---|
| Parameter group: | Wait Condition Arguments |
| 默认值: | 30 |
托管群集的名称。可以提供“managed_cluster”或“resource_group”和“名称”,但不能同时提供这两者。
资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。 可以提供“managed_cluster”或“resource_group”和“name”,但不能同时提供两者。
最大等待(以秒为单位)。
| 属性 | 值 |
|---|---|
| Parameter group: | Wait Condition Arguments |
| 默认值: | 3600 |
等到 provisioningState 更新为“Succeeded”。
| 属性 | 值 |
|---|---|
| Parameter group: | Wait Condition Arguments |
| 默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
只显示错误,取消显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |