{ "swagger": "2.0", "info": { "title": "ContainerServiceDeploymentSafeguardsClient", "version": "2025-04-01", "description": "Azure Kubernetes Service Deployment Safeguards API Client.", "x-typespec-generated": [ { "emitter": "@azure-tools/typespec-autorest" } ] }, "schemes": [ "https" ], "host": "management.azure.com", "produces": [ "application/json" ], "consumes": [ "application/json" ], "security": [ { "azure_auth": [ "user_impersonation" ] } ], "securityDefinitions": { "azure_auth": { "type": "oauth2", "description": "Azure Active Directory OAuth2 Flow.", "flow": "implicit", "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", "scopes": { "user_impersonation": "impersonate your user account" } } }, "tags": [ { "name": "Operations" }, { "name": "DeploymentSafeguards" } ], "paths": { "/{resourceUri}/providers/Microsoft.ContainerService/deploymentSafeguards": { "get": { "operationId": "DeploymentSafeguards_List", "tags": [ "DeploymentSafeguards" ], "description": "List DeploymentSafeguards by parent resource", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/Azure.ResourceManager.ResourceUriParameter" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/DeploymentSafeguardListResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "List DeploymentSafeguards by parent resource": { "$ref": "./examples/DeploymentSafeguards_List.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/{resourceUri}/providers/Microsoft.ContainerService/deploymentSafeguards/default": { "get": { "operationId": "DeploymentSafeguards_Get", "tags": [ "DeploymentSafeguards" ], "description": "Fetch a deployment safeguard by name", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/Azure.ResourceManager.ResourceUriParameter" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/DeploymentSafeguard" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Gets a DeploymentSafeguard resource.": { "$ref": "./examples/DeploymentSafeguards_Get.json" } } }, "put": { "operationId": "DeploymentSafeguards_Create", "tags": [ "DeploymentSafeguards" ], "description": "Creates or updates a deploymentSafeguard", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/Azure.ResourceManager.ResourceUriParameter" }, { "name": "resource", "in": "body", "description": "Resource create parameters.", "required": true, "schema": { "$ref": "#/definitions/DeploymentSafeguard" } } ], "responses": { "200": { "description": "Resource 'DeploymentSafeguard' update operation succeeded", "schema": { "$ref": "#/definitions/DeploymentSafeguard" } }, "201": { "description": "Resource 'DeploymentSafeguard' create operation succeeded", "schema": { "$ref": "#/definitions/DeploymentSafeguard" }, "headers": { "Azure-AsyncOperation": { "type": "string", "description": "A link to the status monitor" }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." } } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Creates a DeploymentSafeguards resource with a long running operation.": { "$ref": "./examples/DeploymentSafeguards_Create.json" } }, "x-ms-long-running-operation-options": { "final-state-via": "azure-async-operation" }, "x-ms-long-running-operation": true }, "delete": { "operationId": "DeploymentSafeguards_Delete", "tags": [ "DeploymentSafeguards" ], "description": "Delete DeploymentSafeguards", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/Azure.ResourceManager.ResourceUriParameter" } ], "responses": { "202": { "description": "Resource deletion accepted.", "headers": { "Location": { "type": "string", "description": "The Location header contains the URL where the status of the long running operation can be checked." }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." } } }, "204": { "description": "Resource does not exist." }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Deletes a DeploymentSafeguard resource asynchronously with a long running operation.": { "$ref": "./examples/DeploymentSafeguards_Delete.json" } }, "x-ms-long-running-operation-options": { "final-state-via": "location" }, "x-ms-long-running-operation": true } }, "/providers/Microsoft.ContainerService/operations": { "get": { "operationId": "Operations_List", "tags": [ "Operations" ], "description": "List the operations for the provider", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/OperationListResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "List the operations for the provider.": { "$ref": "./examples/Operations_List.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } } }, "definitions": { "DeploymentSafeguard": { "type": "object", "description": "Deployment Safeguards", "properties": { "properties": { "$ref": "#/definitions/DeploymentSafeguardsProperties", "description": "The resource-specific properties for this resource.", "x-ms-client-flatten": true }, "eTag": { "type": "string", "description": "If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.", "readOnly": true } }, "allOf": [ { "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ProxyResource" } ] }, "DeploymentSafeguardListResult": { "type": "object", "description": "The response of a DeploymentSafeguard list operation.", "properties": { "value": { "type": "array", "description": "The DeploymentSafeguard items on this page", "items": { "$ref": "#/definitions/DeploymentSafeguard" } }, "nextLink": { "type": "string", "format": "uri", "description": "The link to the next page of items" } }, "required": [ "value" ] }, "DeploymentSafeguardsLevel": { "type": "string", "description": "Specifies the level of Deployment Safeguards", "enum": [ "Warn", "Enforce" ], "x-ms-enum": { "name": "DeploymentSafeguardsLevel", "modelAsString": true, "values": [ { "name": "Warn", "value": "Warn", "description": "Best practice violations will only show warnings" }, { "name": "Enforce", "value": "Enforce", "description": "Best practice violations will be denied" } ] } }, "DeploymentSafeguardsProperties": { "type": "object", "description": "DeploymentSafeguards Properties", "properties": { "provisioningState": { "$ref": "#/definitions/ProvisioningState", "description": "Provisioning State", "readOnly": true }, "level": { "$ref": "#/definitions/DeploymentSafeguardsLevel", "description": "The deployment safeguards level. Possible values are Warn and Enforce" }, "excludedNamespaces": { "type": "array", "description": "User defined list of namespaces to exclude from Deployment Safeguards. Deployments in these namespaces will not be checked against any safeguards", "items": { "type": "string" } }, "systemExcludedNamespaces": { "type": "array", "description": "System defined list of namespaces excluded from Deployment Safeguards. These are determined by the underlying provider (such as AKS), and cannot be changed. Deployments in these namespaces will not be checked", "items": { "type": "string" }, "readOnly": true } }, "required": [ "level", "systemExcludedNamespaces" ] }, "ProvisioningState": { "type": "string", "description": "The provisioning state of the last accepted operation.", "enum": [ "Succeeded", "Failed", "Canceled", "Creating", "Updating", "Deleting" ], "x-ms-enum": { "name": "ProvisioningState", "modelAsString": true, "values": [ { "name": "Succeeded", "value": "Succeeded", "description": "Resource has been created." }, { "name": "Failed", "value": "Failed", "description": "Resource creation failed." }, { "name": "Canceled", "value": "Canceled", "description": "Resource creation was canceled." }, { "name": "Creating", "value": "Creating", "description": "The provisioning state of DeploymentSafeguards being created." }, { "name": "Updating", "value": "Updating", "description": "The provisioning state of DeploymentSafeguards being updated." }, { "name": "Deleting", "value": "Deleting", "description": "The provisioning state of DeploymentSafeguards being deleted." } ] }, "readOnly": true } }, "parameters": { "Azure.ResourceManager.ResourceUriParameter": { "name": "resourceUri", "in": "path", "description": "The fully qualified Azure Resource manager identifier of the resource.", "required": true, "type": "string", "x-ms-parameter-location": "method", "x-ms-skip-url-encoding": true } } }