Skip to content

Commit d53218f

Browse files
authored
Merge pull request #897 from ShantingLiu/safeguards-pss-docs
2 parents 9896841 + 67c1228 commit d53218f

File tree

9 files changed

+707
-0
lines changed

9 files changed

+707
-0
lines changed

Commands/aks/safeguards/_create.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,37 @@ Enable Deployment Safeguards for a Managed Cluster
44

55
## Versions
66

7+
### [2025-05-02-preview](/Resources/mgmt-plane/L3tyZXNvdXJjZXVyaX0vcHJvdmlkZXJzL21pY3Jvc29mdC5jb250YWluZXJzZXJ2aWNlL2RlcGxveW1lbnRzYWZlZ3VhcmRzL2RlZmF1bHQ=/2025-05-02-preview.xml) **Preview**
8+
9+
<!-- mgmt-plane /{resourceuri}/providers/microsoft.containerservice/deploymentsafeguards/default 2025-05-02-preview -->
10+
11+
#### examples
12+
13+
- Creates a DeploymentSafeguards resource at Warn level with a managed cluster resource id
14+
```bash
15+
aks safeguards create --resource /subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1 --level Warn
16+
```
17+
18+
- Creates a DeploymentSafeguards resource at Warn level using subscription, resourcegroup, and name tags
19+
```bash
20+
aks safeguards create --subscription subid1 -g rg1 -n cluster1 --level Warn
21+
```
22+
23+
- Create a DeploymentSafeguards resource at Warn level with ignored namespaces
24+
```bash
25+
aks safeguards create -g rg1 -n mc1 --excluded-ns ns1 ns2 --level Warn
26+
```
27+
28+
- Creates a DeploymentSafeguards resource at Warn level with Pod Security Standards level set to Baseline
29+
```bash
30+
aks safeguards create --managed-cluster /subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1 --level Warn --pss-level Baseline
31+
```
32+
33+
- Creates a DeploymentSafeguards resource with PSS level set to Restricted using -g/-n pattern
34+
```bash
35+
aks safeguards create -g rg1 -n cluster1 --level Enforce --pss-level Restricted
36+
```
37+
738
### [2025-04-01](/Resources/mgmt-plane/L3tyZXNvdXJjZXVyaX0vcHJvdmlkZXJzL21pY3Jvc29mdC5jb250YWluZXJzZXJ2aWNlL2RlcGxveW1lbnRzYWZlZ3VhcmRzL2RlZmF1bHQ=/2025-04-01.xml) **Stable**
839

940
<!-- mgmt-plane /{resourceuri}/providers/microsoft.containerservice/deploymentsafeguards/default 2025-04-01 -->

Commands/aks/safeguards/_delete.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,22 @@ Disable Deployment Safeguards for a Managed Cluster
44

55
## Versions
66

7+
### [2025-05-02-preview](/Resources/mgmt-plane/L3tyZXNvdXJjZXVyaX0vcHJvdmlkZXJzL21pY3Jvc29mdC5jb250YWluZXJzZXJ2aWNlL2RlcGxveW1lbnRzYWZlZ3VhcmRzL2RlZmF1bHQ=/2025-05-02-preview.xml) **Preview**
8+
9+
<!-- mgmt-plane /{resourceuri}/providers/microsoft.containerservice/deploymentsafeguards/default 2025-05-02-preview -->
10+
11+
#### examples
12+
13+
- Deletes a DeploymentSafeguard resource by managed cluster id
14+
```bash
15+
aks safeguards delete -c subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1
16+
```
17+
18+
- Deletes a DeploymentSafeguard resource with resourceGroup and clusterName arguments
19+
```bash
20+
aks safeguards delete -g rg1 -n cluster1
21+
```
22+
723
### [2025-04-01](/Resources/mgmt-plane/L3tyZXNvdXJjZXVyaX0vcHJvdmlkZXJzL21pY3Jvc29mdC5jb250YWluZXJzZXJ2aWNlL2RlcGxveW1lbnRzYWZlZ3VhcmRzL2RlZmF1bHQ=/2025-04-01.xml) **Stable**
824

925
<!-- mgmt-plane /{resourceuri}/providers/microsoft.containerservice/deploymentsafeguards/default 2025-04-01 -->

Commands/aks/safeguards/_list.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,22 @@ List DeploymentSafeguards by parent resource
44

55
## Versions
66

7+
### [2025-05-02-preview](/Resources/mgmt-plane/L3tyZXNvdXJjZXVyaX0vcHJvdmlkZXJzL21pY3Jvc29mdC5jb250YWluZXJzZXJ2aWNlL2RlcGxveW1lbnRzYWZlZ3VhcmRz/2025-05-02-preview.xml) **Preview**
8+
9+
<!-- mgmt-plane /{resourceuri}/providers/microsoft.containerservice/deploymentsafeguards 2025-05-02-preview -->
10+
11+
#### examples
12+
13+
- List DeploymentSafeguards by parent resource
14+
```bash
15+
aks safeguards list --managed-cluster subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1
16+
```
17+
18+
- List DeploymentSafeguards by parent resource
19+
```bash
20+
aks safeguards list -g rg1 -n cluster1
21+
```
22+
723
### [2025-04-01](/Resources/mgmt-plane/L3tyZXNvdXJjZXVyaX0vcHJvdmlkZXJzL21pY3Jvc29mdC5jb250YWluZXJzZXJ2aWNlL2RlcGxveW1lbnRzYWZlZ3VhcmRz/2025-04-01.xml) **Stable**
824

925
<!-- mgmt-plane /{resourceuri}/providers/microsoft.containerservice/deploymentsafeguards 2025-04-01 -->

Commands/aks/safeguards/_show.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,22 @@ Show Deployment Safeguards Configuration for a Managed Cluster
44

55
## Versions
66

7+
### [2025-05-02-preview](/Resources/mgmt-plane/L3tyZXNvdXJjZXVyaX0vcHJvdmlkZXJzL21pY3Jvc29mdC5jb250YWluZXJzZXJ2aWNlL2RlcGxveW1lbnRzYWZlZ3VhcmRzL2RlZmF1bHQ=/2025-05-02-preview.xml) **Preview**
8+
9+
<!-- mgmt-plane /{resourceuri}/providers/microsoft.containerservice/deploymentsafeguards/default 2025-05-02-preview -->
10+
11+
#### examples
12+
13+
- Gets a DeploymentSafeguard resource by managed cluster id
14+
```bash
15+
aks safeguards show --managed-cluster subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1
16+
```
17+
18+
- Gets a DeploymentSafeguard resource with resourceGroup and clusterName arguments
19+
```bash
20+
aks safeguards show -g rg1 -n cluster1
21+
```
22+
723
### [2025-04-01](/Resources/mgmt-plane/L3tyZXNvdXJjZXVyaX0vcHJvdmlkZXJzL21pY3Jvc29mdC5jb250YWluZXJzZXJ2aWNlL2RlcGxveW1lbnRzYWZlZ3VhcmRzL2RlZmF1bHQ=/2025-04-01.xml) **Stable**
824

925
<!-- mgmt-plane /{resourceuri}/providers/microsoft.containerservice/deploymentsafeguards/default 2025-04-01 -->

Commands/aks/safeguards/_update.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,42 @@ Update Deployment Safeguards configuration for a Managed Cluster
44

55
## Versions
66

7+
### [2025-05-02-preview](/Resources/mgmt-plane/L3tyZXNvdXJjZXVyaX0vcHJvdmlkZXJzL21pY3Jvc29mdC5jb250YWluZXJzZXJ2aWNlL2RlcGxveW1lbnRzYWZlZ3VhcmRzL2RlZmF1bHQ=/2025-05-02-preview.xml) **Preview**
8+
9+
<!-- mgmt-plane /{resourceuri}/providers/microsoft.containerservice/deploymentsafeguards/default 2025-05-02-preview -->
10+
11+
#### examples
12+
13+
- Update a DeploymentSafeguards resource by cluster id to Enforce level
14+
```bash
15+
aks safeguards update -c /subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/mc1 --level Enforce
16+
```
17+
18+
- Update a DeploymentSafeguards resource to Enforce level using resourceGroup and name arguments
19+
```bash
20+
aks safeguards update --level Enforce -g rg1 -n mc1
21+
```
22+
23+
- Update a DeploymentSafeguards resource by adding 2 new namespaces to ignore
24+
```bash
25+
aks safeguards update -g rg1 -n mc1 --excluded-ns ns1 ns2
26+
```
27+
28+
- Update Pod Security Standards level to Restricted
29+
```bash
30+
aks safeguards update --managed-cluster /subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1 --pss-level Restricted
31+
```
32+
33+
- Update PSS level to Baseline using -g/-n pattern
34+
```bash
35+
aks safeguards update -g rg1 -n cluster1 --pss-level Baseline
36+
```
37+
38+
- Update both safeguards level and PSS level
39+
```bash
40+
aks safeguards update -g rg1 -n cluster1 --level Enforce --pss-level Restricted
41+
```
42+
743
### [2025-04-01](/Resources/mgmt-plane/L3tyZXNvdXJjZXVyaX0vcHJvdmlkZXJzL21pY3Jvc29mdC5jb250YWluZXJzZXJ2aWNlL2RlcGxveW1lbnRzYWZlZ3VhcmRzL2RlZmF1bHQ=/2025-04-01.xml) **Stable**
844

945
<!-- mgmt-plane /{resourceuri}/providers/microsoft.containerservice/deploymentsafeguards/default 2025-04-01 -->
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"plane": "mgmt-plane", "resources": [{"id": "/{resourceuri}/providers/microsoft.containerservice/deploymentsafeguards", "version": "2025-05-02-preview", "swagger": "mgmt-plane/containerservice/ResourceProviders/Microsoft.ContainerService/Paths/L3tyZXNvdXJjZVVyaX0vcHJvdmlkZXJzL01pY3Jvc29mdC5Db250YWluZXJTZXJ2aWNlL2RlcGxveW1lbnRTYWZlZ3VhcmRz/V/MjAyNS0wNS0wMi1wcmV2aWV3"}], "commandGroups": [{"name": "aks safeguards", "commands": [{"name": "list", "version": "2025-05-02-preview", "resources": [{"id": "/{resourceuri}/providers/microsoft.containerservice/deploymentsafeguards", "version": "2025-05-02-preview", "swagger": "mgmt-plane/containerservice/ResourceProviders/Microsoft.ContainerService/Paths/L3tyZXNvdXJjZVVyaX0vcHJvdmlkZXJzL01pY3Jvc29mdC5Db250YWluZXJTZXJ2aWNlL2RlcGxveW1lbnRTYWZlZ3VhcmRz/V/MjAyNS0wNS0wMi1wcmV2aWV3"}], "argGroups": [{"name": "", "args": [{"type": "string", "var": "$Path.resourceUri", "options": ["c", "cluster", "managed-cluster"], "required": true, "group": "", "help": {"short": "The fully qualified Azure Resource manager identifier of the Managed Cluster."}}]}], "operations": [{"operationId": "DeploymentSafeguards_List", "http": {"path": "/{resourceUri}/providers/Microsoft.ContainerService/deploymentSafeguards", "request": {"method": "get", "path": {"params": [{"type": "string", "name": "resourceUri", "arg": "$Path.resourceUri", "required": true, "skipUrlEncoding": true}]}, "query": {"consts": [{"readOnly": true, "const": true, "default": {"value": "2025-05-02-preview"}, "type": "string", "name": "api-version", "required": true, "format": {"minLength": 1}}]}}, "responses": [{"statusCode": [200], "body": {"json": {"var": "$Instance", "schema": {"type": "object", "props": [{"type": "string", "name": "nextLink"}, {"type": "array<object>", "name": "value", "required": true, "item": {"type": "object", "props": [{"readOnly": true, "type": "string", "name": "eTag"}, {"readOnly": true, "type": "ResourceId", "name": "id", "format": {"template": "/{resourceUri}/providers/Microsoft.ContainerService/deploymentSafeguards/default"}}, {"readOnly": true, "type": "string", "name": "name"}, {"type": "object", "name": "properties", "props": [{"type": "array<string>", "name": "excludedNamespaces", "item": {"type": "string"}}, {"type": "string", "name": "level", "required": true, "enum": {"items": [{"value": "Enforce"}, {"value": "Warn"}]}}, {"type": "string", "name": "podSecurityStandardsLevel", "enum": {"items": [{"value": "Baseline"}, {"value": "Privileged"}, {"value": "Restricted"}]}}, {"readOnly": true, "type": "string", "name": "provisioningState", "enum": {"items": [{"value": "Canceled"}, {"value": "Creating"}, {"value": "Deleting"}, {"value": "Failed"}, {"value": "Succeeded"}, {"value": "Updating"}]}}, {"readOnly": true, "type": "array<string>", "name": "systemExcludedNamespaces", "item": {"type": "string"}}], "clientFlatten": true}, {"readOnly": true, "type": "object", "name": "systemData", "props": [{"type": "dateTime", "name": "createdAt", "format": {"protocol": "iso"}}, {"type": "string", "name": "createdBy"}, {"type": "string", "name": "createdByType", "enum": {"items": [{"value": "Application"}, {"value": "Key"}, {"value": "ManagedIdentity"}, {"value": "User"}]}}, {"type": "dateTime", "name": "lastModifiedAt", "format": {"protocol": "iso"}}, {"type": "string", "name": "lastModifiedBy"}, {"type": "string", "name": "lastModifiedByType", "enum": {"items": [{"value": "Application"}, {"value": "Key"}, {"value": "ManagedIdentity"}, {"value": "User"}]}}]}, {"readOnly": true, "type": "string", "name": "type"}]}}]}}}}, {"isError": true, "body": {"json": {"schema": {"type": "@MgmtErrorFormat"}}}}]}}], "outputs": [{"type": "array", "ref": "$Instance.value", "clientFlatten": true, "nextLink": "$Instance.nextLink"}]}]}]}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
<?xml version='1.0' encoding='utf-8'?>
2+
<CodeGen plane="mgmt-plane">
3+
<resource id="/{resourceuri}/providers/microsoft.containerservice/deploymentsafeguards" version="2025-05-02-preview" swagger="mgmt-plane/containerservice/ResourceProviders/Microsoft.ContainerService/Paths/L3tyZXNvdXJjZVVyaX0vcHJvdmlkZXJzL01pY3Jvc29mdC5Db250YWluZXJTZXJ2aWNlL2RlcGxveW1lbnRTYWZlZ3VhcmRz/V/MjAyNS0wNS0wMi1wcmV2aWV3"/>
4+
<commandGroup name="aks safeguards">
5+
<command name="list" version="2025-05-02-preview">
6+
<resource id="/{resourceuri}/providers/microsoft.containerservice/deploymentsafeguards" version="2025-05-02-preview" swagger="mgmt-plane/containerservice/ResourceProviders/Microsoft.ContainerService/Paths/L3tyZXNvdXJjZVVyaX0vcHJvdmlkZXJzL01pY3Jvc29mdC5Db250YWluZXJTZXJ2aWNlL2RlcGxveW1lbnRTYWZlZ3VhcmRz/V/MjAyNS0wNS0wMi1wcmV2aWV3"/>
7+
<argGroup name="">
8+
<arg type="string" var="$Path.resourceUri" options="managed-cluster cluster c" required="True" group="">
9+
<help short="The fully qualified Azure Resource manager identifier of the Managed Cluster."/>
10+
</arg>
11+
</argGroup>
12+
<operation operationId="DeploymentSafeguards_List">
13+
<http path="/{resourceUri}/providers/Microsoft.ContainerService/deploymentSafeguards">
14+
<request method="get">
15+
<path>
16+
<param type="string" name="resourceUri" arg="$Path.resourceUri" required="True" skipUrlEncoding="True"/>
17+
</path>
18+
<query>
19+
<const readOnly="True" const="True" type="string" name="api-version" required="True">
20+
<default value="&quot;2025-05-02-preview&quot;"/>
21+
<format minLength="1"/>
22+
</const>
23+
</query>
24+
</request>
25+
<response statusCode="200">
26+
<body>
27+
<json var="$Instance">
28+
<schema type="object">
29+
<prop type="string" name="nextLink"/>
30+
<prop type="array<object>" name="value" required="True">
31+
<item type="object">
32+
<prop readOnly="True" type="string" name="eTag"/>
33+
<prop readOnly="True" type="ResourceId" name="id">
34+
<format template="/{resourceUri}/providers/Microsoft.ContainerService/deploymentSafeguards/default"/>
35+
</prop>
36+
<prop readOnly="True" type="string" name="name"/>
37+
<prop type="object" name="properties" clientFlatten="True">
38+
<prop type="array<string>" name="excludedNamespaces">
39+
<item type="string"/>
40+
</prop>
41+
<prop type="string" name="level" required="True">
42+
<enum>
43+
<item value="&quot;Enforce&quot;"/>
44+
<item value="&quot;Warn&quot;"/>
45+
</enum>
46+
</prop>
47+
<prop type="string" name="podSecurityStandardsLevel">
48+
<enum>
49+
<item value="&quot;Baseline&quot;"/>
50+
<item value="&quot;Privileged&quot;"/>
51+
<item value="&quot;Restricted&quot;"/>
52+
</enum>
53+
</prop>
54+
<prop readOnly="True" type="string" name="provisioningState">
55+
<enum>
56+
<item value="&quot;Canceled&quot;"/>
57+
<item value="&quot;Creating&quot;"/>
58+
<item value="&quot;Deleting&quot;"/>
59+
<item value="&quot;Failed&quot;"/>
60+
<item value="&quot;Succeeded&quot;"/>
61+
<item value="&quot;Updating&quot;"/>
62+
</enum>
63+
</prop>
64+
<prop readOnly="True" type="array<string>" name="systemExcludedNamespaces">
65+
<item type="string"/>
66+
</prop>
67+
</prop>
68+
<prop readOnly="True" type="object" name="systemData">
69+
<prop type="dateTime" name="createdAt">
70+
<format protocol="iso"/>
71+
</prop>
72+
<prop type="string" name="createdBy"/>
73+
<prop type="string" name="createdByType">
74+
<enum>
75+
<item value="&quot;Application&quot;"/>
76+
<item value="&quot;Key&quot;"/>
77+
<item value="&quot;ManagedIdentity&quot;"/>
78+
<item value="&quot;User&quot;"/>
79+
</enum>
80+
</prop>
81+
<prop type="dateTime" name="lastModifiedAt">
82+
<format protocol="iso"/>
83+
</prop>
84+
<prop type="string" name="lastModifiedBy"/>
85+
<prop type="string" name="lastModifiedByType">
86+
<enum>
87+
<item value="&quot;Application&quot;"/>
88+
<item value="&quot;Key&quot;"/>
89+
<item value="&quot;ManagedIdentity&quot;"/>
90+
<item value="&quot;User&quot;"/>
91+
</enum>
92+
</prop>
93+
</prop>
94+
<prop readOnly="True" type="string" name="type"/>
95+
</item>
96+
</prop>
97+
</schema>
98+
</json>
99+
</body>
100+
</response>
101+
<response isError="True">
102+
<body>
103+
<json>
104+
<schema type="@MgmtErrorFormat"/>
105+
</json>
106+
</body>
107+
</response>
108+
</http>
109+
</operation>
110+
<output type="array" ref="$Instance.value" clientFlatten="True" nextLink="$Instance.nextLink"/>
111+
</command>
112+
</commandGroup>
113+
</CodeGen>

Resources/mgmt-plane/L3tyZXNvdXJjZXVyaX0vcHJvdmlkZXJzL21pY3Jvc29mdC5jb250YWluZXJzZXJ2aWNlL2RlcGxveW1lbnRzYWZlZ3VhcmRzL2RlZmF1bHQ=/2025-05-02-preview.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)