From 0207d128404678e875b8d8c7e8684faea8adfcd7 Mon Sep 17 00:00:00 2001 From: Nick Keller Date: Sun, 24 Dec 2023 21:16:17 -0500 Subject: [PATCH] Replace "GuardrailsProfile" with "SafeguardsProfile", add ListSafeguardsVersions entities (#26798) * Update readme.md Reverting global tag to stable GA version for SDK release * Change guardrails to safeguards * clean up remaining references * fix casing * Add back guardrailsVersions * Fix typos --------- Co-authored-by: Jooneil Ahn --- .../examples/GetSafeguardsVersions.json | 21 +++ .../examples/ListSafeguardsVersions.json | 24 +++ .../2023-11-02-preview/managedClusters.json | 172 +++++++++++++++++- 3 files changed, 208 insertions(+), 9 deletions(-) create mode 100644 specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/GetSafeguardsVersions.json create mode 100644 specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ListSafeguardsVersions.json diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/GetSafeguardsVersions.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/GetSafeguardsVersions.json new file mode 100644 index 000000000000..bd878a9657be --- /dev/null +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/GetSafeguardsVersions.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2023-11-02-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "location": "location1", + "version": "v1.0.0" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/location1/safeguardsVersions/v1.0.0", + "type": "Microsoft.ContainerService/locations/safeguardsVersions", + "name": "v1.0.0", + "properties": { + "isDefaultVersion": true, + "support": "Preview" + } + } + } + } +} diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ListSafeguardsVersions.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ListSafeguardsVersions.json new file mode 100644 index 000000000000..a88fe41fd969 --- /dev/null +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ListSafeguardsVersions.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "api-version": "2023-11-02-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "location": "location1" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/location1/safeguardsVersions/v1.0.0", + "type": "Microsoft.ContainerService/locations/safeguardsVersions", + "name": "v1.0.0", + "properties": { + "isDefaultVersion": true, + "support": "Preview" + } + } + ] + } + } + } +} diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/managedClusters.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/managedClusters.json index 659d7923c409..b4c6493ceee3 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/managedClusters.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/managedClusters.json @@ -3465,6 +3465,92 @@ } } }, + "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/safeguardsVersions/{version}": { + "get": { + "tags": [ + "ManagedClusters" + ], + "operationId": "ManagedClusters_GetSafeguardsVersions", + "summary": "Gets supported Safeguards version in the specified subscription and location.", + "description": "Contains Safeguards version along with its support info and whether it is a default version.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/LocationParameter" + }, + { + "$ref": "#/parameters/VersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/SafeguardsAvailableVersion" + } + }, + "default": { + "description": "Error response describing why the operation failed", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "Get Safeguards available versions": { + "$ref": "./examples/GetSafeguardsVersions.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/safeguardsVersions": { + "get": { + "tags": [ + "ManagedClusters" + ], + "operationId": "ManagedClusters_ListSafeguardsVersions", + "summary": "Gets a list of supported Safeguards versions in the specified subscription and location.", + "description": "Contains list of Safeguards version along with its support info and whether it is a default version.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/LocationParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/SafeguardsAvailableVersionsList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List Safeguards Versions": { + "$ref": "./examples/ListSafeguardsVersions.json" + } + } + } + }, "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/meshRevisionProfiles": { "get": { "tags": [ @@ -5726,9 +5812,9 @@ "azureMonitorProfile": { "$ref": "#/definitions/ManagedClusterAzureMonitorProfile" }, - "guardrailsProfile": { - "$ref": "#/definitions/GuardrailsProfile", - "description": "The guardrails profile holds all the guardrails information for a given cluster" + "safeguardsProfile": { + "$ref": "#/definitions/SafeguardsProfile", + "description": "The Safeguards profile holds all the safeguards information for a given cluster" }, "serviceMeshProfile": { "$ref": "#/definitions/ServiceMeshProfile" @@ -7554,6 +7640,74 @@ } } }, + "SafeguardsAvailableVersionsProperties": { + "type": "object", + "description": "Whether the version is default or not and support info.", + "properties": { + "isDefaultVersion": { + "type": "boolean", + "readOnly": true + }, + "support": { + "type": "string", + "enum": [ + "Preview", + "Stable" + ], + "x-ms-enum": { + "name": "SafeguardsSupport", + "modelAsString": true, + "values": [ + { + "value": "Preview", + "description": "The version is preview. It is not recommended to use preview versions on critical production clusters. The preview version may not support all use-cases." + }, + { + "value": "Stable", + "description": "The version is stable and can be used on critical production clusters." + } + ] + }, + "description": "Whether the version is preview or stable.", + "readOnly": true + } + } + }, + "SafeguardsAvailableVersion": { + "type": "object", + "description": "Available Safeguards Version", + "allOf": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/Resource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/SafeguardsAvailableVersionsProperties" + } + }, + "required": [ + "properties" + ] + }, + "SafeguardsAvailableVersionsList": { + "type": "object", + "description": "Hold values properties, which is array of SafeguardsVersions", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/SafeguardsAvailableVersion" + }, + "description": "Array of AKS supported Safeguards versions." + }, + "nextLink": { + "type": "string", + "description": "The URL to get the next Safeguards available version.", + "readOnly": true + } + } + }, "EndpointDependency": { "description": "A domain name that AKS agent nodes are reaching at.", "type": "object", @@ -8562,13 +8716,13 @@ "enabled" ] }, - "GuardrailsProfile": { + "SafeguardsProfile": { "type": "object", "properties": { "systemExcludedNamespaces": { "readOnly": true, "type": "array", - "description": "List of namespaces specified by AKS to be excluded from Guardrails", + "description": "List of namespaces specified by AKS to be excluded from Safeguards", "items": { "type": "string" } @@ -8588,10 +8742,10 @@ "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" + "description": "The Safeguards level to be used. By default, Safeguards is enabled for all namespaces except those that AKS excludes via systemExcludedNamespaces" }, "excludedNamespaces": { - "description": "List of namespaces excluded from guardrails checks", + "description": "List of namespaces excluded from Safeguards checks", "type": "array", "items": { "type": "string" @@ -8601,7 +8755,7 @@ "required": [ "level" ], - "description": "The Guardrails profile." + "description": "The Safeguards profile." }, "ServiceMeshProfile": { "type": "object", @@ -9277,7 +9431,7 @@ "type": "string", "minLength": 1, "maxLength": 24, - "description": "Guardrails version", + "description": "Safeguards version", "x-ms-parameter-location": "method" } }