Skip to content

Commit 0fa3ab2

Browse files
rsamigullinFumingZhang
authored andcommitted
Added guardrails profile to specs (Azure#20171)
* added guardrails profile to specs * linter fix * added x-ms-enum * added guardrails definitions for versions route * linter fix, added custom word * fix * typo fix * fix for example * added object type * added object type * removed data field * changed descriptions * *
1 parent 00ce174 commit 0fa3ab2

File tree

3 files changed

+119
-0
lines changed

3 files changed

+119
-0
lines changed

custom-words.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2724,3 +2724,4 @@ mediumrc
27242724
smallrc
27252725
Autotune
27262726
autogrid
2727+
guardrailsversions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"parameters": {
3+
"api-version": "2022-08-02-preview",
4+
"subscriptionId": "subid1",
5+
"resourceGroupName": "rg1",
6+
"resourceName": "clustername1"
7+
},
8+
"responses": {
9+
"200": {
10+
"body": {
11+
"version": "v1",
12+
"isPreview": true,
13+
"default": true
14+
}
15+
}
16+
}
17+
}

specification/containerservice/resource-manager/Microsoft.ContainerService/preview/2022-08-02-preview/managedClusters.json

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2894,6 +2894,48 @@
28942894
}
28952895
}
28962896
}
2897+
},
2898+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/guardrailsversions": {
2899+
"get": {
2900+
"tags": [
2901+
"guardrailsVersions"
2902+
],
2903+
"operationId": "GuardrailsVersions_List",
2904+
"summary": "List available guardrails versions.",
2905+
"parameters": [
2906+
{
2907+
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter"
2908+
},
2909+
{
2910+
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter"
2911+
},
2912+
{
2913+
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter"
2914+
},
2915+
{
2916+
"$ref": "#/parameters/ResourceNameParameter"
2917+
}
2918+
],
2919+
"responses": {
2920+
"200": {
2921+
"description": "OK",
2922+
"schema": {
2923+
"$ref": "#/definitions/ListGuardrailsVersionsResponse"
2924+
}
2925+
},
2926+
"default": {
2927+
"description": "Error details",
2928+
"schema": {
2929+
"$ref": "#/definitions/CloudError"
2930+
}
2931+
}
2932+
},
2933+
"x-ms-examples": {
2934+
"List Guardrails versions": {
2935+
"$ref": "./examples/GuardrailsVersions_List.json"
2936+
}
2937+
}
2938+
}
28972939
}
28982940
},
28992941
"definitions": {
@@ -7064,6 +7106,65 @@
70647106
"required": [
70657107
"enabled"
70667108
]
7109+
},
7110+
"GuardrailsProfile": {
7111+
"type": "object",
7112+
"properties": {
7113+
"systemExcludedNamespaces": {
7114+
"readOnly": true,
7115+
"type": "array",
7116+
"description": "List of namespaces specified by AKS to be excluded from Guardrails",
7117+
"items": {
7118+
"type": "string"
7119+
}
7120+
},
7121+
"version": {
7122+
"type": "string",
7123+
"description": "The version of constraints to use"
7124+
},
7125+
"level": {
7126+
"type": "string",
7127+
"enum": [
7128+
"Off",
7129+
"Warning",
7130+
"Enforcement"
7131+
],
7132+
"x-ms-enum": {
7133+
"name": "level",
7134+
"modelAsString": true
7135+
},
7136+
"description": "The guardrails level to be used. By default, Guardrails is enabled for all namespaces except those that AKS excludes via systemExcludedNamespaces"
7137+
},
7138+
"excludedNamespaces": {
7139+
"description": "List of namespaces excluded from guardrails checks",
7140+
"type": "array",
7141+
"items": {
7142+
"type": "string"
7143+
}
7144+
}
7145+
},
7146+
"required": [
7147+
"level",
7148+
"version"
7149+
],
7150+
"description": "The Guardrails profile."
7151+
},
7152+
"ListGuardrailsVersionsResponse": {
7153+
"type": "object",
7154+
"properties": {
7155+
"version": {
7156+
"readOnly": true,
7157+
"type": "string"
7158+
},
7159+
"isPreview": {
7160+
"type": "boolean",
7161+
"description": "Describes whether this version is in preview"
7162+
},
7163+
"default": {
7164+
"type": "boolean",
7165+
"description": "Describes whether this version is default"
7166+
}
7167+
}
70677168
}
70687169
},
70697170
"parameters": {

0 commit comments

Comments
 (0)