diff --git a/custom-words.txt b/custom-words.txt index a7612d9bf3b2..b52519ec1fe3 100644 --- a/custom-words.txt +++ b/custom-words.txt @@ -2719,4 +2719,5 @@ xlargerc largerc mediumrc smallrc -Autotune \ No newline at end of file +Autotune +guardrailsversions \ No newline at end of file diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/preview/2022-08-02-preview/examples/GuardrailsVersions_List.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/preview/2022-08-02-preview/examples/GuardrailsVersions_List.json new file mode 100644 index 000000000000..b3b7792c3ab7 --- /dev/null +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/preview/2022-08-02-preview/examples/GuardrailsVersions_List.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "api-version": "2022-08-02-preview", + "subscriptionId": "subid1", + "resourceGroupName": "rg1", + "resourceName": "clustername1" + }, + "responses": { + "200": { + "body": { + "version": "v1", + "isPreview": true, + "default": true + } + } + } +} diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/preview/2022-08-02-preview/managedClusters.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/preview/2022-08-02-preview/managedClusters.json index 2bf0a6b2a0f6..a744b54ae6d7 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/preview/2022-08-02-preview/managedClusters.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/preview/2022-08-02-preview/managedClusters.json @@ -2891,6 +2891,48 @@ } } } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/guardrailsversions": { + "get": { + "tags": [ + "guardrailsVersions" + ], + "operationId": "GuardrailsVersions_List", + "summary": "List available guardrails versions.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ResourceNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ListGuardrailsVersionsResponse" + } + }, + "default": { + "description": "Error details", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "List Guardrails versions": { + "$ref": "./examples/GuardrailsVersions_List.json" + } + } + } } }, "definitions": { @@ -6979,6 +7021,65 @@ "required": [ "enabled" ] + }, + "GuardrailsProfile": { + "type": "object", + "properties": { + "systemExcludedNamespaces": { + "readOnly": true, + "type": "array", + "description": "List of namespaces specified by AKS to be excluded from Guardrails", + "items": { + "type": "string" + } + }, + "version": { + "type": "string", + "description": "The version of constraints to use" + }, + "level": { + "type": "string", + "enum": [ + "Off", + "Warning", + "Enforcement" + ], + "x-ms-enum": { + "name": "level", + "modelAsString": true + }, + "description": "The guardrails level to be used. By default, Guardrails is enabled for all namespaces except those that AKS excludes via systemExcludedNamespaces" + }, + "excludedNamespaces": { + "description": "List of namespaces excluded from guardrails checks", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "level", + "version" + ], + "description": "The Guardrails profile." + }, + "ListGuardrailsVersionsResponse": { + "type": "object", + "properties": { + "version": { + "readOnly": true, + "type": "string" + }, + "isPreview": { + "type": "boolean", + "description": "Describes whether this version is in preview" + }, + "default": { + "type": "boolean", + "description": "Describes whether this version is default" + } + } } }, "parameters": {