From cbaba38083cd1fa56171e48620a3ec137d4215b0 Mon Sep 17 00:00:00 2001 From: mabelegba Date: Fri, 13 Mar 2026 11:42:57 -0400 Subject: [PATCH 1/7] sdk add --- .../containerregistry.json | 9947 ++++++++++++ .../examples/ArchiveCreate.json | 61 + .../examples/ArchiveDelete.json | 20 + .../examples/ArchiveGet.json | 37 + .../examples/ArchiveList.json | 41 + .../examples/ArchiveUpdate.json | 44 + .../examples/ArchiveVersionCreate.json | 38 + .../examples/ArchiveVersionDelete.json | 21 + .../examples/ArchiveVersionGet.json | 34 + .../examples/ArchiveVersionList.json | 38 + .../examples/CacheRuleCreate.json | 51 + ...uleCreateUserAssignedMIAuthentication.json | 72 + .../examples/CacheRuleDelete.json | 19 + .../examples/CacheRuleGet.json | 27 + .../examples/CacheRuleList.json | 30 + .../examples/CacheRuleUpdate.json | 49 + .../examples/ConnectedRegistryCreate.json | 112 + .../examples/ConnectedRegistryDeactivate.json | 19 + .../examples/ConnectedRegistryDelete.json | 20 + .../examples/ConnectedRegistryGet.json | 56 + .../examples/ConnectedRegistryList.json | 59 + .../examples/ConnectedRegistryResync.json | 54 + .../examples/ConnectedRegistryUpdate.json | 123 + .../examples/CredentialSetCreate.json | 85 + .../examples/CredentialSetDelete.json | 19 + .../examples/CredentialSetGet.json | 40 + .../examples/CredentialSetList.json | 43 + .../examples/CredentialSetUpdate.json | 81 + .../examples/ExportPipelineCreate.json | 83 + .../examples/ExportPipelineDelete.json | 20 + .../examples/ExportPipelineGet.json | 38 + .../examples/ExportPipelineList.json | 41 + .../examples/ImportImageByManifestDigest.json | 31 + .../examples/ImportImageByTag.json | 31 + .../ImportImageFromPublicRegistry.json | 31 + .../examples/ImportPipelineCreate.json | 110 + .../examples/ImportPipelineDelete.json | 20 + .../examples/ImportPipelineGet.json | 49 + .../examples/ImportPipelineList.json | 52 + .../examples/OperationList.json | 24 + .../examples/PipelineRunCreate_Export.json | 93 + .../examples/PipelineRunCreate_Import.json | 92 + .../examples/PipelineRunDelete.json | 20 + .../examples/PipelineRunGet.json | 44 + .../examples/PipelineRunList.json | 76 + ...ivateEndpointConnectionCreateOrUpdate.json | 60 + .../PrivateEndpointConnectionDelete.json | 20 + .../PrivateEndpointConnectionGet.json | 31 + .../PrivateEndpointConnectionList.json | 34 + .../examples/RegistryCheckNameAvailable.json | 22 + .../RegistryCheckNameNotAvailable.json | 23 + .../examples/RegistryCreate.json | 144 + .../examples/RegistryCreateAbac.json | 144 + .../RegistryCreateDomainNameLabelScope.json | 144 + .../examples/RegistryCreateZoneRedundant.json | 147 + .../examples/RegistryDelete.json | 19 + .../examples/RegistryGenerateCredentials.json | 38 + .../examples/RegistryGet.json | 72 + .../RegistryGetPrivateLinkResource.json | 30 + .../examples/RegistryList.json | 74 + .../examples/RegistryListByResourceGroup.json | 75 + .../examples/RegistryListCredentials.json | 27 + .../RegistryListPrivateLinkResources.json | 33 + .../examples/RegistryListUsages.json | 30 + .../RegistryRegenerateCredential.json | 30 + .../examples/RegistryUpdate.json | 147 + .../examples/ReplicationCreate.json | 64 + .../ReplicationCreateZoneRedundant.json | 68 + .../examples/ReplicationDelete.json | 20 + .../examples/ReplicationGet.json | 34 + .../examples/ReplicationList.json | 37 + .../examples/ReplicationUpdate.json | 63 + .../examples/ScopeMapCreate.json | 57 + .../examples/ScopeMapDelete.json | 20 + .../examples/ScopeMapGet.json | 29 + .../examples/ScopeMapList.json | 32 + .../examples/ScopeMapUpdate.json | 57 + .../examples/TokenCreate.json | 74 + .../examples/TokenDelete.json | 20 + .../examples/TokenGet.json | 26 + .../examples/TokenList.json | 29 + .../examples/TokenUpdate.json | 71 + .../examples/WebhookCreate.json | 71 + .../examples/WebhookDelete.json | 20 + .../examples/WebhookGet.json | 32 + .../examples/WebhookGetCallbackConfig.json | 21 + .../examples/WebhookList.json | 35 + .../examples/WebhookListEvents.json | 65 + .../examples/WebhookPing.json | 18 + .../examples/WebhookUpdate.json | 70 + .../generated/apiview-properties.json | 345 + .../__init__.py | 27 + .../_client.py | 186 + .../_configuration.py | 61 + .../_patch.py | 21 + .../_utils/__init__.py | 4 + .../_utils/serialization.py | 2039 +++ .../aio/__init__.py | 27 + .../aio/_client.py | 190 + .../aio/_configuration.py | 61 + .../aio/_patch.py | 21 + .../aio/operations/__init__.py | 51 + .../aio/operations/_operations.py | 10536 ++++++++++++ .../aio/operations/_patch.py | 21 + .../models/__init__.py | 386 + .../models/_enums.py | 391 + .../models/_models.py | 6514 ++++++++ .../models/_patch.py | 21 + .../operations/__init__.py | 51 + .../operations/_operations.py | 13281 ++++++++++++++++ .../operations/_patch.py | 21 + .../py.typed | 1 + .../v2026-01-01-preview/readme.md | 9 + 113 files changed, 48737 insertions(+) create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/containerregistry.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveCreate.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveDelete.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveGet.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveList.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveUpdate.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveVersionCreate.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveVersionDelete.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveVersionGet.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveVersionList.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CacheRuleCreate.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CacheRuleCreateUserAssignedMIAuthentication.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CacheRuleDelete.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CacheRuleGet.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CacheRuleList.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CacheRuleUpdate.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ConnectedRegistryCreate.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ConnectedRegistryDeactivate.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ConnectedRegistryDelete.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ConnectedRegistryGet.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ConnectedRegistryList.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ConnectedRegistryResync.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ConnectedRegistryUpdate.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CredentialSetCreate.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CredentialSetDelete.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CredentialSetGet.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CredentialSetList.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CredentialSetUpdate.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ExportPipelineCreate.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ExportPipelineDelete.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ExportPipelineGet.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ExportPipelineList.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ImportImageByManifestDigest.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ImportImageByTag.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ImportImageFromPublicRegistry.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ImportPipelineCreate.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ImportPipelineDelete.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ImportPipelineGet.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ImportPipelineList.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/OperationList.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PipelineRunCreate_Export.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PipelineRunCreate_Import.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PipelineRunDelete.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PipelineRunGet.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PipelineRunList.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PrivateEndpointConnectionCreateOrUpdate.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PrivateEndpointConnectionDelete.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PrivateEndpointConnectionGet.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PrivateEndpointConnectionList.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryCheckNameAvailable.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryCheckNameNotAvailable.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryCreate.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryCreateAbac.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryCreateDomainNameLabelScope.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryCreateZoneRedundant.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryDelete.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryGenerateCredentials.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryGet.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryGetPrivateLinkResource.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryList.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryListByResourceGroup.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryListCredentials.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryListPrivateLinkResources.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryListUsages.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryRegenerateCredential.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryUpdate.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ReplicationCreate.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ReplicationCreateZoneRedundant.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ReplicationDelete.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ReplicationGet.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ReplicationList.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ReplicationUpdate.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ScopeMapCreate.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ScopeMapDelete.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ScopeMapGet.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ScopeMapList.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ScopeMapUpdate.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/TokenCreate.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/TokenDelete.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/TokenGet.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/TokenList.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/TokenUpdate.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/WebhookCreate.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/WebhookDelete.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/WebhookGet.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/WebhookGetCallbackConfig.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/WebhookList.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/WebhookListEvents.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/WebhookPing.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/WebhookUpdate.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/apiview-properties.json create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/__init__.py create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/_client.py create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/_configuration.py create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/_patch.py create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/_utils/__init__.py create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/_utils/serialization.py create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/aio/__init__.py create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/aio/_client.py create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/aio/_configuration.py create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/aio/_patch.py create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/aio/operations/__init__.py create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/aio/operations/_operations.py create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/aio/operations/_patch.py create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/models/__init__.py create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/models/_enums.py create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/models/_models.py create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/models/_patch.py create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/operations/__init__.py create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/operations/_operations.py create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/operations/_patch.py create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/py.typed create mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/readme.md diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/containerregistry.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/containerregistry.json new file mode 100644 index 00000000000..625540160a6 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/containerregistry.json @@ -0,0 +1,9947 @@ +{ + "swagger": "2.0", + "info": { + "title": "ContainerRegistryManagementClient", + "version": "2026-01-01-preview", + "description": "The Microsoft Azure Container Registry management API provides create, read, update, and delete functionality for Azure Container Registry resources including registries, replications, webhooks, tasks, runs, and other registry components.", + "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": "Registries" + }, + { + "name": "Archives" + }, + { + "name": "ArchiveVersions" + }, + { + "name": "CacheRules" + }, + { + "name": "CredentialSets" + }, + { + "name": "ConnectedRegistries" + }, + { + "name": "PrivateLinkResources" + }, + { + "name": "PrivateEndpointConnections" + }, + { + "name": "Replications" + }, + { + "name": "ScopeMaps" + }, + { + "name": "Tokens" + }, + { + "name": "ExportPipelines" + }, + { + "name": "ImportPipelines" + }, + { + "name": "PipelineRuns" + }, + { + "name": "Webhooks" + } + ], + "paths": { + "/providers/Microsoft.ContainerRegistry/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": "#/definitions/OperationListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "OperationList": { + "$ref": "./examples/OperationList.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerRegistry/checkNameAvailability": { + "post": { + "operationId": "Registries_CheckNameAvailability", + "tags": [ + "Registries" + ], + "description": "Checks whether the container registry name is available for use. The name must contain only alphanumeric characters, be globally unique, and between 5 and 50 characters in length.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "name": "registryNameCheckRequest", + "in": "body", + "description": "The request body", + "required": true, + "schema": { + "$ref": "#/definitions/RegistryNameCheckRequest" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/RegistryNameStatus" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "RegistryCheckNameAvailable": { + "$ref": "./examples/RegistryCheckNameAvailable.json" + }, + "RegistryCheckNameNotAvailable": { + "$ref": "./examples/RegistryCheckNameNotAvailable.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerRegistry/registries": { + "get": { + "operationId": "Registries_List", + "tags": [ + "Registries" + ], + "description": "Lists all the container registries under the specified subscription.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/RegistryListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "RegistryList": { + "$ref": "./examples/RegistryList.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries": { + "get": { + "operationId": "Registries_ListByResourceGroup", + "tags": [ + "Registries" + ], + "description": "Lists all the container registries under the specified resource group.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/RegistryListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "RegistryListByResourceGroup": { + "$ref": "./examples/RegistryListByResourceGroup.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}": { + "get": { + "operationId": "Registries_Get", + "tags": [ + "Registries" + ], + "description": "Gets the properties of the specified container registry.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/Registry" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "RegistryGet": { + "$ref": "./examples/RegistryGet.json" + } + } + }, + "put": { + "operationId": "Registries_Create", + "tags": [ + "Registries" + ], + "description": "Creates a container registry with the specified parameters.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "registry", + "in": "body", + "description": "The parameters for creating a container registry.", + "required": true, + "schema": { + "$ref": "#/definitions/Registry" + } + } + ], + "responses": { + "200": { + "description": "Resource 'Registry' update operation succeeded", + "schema": { + "$ref": "#/definitions/Registry" + } + }, + "201": { + "description": "Resource 'Registry' create operation succeeded", + "schema": { + "$ref": "#/definitions/Registry" + }, + "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": { + "RegistryCreate": { + "$ref": "./examples/RegistryCreate.json" + }, + "RegistryCreateAbac": { + "$ref": "./examples/RegistryCreateAbac.json" + }, + "RegistryCreateDomainNameLabelScope": { + "$ref": "./examples/RegistryCreateDomainNameLabelScope.json" + }, + "RegistryCreateZoneRedundant": { + "$ref": "./examples/RegistryCreateZoneRedundant.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation", + "final-state-schema": "#/definitions/Registry" + }, + "x-ms-long-running-operation": true + }, + "patch": { + "operationId": "Registries_Update", + "tags": [ + "Registries" + ], + "description": "Updates a container registry with the specified parameters.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "registryUpdateParameters", + "in": "body", + "description": "The parameters for updating a container registry.", + "required": true, + "schema": { + "$ref": "#/definitions/RegistryUpdateParameters" + } + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/Registry" + } + }, + "201": { + "description": "Resource 'Registry' create operation succeeded", + "schema": { + "$ref": "#/definitions/Registry" + }, + "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": { + "RegistryUpdate": { + "$ref": "./examples/RegistryUpdate.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation", + "final-state-schema": "#/definitions/Registry" + }, + "x-ms-long-running-operation": true + }, + "delete": { + "operationId": "Registries_Delete", + "tags": [ + "Registries" + ], + "description": "Deletes a container registry.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + } + ], + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "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": { + "RegistryDelete": { + "$ref": "./examples/RegistryDelete.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules": { + "get": { + "operationId": "CacheRules_List", + "tags": [ + "CacheRules" + ], + "description": "Lists all cache rule resources for the specified container registry.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/CacheRulesListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "CacheRuleList": { + "$ref": "./examples/CacheRuleList.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules/{cacheRuleName}": { + "get": { + "operationId": "CacheRules_Get", + "tags": [ + "CacheRules" + ], + "description": "Gets the properties of the specified cache rule resource.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "cacheRuleName", + "in": "path", + "description": "The name of the cache rule.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9-]*$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/CacheRule" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "CacheRuleGet": { + "$ref": "./examples/CacheRuleGet.json" + } + } + }, + "put": { + "operationId": "CacheRules_Create", + "tags": [ + "CacheRules" + ], + "description": "Creates a cache rule for a container registry with the specified parameters.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "cacheRuleName", + "in": "path", + "description": "The name of the cache rule.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9-]*$" + }, + { + "name": "cacheRuleCreateParameters", + "in": "body", + "description": "The parameters for creating a cache rule.", + "required": true, + "schema": { + "$ref": "#/definitions/CacheRule" + } + } + ], + "responses": { + "200": { + "description": "Resource 'CacheRule' update operation succeeded", + "schema": { + "$ref": "#/definitions/CacheRule" + } + }, + "201": { + "description": "Resource 'CacheRule' create operation succeeded", + "schema": { + "$ref": "#/definitions/CacheRule" + }, + "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": { + "CacheRuleCreate": { + "$ref": "./examples/CacheRuleCreate.json" + }, + "CacheRuleCreateUserAssignedMIAuthentication": { + "$ref": "./examples/CacheRuleCreateUserAssignedMIAuthentication.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation", + "final-state-schema": "#/definitions/CacheRule" + }, + "x-ms-long-running-operation": true + }, + "patch": { + "operationId": "CacheRules_Update", + "tags": [ + "CacheRules" + ], + "description": "Updates a cache rule for a container registry with the specified parameters.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "cacheRuleName", + "in": "path", + "description": "The name of the cache rule.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9-]*$" + }, + { + "name": "cacheRuleUpdateParameters", + "in": "body", + "description": "The parameters for updating a cache rule.", + "required": true, + "schema": { + "$ref": "#/definitions/CacheRuleUpdateParameters" + } + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/CacheRule" + } + }, + "201": { + "description": "Resource 'CacheRule' create operation succeeded", + "schema": { + "$ref": "#/definitions/CacheRule" + }, + "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": { + "CacheRuleUpdate": { + "$ref": "./examples/CacheRuleUpdate.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation", + "final-state-schema": "#/definitions/CacheRule" + }, + "x-ms-long-running-operation": true + }, + "delete": { + "operationId": "CacheRules_Delete", + "tags": [ + "CacheRules" + ], + "description": "Deletes a cache rule resource from a container registry.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "cacheRuleName", + "in": "path", + "description": "The name of the cache rule.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9-]*$" + } + ], + "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": { + "CacheRuleDelete": { + "$ref": "./examples/CacheRuleDelete.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries": { + "get": { + "operationId": "ConnectedRegistries_List", + "tags": [ + "ConnectedRegistries" + ], + "description": "Lists all connected registries for the specified container registry.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "$filter", + "in": "query", + "description": "An OData filter expression that describes a subset of connectedRegistries to return. The parameters that can be filtered are parent.id (the resource id of the connectedRegistry parent), mode, and connectionState. The supported operator is eq.", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/ConnectedRegistryListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "ConnectedRegistryList": { + "$ref": "./examples/ConnectedRegistryList.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}": { + "get": { + "operationId": "ConnectedRegistries_Get", + "tags": [ + "ConnectedRegistries" + ], + "description": "Gets the properties of the connected registry.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "connectedRegistryName", + "in": "path", + "description": "The name of the connected registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/ConnectedRegistry" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "ConnectedRegistryGet": { + "$ref": "./examples/ConnectedRegistryGet.json" + } + } + }, + "put": { + "operationId": "ConnectedRegistries_Create", + "tags": [ + "ConnectedRegistries" + ], + "description": "Creates a connected registry for a container registry with the specified parameters.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "connectedRegistryName", + "in": "path", + "description": "The name of the connected registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "connectedRegistryCreateParameters", + "in": "body", + "description": "The parameters for creating a connectedRegistry.", + "required": true, + "schema": { + "$ref": "#/definitions/ConnectedRegistry" + } + } + ], + "responses": { + "200": { + "description": "Resource 'ConnectedRegistry' update operation succeeded", + "schema": { + "$ref": "#/definitions/ConnectedRegistry" + } + }, + "201": { + "description": "Resource 'ConnectedRegistry' create operation succeeded", + "schema": { + "$ref": "#/definitions/ConnectedRegistry" + }, + "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": { + "ConnectedRegistryCreate": { + "$ref": "./examples/ConnectedRegistryCreate.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation", + "final-state-schema": "#/definitions/ConnectedRegistry" + }, + "x-ms-long-running-operation": true + }, + "patch": { + "operationId": "ConnectedRegistries_Update", + "tags": [ + "ConnectedRegistries" + ], + "description": "Updates a connected registry with the specified parameters.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "connectedRegistryName", + "in": "path", + "description": "The name of the connected registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "connectedRegistryUpdateParameters", + "in": "body", + "description": "The parameters for updating a connectedRegistry.", + "required": true, + "schema": { + "$ref": "#/definitions/ConnectedRegistryUpdateParameters" + } + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/ConnectedRegistry" + } + }, + "201": { + "description": "Resource 'ConnectedRegistry' create operation succeeded", + "schema": { + "$ref": "#/definitions/ConnectedRegistry" + }, + "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": { + "ConnectedRegistryUpdate": { + "$ref": "./examples/ConnectedRegistryUpdate.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation", + "final-state-schema": "#/definitions/ConnectedRegistry" + }, + "x-ms-long-running-operation": true + }, + "delete": { + "operationId": "ConnectedRegistries_Delete", + "tags": [ + "ConnectedRegistries" + ], + "description": "Deletes a connected registry from a container registry.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "connectedRegistryName", + "in": "path", + "description": "The name of the connected registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + } + ], + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "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": { + "ConnectedRegistryDelete": { + "$ref": "./examples/ConnectedRegistryDelete.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}/deactivate": { + "post": { + "operationId": "ConnectedRegistries_Deactivate", + "tags": [ + "ConnectedRegistries" + ], + "description": "Deactivates the connected registry instance.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "connectedRegistryName", + "in": "path", + "description": "The name of the connected registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully." + }, + "202": { + "description": "Resource operation 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." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "ConnectedRegistryDeactivate": { + "$ref": "./examples/ConnectedRegistryDeactivate.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}/resync": { + "post": { + "operationId": "ConnectedRegistries_Resync", + "tags": [ + "ConnectedRegistries" + ], + "description": "Resync the connected registry instance.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "connectedRegistryName", + "in": "path", + "description": "The name of the connected registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/ConnectedRegistry" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "ConnectedRegistryResync": { + "$ref": "./examples/ConnectedRegistryResync.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets": { + "get": { + "operationId": "CredentialSets_List", + "tags": [ + "CredentialSets" + ], + "description": "Lists all credential set resources for the specified container registry.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/CredentialSetListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "CredentialSetList": { + "$ref": "./examples/CredentialSetList.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets/{credentialSetName}": { + "get": { + "operationId": "CredentialSets_Get", + "tags": [ + "CredentialSets" + ], + "description": "Gets the properties of the specified credential set resource.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "credentialSetName", + "in": "path", + "description": "The name of the credential set.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9-]*$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/CredentialSet" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "CredentialSetGet": { + "$ref": "./examples/CredentialSetGet.json" + } + } + }, + "put": { + "operationId": "CredentialSets_Create", + "tags": [ + "CredentialSets" + ], + "description": "Creates a credential set for a container registry with the specified parameters.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "credentialSetName", + "in": "path", + "description": "The name of the credential set.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9-]*$" + }, + { + "name": "credentialSetCreateParameters", + "in": "body", + "description": "The parameters for creating a credential set.", + "required": true, + "schema": { + "$ref": "#/definitions/CredentialSet" + } + } + ], + "responses": { + "200": { + "description": "Resource 'CredentialSet' update operation succeeded", + "schema": { + "$ref": "#/definitions/CredentialSet" + } + }, + "201": { + "description": "Resource 'CredentialSet' create operation succeeded", + "schema": { + "$ref": "#/definitions/CredentialSet" + }, + "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": { + "CredentialSetCreate": { + "$ref": "./examples/CredentialSetCreate.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation", + "final-state-schema": "#/definitions/CredentialSet" + }, + "x-ms-long-running-operation": true + }, + "patch": { + "operationId": "CredentialSets_Update", + "tags": [ + "CredentialSets" + ], + "description": "Updates a credential set for a container registry with the specified parameters.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "credentialSetName", + "in": "path", + "description": "The name of the credential set.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9-]*$" + }, + { + "name": "credentialSetUpdateParameters", + "in": "body", + "description": "The parameters for updating a credential set.", + "required": true, + "schema": { + "$ref": "#/definitions/CredentialSetUpdateParameters" + } + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/CredentialSet" + } + }, + "201": { + "description": "Resource 'CredentialSet' create operation succeeded", + "schema": { + "$ref": "#/definitions/CredentialSet" + }, + "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": { + "CredentialSetUpdate": { + "$ref": "./examples/CredentialSetUpdate.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation", + "final-state-schema": "#/definitions/CredentialSet" + }, + "x-ms-long-running-operation": true + }, + "delete": { + "operationId": "CredentialSets_Delete", + "tags": [ + "CredentialSets" + ], + "description": "Deletes a credential set from a container registry.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "credentialSetName", + "in": "path", + "description": "The name of the credential set.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9-]*$" + } + ], + "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": { + "CredentialSetDelete": { + "$ref": "./examples/CredentialSetDelete.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines": { + "get": { + "operationId": "ExportPipelines_List", + "tags": [ + "ExportPipelines" + ], + "description": "Lists all export pipelines for the specified container registry.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/ExportPipelineListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "ExportPipelineList": { + "$ref": "./examples/ExportPipelineList.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines/{exportPipelineName}": { + "get": { + "operationId": "ExportPipelines_Get", + "tags": [ + "ExportPipelines" + ], + "description": "Gets the properties of the export pipeline.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "exportPipelineName", + "in": "path", + "description": "The name of the export pipeline.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/ExportPipeline" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "ExportPipelineGet": { + "$ref": "./examples/ExportPipelineGet.json" + } + } + }, + "put": { + "operationId": "ExportPipelines_Create", + "tags": [ + "ExportPipelines" + ], + "description": "Creates an export pipeline for a container registry with the specified parameters.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "exportPipelineName", + "in": "path", + "description": "The name of the export pipeline.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "exportPipelineCreateParameters", + "in": "body", + "description": "The parameters for creating an export pipeline.", + "required": true, + "schema": { + "$ref": "#/definitions/ExportPipeline" + } + } + ], + "responses": { + "200": { + "description": "Resource 'ExportPipeline' update operation succeeded", + "schema": { + "$ref": "#/definitions/ExportPipeline" + } + }, + "201": { + "description": "Resource 'ExportPipeline' create operation succeeded", + "schema": { + "$ref": "#/definitions/ExportPipeline" + }, + "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": { + "ExportPipelineCreate": { + "$ref": "./examples/ExportPipelineCreate.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation", + "final-state-schema": "#/definitions/ExportPipeline" + }, + "x-ms-long-running-operation": true + }, + "delete": { + "operationId": "ExportPipelines_Delete", + "tags": [ + "ExportPipelines" + ], + "description": "Deletes an export pipeline from a container registry.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "exportPipelineName", + "in": "path", + "description": "The name of the export pipeline.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + } + ], + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "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": { + "ExportPipelineDelete": { + "$ref": "./examples/ExportPipelineDelete.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/generateCredentials": { + "post": { + "operationId": "Registries_GenerateCredentials", + "tags": [ + "Registries" + ], + "description": "Generate keys for a token of a specified container registry.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "generateCredentialsParameters", + "in": "body", + "description": "The parameters for generating credentials.", + "required": true, + "schema": { + "$ref": "#/definitions/GenerateCredentialsParameters" + } + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/GenerateCredentialsResult" + } + }, + "202": { + "description": "Resource operation 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." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "RegistryGenerateCredentials": { + "$ref": "./examples/RegistryGenerateCredentials.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location", + "final-state-schema": "#/definitions/GenerateCredentialsResult" + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importImage": { + "post": { + "operationId": "Registries_ImportImage", + "tags": [ + "Registries" + ], + "description": "Copies an image to this container registry from the specified container registry.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "parameters", + "in": "body", + "description": "The parameters specifying the image to copy and the source container registry.", + "required": true, + "schema": { + "$ref": "#/definitions/ImportImageParameters" + } + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully." + }, + "202": { + "description": "Resource operation 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." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "ImportImageByManifestDigest": { + "$ref": "./examples/ImportImageByManifestDigest.json" + }, + "ImportImageByTag": { + "$ref": "./examples/ImportImageByTag.json" + }, + "ImportImageFromPublicRegistry": { + "$ref": "./examples/ImportImageFromPublicRegistry.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines": { + "get": { + "operationId": "ImportPipelines_List", + "tags": [ + "ImportPipelines" + ], + "description": "Lists all import pipelines for the specified container registry.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/ImportPipelineListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "ImportPipelineList": { + "$ref": "./examples/ImportPipelineList.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines/{importPipelineName}": { + "get": { + "operationId": "ImportPipelines_Get", + "tags": [ + "ImportPipelines" + ], + "description": "Gets the properties of the import pipeline.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "importPipelineName", + "in": "path", + "description": "The name of the import pipeline.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/ImportPipeline" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "ImportPipelineGet": { + "$ref": "./examples/ImportPipelineGet.json" + } + } + }, + "put": { + "operationId": "ImportPipelines_Create", + "tags": [ + "ImportPipelines" + ], + "description": "Creates an import pipeline for a container registry with the specified parameters.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "importPipelineName", + "in": "path", + "description": "The name of the import pipeline.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "importPipelineCreateParameters", + "in": "body", + "description": "The parameters for creating an import pipeline.", + "required": true, + "schema": { + "$ref": "#/definitions/ImportPipeline" + } + } + ], + "responses": { + "200": { + "description": "Resource 'ImportPipeline' update operation succeeded", + "schema": { + "$ref": "#/definitions/ImportPipeline" + } + }, + "201": { + "description": "Resource 'ImportPipeline' create operation succeeded", + "schema": { + "$ref": "#/definitions/ImportPipeline" + }, + "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": { + "ImportPipelineCreate": { + "$ref": "./examples/ImportPipelineCreate.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation", + "final-state-schema": "#/definitions/ImportPipeline" + }, + "x-ms-long-running-operation": true + }, + "delete": { + "operationId": "ImportPipelines_Delete", + "tags": [ + "ImportPipelines" + ], + "description": "Deletes an import pipeline from a container registry.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "importPipelineName", + "in": "path", + "description": "The name of the import pipeline.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + } + ], + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "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": { + "ImportPipelineDelete": { + "$ref": "./examples/ImportPipelineDelete.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listCredentials": { + "post": { + "operationId": "Registries_ListCredentials", + "tags": [ + "Registries" + ], + "description": "Lists the login credentials for the specified container registry.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/RegistryListCredentialsResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "RegistryListCredentials": { + "$ref": "./examples/RegistryListCredentials.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listUsages": { + "get": { + "operationId": "Registries_ListUsages", + "tags": [ + "Registries" + ], + "description": "Gets the quota usages for the specified container registry.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/RegistryUsageListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "RegistryListUsages": { + "$ref": "./examples/RegistryListUsages.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives": { + "get": { + "operationId": "Archives_List", + "tags": [ + "Archives" + ], + "description": "Lists all archives for the specified container registry and package type.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "packageType", + "in": "path", + "description": "The package type.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 50, + "pattern": "^[a-zA-Z]*$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/ArchiveListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "ArchiveList": { + "$ref": "./examples/ArchiveList.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}": { + "get": { + "operationId": "Archives_Get", + "tags": [ + "Archives" + ], + "description": "Gets the properties of the archive.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "packageType", + "in": "path", + "description": "The package type.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 50, + "pattern": "^[a-zA-Z]*$" + }, + { + "name": "archiveName", + "in": "path", + "description": "The name of the archive resource.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 200, + "pattern": "^[a-zA-Z0-9-]*$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/Archive" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "ArchiveGet": { + "$ref": "./examples/ArchiveGet.json" + } + } + }, + "put": { + "operationId": "Archives_Create", + "tags": [ + "Archives" + ], + "description": "Creates a archive for a container registry with the specified parameters.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "packageType", + "in": "path", + "description": "The package type.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 50, + "pattern": "^[a-zA-Z]*$" + }, + { + "name": "archiveName", + "in": "path", + "description": "The name of the archive resource.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 200, + "pattern": "^[a-zA-Z0-9-]*$" + }, + { + "name": "archiveCreateParameters", + "in": "body", + "description": "The parameters for creating a archive.", + "required": true, + "schema": { + "$ref": "#/definitions/Archive" + } + } + ], + "responses": { + "200": { + "description": "Resource 'Archive' update operation succeeded", + "schema": { + "$ref": "#/definitions/Archive" + } + }, + "201": { + "description": "Resource 'Archive' create operation succeeded", + "schema": { + "$ref": "#/definitions/Archive" + }, + "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": { + "ArchiveCreate": { + "$ref": "./examples/ArchiveCreate.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation", + "final-state-schema": "#/definitions/Archive" + }, + "x-ms-long-running-operation": true + }, + "patch": { + "operationId": "Archives_Update", + "tags": [ + "Archives" + ], + "description": "Updates a archive for a container registry with the specified parameters.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "packageType", + "in": "path", + "description": "The package type.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 50, + "pattern": "^[a-zA-Z]*$" + }, + { + "name": "archiveName", + "in": "path", + "description": "The name of the archive resource.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 200, + "pattern": "^[a-zA-Z0-9-]*$" + }, + { + "name": "archiveUpdateParameters", + "in": "body", + "description": "The parameters for updating a archive.", + "required": true, + "schema": { + "$ref": "#/definitions/ArchiveUpdateParameters" + } + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/Archive" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "ArchiveUpdate": { + "$ref": "./examples/ArchiveUpdate.json" + } + } + }, + "delete": { + "operationId": "Archives_Delete", + "tags": [ + "Archives" + ], + "description": "Deletes a archive from a container registry.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "packageType", + "in": "path", + "description": "The package type.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 50, + "pattern": "^[a-zA-Z]*$" + }, + { + "name": "archiveName", + "in": "path", + "description": "The name of the archive resource.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 200, + "pattern": "^[a-zA-Z0-9-]*$" + } + ], + "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": { + "ArchiveDelete": { + "$ref": "./examples/ArchiveDelete.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}/versions": { + "get": { + "operationId": "ArchiveVersions_List", + "tags": [ + "ArchiveVersions" + ], + "description": "Lists all archive versions for the specified container registry, repository type and archive name.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "packageType", + "in": "path", + "description": "The package type.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 50, + "pattern": "^[a-zA-Z]*$" + }, + { + "name": "archiveName", + "in": "path", + "description": "The name of the archive resource.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 200, + "pattern": "^[a-zA-Z0-9-]*$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/ArchiveVersionListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "ArchiveVersionList": { + "$ref": "./examples/ArchiveVersionList.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}/versions/{archiveVersionName}": { + "get": { + "operationId": "ArchiveVersions_Get", + "tags": [ + "ArchiveVersions" + ], + "description": "Gets the properties of the archive version.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "packageType", + "in": "path", + "description": "The package type.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 50, + "pattern": "^[a-zA-Z]*$" + }, + { + "name": "archiveName", + "in": "path", + "description": "The name of the archive resource.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 200, + "pattern": "^[a-zA-Z0-9-]*$" + }, + { + "name": "archiveVersionName", + "in": "path", + "description": "The name of the archive version resource.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 200, + "pattern": "^[a-zA-Z0-9-]*$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/ArchiveVersion" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "ArchiveVersionGet": { + "$ref": "./examples/ArchiveVersionGet.json" + } + } + }, + "put": { + "operationId": "ArchiveVersions_Create", + "tags": [ + "ArchiveVersions" + ], + "description": "Creates a archive version for a container registry with the specified parameters.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "packageType", + "in": "path", + "description": "The package type.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 50, + "pattern": "^[a-zA-Z]*$" + }, + { + "name": "archiveName", + "in": "path", + "description": "The name of the archive resource.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 200, + "pattern": "^[a-zA-Z0-9-]*$" + }, + { + "name": "archiveVersionName", + "in": "path", + "description": "The name of the archive version resource.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 200, + "pattern": "^[a-zA-Z0-9-]*$" + } + ], + "responses": { + "200": { + "description": "Resource 'ArchiveVersion' update operation succeeded", + "schema": { + "$ref": "#/definitions/ArchiveVersion" + } + }, + "201": { + "description": "Resource 'ArchiveVersion' create operation succeeded", + "schema": { + "$ref": "#/definitions/ArchiveVersion" + }, + "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": { + "ArchiveVersionCreate": { + "$ref": "./examples/ArchiveVersionCreate.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation", + "final-state-schema": "#/definitions/ArchiveVersion" + }, + "x-ms-long-running-operation": true + }, + "delete": { + "operationId": "ArchiveVersions_Delete", + "tags": [ + "ArchiveVersions" + ], + "description": "Deletes a archive version from a container registry.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "packageType", + "in": "path", + "description": "The package type.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 50, + "pattern": "^[a-zA-Z]*$" + }, + { + "name": "archiveName", + "in": "path", + "description": "The name of the archive resource.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 200, + "pattern": "^[a-zA-Z0-9-]*$" + }, + { + "name": "archiveVersionName", + "in": "path", + "description": "The name of the archive version resource.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 200, + "pattern": "^[a-zA-Z0-9-]*$" + } + ], + "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": { + "ArchiveVersionDelete": { + "$ref": "./examples/ArchiveVersionDelete.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns": { + "get": { + "operationId": "PipelineRuns_List", + "tags": [ + "PipelineRuns" + ], + "description": "Lists all the pipeline runs for the specified container registry.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/PipelineRunListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "PipelineRunList": { + "$ref": "./examples/PipelineRunList.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns/{pipelineRunName}": { + "get": { + "operationId": "PipelineRuns_Get", + "tags": [ + "PipelineRuns" + ], + "description": "Gets the detailed information for a given pipeline run.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "pipelineRunName", + "in": "path", + "description": "The name of the pipeline run.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/PipelineRun" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "PipelineRunGet": { + "$ref": "./examples/PipelineRunGet.json" + } + } + }, + "put": { + "operationId": "PipelineRuns_Create", + "tags": [ + "PipelineRuns" + ], + "description": "Creates a pipeline run for a container registry with the specified parameters", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "pipelineRunName", + "in": "path", + "description": "The name of the pipeline run.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "pipelineRunCreateParameters", + "in": "body", + "description": "The parameters for creating a pipeline run.", + "required": true, + "schema": { + "$ref": "#/definitions/PipelineRun" + } + } + ], + "responses": { + "200": { + "description": "Resource 'PipelineRun' update operation succeeded", + "schema": { + "$ref": "#/definitions/PipelineRun" + } + }, + "201": { + "description": "Resource 'PipelineRun' create operation succeeded", + "schema": { + "$ref": "#/definitions/PipelineRun" + }, + "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": { + "PipelineRunCreate_Export": { + "$ref": "./examples/PipelineRunCreate_Export.json" + }, + "PipelineRunCreate_Import": { + "$ref": "./examples/PipelineRunCreate_Import.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation", + "final-state-schema": "#/definitions/PipelineRun" + }, + "x-ms-long-running-operation": true + }, + "delete": { + "operationId": "PipelineRuns_Delete", + "tags": [ + "PipelineRuns" + ], + "description": "Deletes a pipeline run from a container registry.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "pipelineRunName", + "in": "path", + "description": "The name of the pipeline run.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + } + ], + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "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": { + "PipelineRunDelete": { + "$ref": "./examples/PipelineRunDelete.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateEndpointConnections": { + "get": { + "operationId": "PrivateEndpointConnections_List", + "tags": [ + "PrivateEndpointConnections" + ], + "description": "List all private endpoint connections in a container registry.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/PrivateEndpointConnectionListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "PrivateEndpointConnectionList": { + "$ref": "./examples/PrivateEndpointConnectionList.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateEndpointConnections/{privateEndpointConnectionName}": { + "get": { + "operationId": "PrivateEndpointConnections_Get", + "tags": [ + "PrivateEndpointConnections" + ], + "description": "Get the specified private endpoint connection associated with the container registry.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "privateEndpointConnectionName", + "in": "path", + "description": "The name of the private endpoint connection.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/PrivateEndpointConnection" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "PrivateEndpointConnectionGet": { + "$ref": "./examples/PrivateEndpointConnectionGet.json" + } + } + }, + "put": { + "operationId": "PrivateEndpointConnections_CreateOrUpdate", + "tags": [ + "PrivateEndpointConnections" + ], + "description": "Update the state of specified private endpoint connection associated with the container registry.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "privateEndpointConnectionName", + "in": "path", + "description": "The name of the private endpoint connection.", + "required": true, + "type": "string" + }, + { + "name": "privateEndpointConnection", + "in": "body", + "description": "The parameters for creating a private endpoint connection.", + "required": true, + "schema": { + "$ref": "#/definitions/PrivateEndpointConnection" + } + } + ], + "responses": { + "200": { + "description": "Resource 'PrivateEndpointConnection' update operation succeeded", + "schema": { + "$ref": "#/definitions/PrivateEndpointConnection" + } + }, + "201": { + "description": "Resource 'PrivateEndpointConnection' create operation succeeded", + "schema": { + "$ref": "#/definitions/PrivateEndpointConnection" + }, + "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": { + "PrivateEndpointConnectionCreateOrUpdate": { + "$ref": "./examples/PrivateEndpointConnectionCreateOrUpdate.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation", + "final-state-schema": "#/definitions/PrivateEndpointConnection" + }, + "x-ms-long-running-operation": true + }, + "delete": { + "operationId": "PrivateEndpointConnections_Delete", + "tags": [ + "PrivateEndpointConnections" + ], + "description": "Deletes the specified private endpoint connection associated with the container registry.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "privateEndpointConnectionName", + "in": "path", + "description": "The name of the private endpoint connection.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "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": { + "PrivateEndpointConnectionDelete": { + "$ref": "./examples/PrivateEndpointConnectionDelete.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateLinkResources": { + "get": { + "operationId": "Registries_ListPrivateLinkResources", + "tags": [ + "PrivateLinkResources" + ], + "description": "Lists the private link resources for a container registry.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/PrivateLinkResourceListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "RegistryListPrivateLinkResources": { + "$ref": "./examples/RegistryListPrivateLinkResources.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateLinkResources/{groupName}": { + "get": { + "operationId": "Registries_GetPrivateLinkResource", + "tags": [ + "PrivateLinkResources" + ], + "description": "Gets a private link resource by a specified group name for a container registry.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "groupName", + "in": "path", + "description": "The name of the private link associated with the Azure resource.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/privatelinks.json#/definitions/PrivateLinkResource" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "RegistryGetPrivateLinkResource": { + "$ref": "./examples/RegistryGetPrivateLinkResource.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/regenerateCredential": { + "post": { + "operationId": "Registries_RegenerateCredential", + "tags": [ + "Registries" + ], + "description": "Regenerates one of the login credentials for the specified container registry.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "regenerateCredentialParameters", + "in": "body", + "description": "Specifies name of the password which should be regenerated -- password or password2.", + "required": true, + "schema": { + "$ref": "#/definitions/RegenerateCredentialParameters" + } + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/RegistryListCredentialsResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "RegistryRegenerateCredential": { + "$ref": "./examples/RegistryRegenerateCredential.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications": { + "get": { + "operationId": "Replications_List", + "tags": [ + "Replications" + ], + "description": "Lists all the replications for the specified container registry.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/ReplicationListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "ReplicationList": { + "$ref": "./examples/ReplicationList.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications/{replicationName}": { + "get": { + "operationId": "Replications_Get", + "tags": [ + "Replications" + ], + "description": "Gets the properties of the specified replication.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "replicationName", + "in": "path", + "description": "The name of the replication.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/Replication" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "ReplicationGet": { + "$ref": "./examples/ReplicationGet.json" + } + } + }, + "put": { + "operationId": "Replications_Create", + "tags": [ + "Replications" + ], + "description": "Creates a replication for a container registry with the specified parameters.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "replicationName", + "in": "path", + "description": "The name of the replication.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "replication", + "in": "body", + "description": "The parameters for creating a replication.", + "required": true, + "schema": { + "$ref": "#/definitions/Replication" + } + } + ], + "responses": { + "200": { + "description": "Resource 'Replication' update operation succeeded", + "schema": { + "$ref": "#/definitions/Replication" + } + }, + "201": { + "description": "Resource 'Replication' create operation succeeded", + "schema": { + "$ref": "#/definitions/Replication" + }, + "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": { + "ReplicationCreate": { + "$ref": "./examples/ReplicationCreate.json" + }, + "ReplicationCreateZoneRedundant": { + "$ref": "./examples/ReplicationCreateZoneRedundant.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation", + "final-state-schema": "#/definitions/Replication" + }, + "x-ms-long-running-operation": true + }, + "patch": { + "operationId": "Replications_Update", + "tags": [ + "Replications" + ], + "description": "Updates a replication for a container registry with the specified parameters.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "replicationName", + "in": "path", + "description": "The name of the replication.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "replicationUpdateParameters", + "in": "body", + "description": "The parameters for updating a replication.", + "required": true, + "schema": { + "$ref": "#/definitions/ReplicationUpdateParameters" + } + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/Replication" + } + }, + "201": { + "description": "Resource 'Replication' create operation succeeded", + "schema": { + "$ref": "#/definitions/Replication" + }, + "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": { + "ReplicationUpdate": { + "$ref": "./examples/ReplicationUpdate.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation", + "final-state-schema": "#/definitions/Replication" + }, + "x-ms-long-running-operation": true + }, + "delete": { + "operationId": "Replications_Delete", + "tags": [ + "Replications" + ], + "description": "Deletes a replication from a container registry.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "replicationName", + "in": "path", + "description": "The name of the replication.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + } + ], + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "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": { + "ReplicationDelete": { + "$ref": "./examples/ReplicationDelete.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps": { + "get": { + "operationId": "ScopeMaps_List", + "tags": [ + "ScopeMaps" + ], + "description": "Lists all the scope maps for the specified container registry.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/ScopeMapListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "ScopeMapList": { + "$ref": "./examples/ScopeMapList.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps/{scopeMapName}": { + "get": { + "operationId": "ScopeMaps_Get", + "tags": [ + "ScopeMaps" + ], + "description": "Gets the properties of the specified scope map.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "scopeMapName", + "in": "path", + "description": "The name of the scope map.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9-_]*$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/ScopeMap" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "ScopeMapGet": { + "$ref": "./examples/ScopeMapGet.json" + } + } + }, + "put": { + "operationId": "ScopeMaps_Create", + "tags": [ + "ScopeMaps" + ], + "description": "Creates a scope map for a container registry with the specified parameters.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "scopeMapName", + "in": "path", + "description": "The name of the scope map.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9-_]*$" + }, + { + "name": "scopeMapCreateParameters", + "in": "body", + "description": "The parameters for creating a scope map.", + "required": true, + "schema": { + "$ref": "#/definitions/ScopeMap" + } + } + ], + "responses": { + "200": { + "description": "Resource 'ScopeMap' update operation succeeded", + "schema": { + "$ref": "#/definitions/ScopeMap" + } + }, + "201": { + "description": "Resource 'ScopeMap' create operation succeeded", + "schema": { + "$ref": "#/definitions/ScopeMap" + }, + "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": { + "ScopeMapCreate": { + "$ref": "./examples/ScopeMapCreate.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation", + "final-state-schema": "#/definitions/ScopeMap" + }, + "x-ms-long-running-operation": true + }, + "patch": { + "operationId": "ScopeMaps_Update", + "tags": [ + "ScopeMaps" + ], + "description": "Updates a scope map with the specified parameters.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "scopeMapName", + "in": "path", + "description": "The name of the scope map.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9-_]*$" + }, + { + "name": "scopeMapUpdateParameters", + "in": "body", + "description": "The parameters for updating a scope map.", + "required": true, + "schema": { + "$ref": "#/definitions/ScopeMapUpdateParameters" + } + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/ScopeMap" + } + }, + "201": { + "description": "Resource 'ScopeMap' create operation succeeded", + "schema": { + "$ref": "#/definitions/ScopeMap" + }, + "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": { + "ScopeMapUpdate": { + "$ref": "./examples/ScopeMapUpdate.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation", + "final-state-schema": "#/definitions/ScopeMap" + }, + "x-ms-long-running-operation": true + }, + "delete": { + "operationId": "ScopeMaps_Delete", + "tags": [ + "ScopeMaps" + ], + "description": "Deletes a scope map from a container registry.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "scopeMapName", + "in": "path", + "description": "The name of the scope map.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9-_]*$" + } + ], + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "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": { + "ScopeMapDelete": { + "$ref": "./examples/ScopeMapDelete.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens": { + "get": { + "operationId": "Tokens_List", + "tags": [ + "Tokens" + ], + "description": "Lists all the tokens for the specified container registry.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/TokenListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "TokenList": { + "$ref": "./examples/TokenList.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens/{tokenName}": { + "get": { + "operationId": "Tokens_Get", + "tags": [ + "Tokens" + ], + "description": "Gets the properties of the specified token.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "tokenName", + "in": "path", + "description": "The name of the token.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9-]*$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/Token" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "TokenGet": { + "$ref": "./examples/TokenGet.json" + } + } + }, + "put": { + "operationId": "Tokens_Create", + "tags": [ + "Tokens" + ], + "description": "Creates a token for a container registry with the specified parameters.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "tokenName", + "in": "path", + "description": "The name of the token.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9-]*$" + }, + { + "name": "tokenCreateParameters", + "in": "body", + "description": "The parameters for creating a token.", + "required": true, + "schema": { + "$ref": "#/definitions/Token" + } + } + ], + "responses": { + "200": { + "description": "Resource 'Token' update operation succeeded", + "schema": { + "$ref": "#/definitions/Token" + } + }, + "201": { + "description": "Resource 'Token' create operation succeeded", + "schema": { + "$ref": "#/definitions/Token" + }, + "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": { + "TokenCreate": { + "$ref": "./examples/TokenCreate.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation", + "final-state-schema": "#/definitions/Token" + }, + "x-ms-long-running-operation": true + }, + "patch": { + "operationId": "Tokens_Update", + "tags": [ + "Tokens" + ], + "description": "Updates a token with the specified parameters.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "tokenName", + "in": "path", + "description": "The name of the token.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9-]*$" + }, + { + "name": "tokenUpdateParameters", + "in": "body", + "description": "The parameters for updating a token.", + "required": true, + "schema": { + "$ref": "#/definitions/TokenUpdateParameters" + } + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/Token" + } + }, + "201": { + "description": "Resource 'Token' create operation succeeded", + "schema": { + "$ref": "#/definitions/Token" + }, + "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": { + "TokenUpdate": { + "$ref": "./examples/TokenUpdate.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation", + "final-state-schema": "#/definitions/Token" + }, + "x-ms-long-running-operation": true + }, + "delete": { + "operationId": "Tokens_Delete", + "tags": [ + "Tokens" + ], + "description": "Deletes a token from a container registry.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "tokenName", + "in": "path", + "description": "The name of the token.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9-]*$" + } + ], + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "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": { + "TokenDelete": { + "$ref": "./examples/TokenDelete.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks": { + "get": { + "operationId": "Webhooks_List", + "tags": [ + "Webhooks" + ], + "description": "Lists all the webhooks for the specified container registry.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/WebhookListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "WebhookList": { + "$ref": "./examples/WebhookList.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}": { + "get": { + "operationId": "Webhooks_Get", + "tags": [ + "Webhooks" + ], + "description": "Gets the properties of the specified webhook.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "webhookName", + "in": "path", + "description": "The name of the webhook.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/Webhook" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "WebhookGet": { + "$ref": "./examples/WebhookGet.json" + } + } + }, + "put": { + "operationId": "Webhooks_Create", + "tags": [ + "Webhooks" + ], + "description": "Creates a webhook for a container registry with the specified parameters.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "webhookName", + "in": "path", + "description": "The name of the webhook.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "webhookCreateParameters", + "in": "body", + "description": "The parameters for creating a webhook.", + "required": true, + "schema": { + "$ref": "#/definitions/WebhookCreateParameters" + } + } + ], + "responses": { + "200": { + "description": "Resource 'Webhook' update operation succeeded", + "schema": { + "$ref": "#/definitions/Webhook" + } + }, + "201": { + "description": "Resource 'Webhook' create operation succeeded", + "schema": { + "$ref": "#/definitions/Webhook" + }, + "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": { + "WebhookCreate": { + "$ref": "./examples/WebhookCreate.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation", + "final-state-schema": "#/definitions/Webhook" + }, + "x-ms-long-running-operation": true + }, + "patch": { + "operationId": "Webhooks_Update", + "tags": [ + "Webhooks" + ], + "description": "Updates a webhook with the specified parameters.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "webhookName", + "in": "path", + "description": "The name of the webhook.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "webhookUpdateParameters", + "in": "body", + "description": "The parameters for updating a webhook.", + "required": true, + "schema": { + "$ref": "#/definitions/WebhookUpdateParameters" + } + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/Webhook" + } + }, + "201": { + "description": "Resource 'Webhook' create operation succeeded", + "schema": { + "$ref": "#/definitions/Webhook" + }, + "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": { + "WebhookUpdate": { + "$ref": "./examples/WebhookUpdate.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation", + "final-state-schema": "#/definitions/Webhook" + }, + "x-ms-long-running-operation": true + }, + "delete": { + "operationId": "Webhooks_Delete", + "tags": [ + "Webhooks" + ], + "description": "Deletes a webhook from a container registry.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "webhookName", + "in": "path", + "description": "The name of the webhook.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + } + ], + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "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": { + "WebhookDelete": { + "$ref": "./examples/WebhookDelete.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/getCallbackConfig": { + "post": { + "operationId": "Webhooks_GetCallbackConfig", + "tags": [ + "Webhooks" + ], + "description": "Gets the configuration of service URI and custom headers for the webhook.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "webhookName", + "in": "path", + "description": "The name of the webhook.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/CallbackConfig" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "WebhookGetCallbackConfig": { + "$ref": "./examples/WebhookGetCallbackConfig.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/listEvents": { + "post": { + "operationId": "Webhooks_ListEvents", + "tags": [ + "Webhooks" + ], + "description": "Lists recent events for the specified webhook.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "webhookName", + "in": "path", + "description": "The name of the webhook.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/EventListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "WebhookListEvents": { + "$ref": "./examples/WebhookListEvents.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/ping": { + "post": { + "operationId": "Webhooks_Ping", + "tags": [ + "Webhooks" + ], + "description": "Triggers a ping event to be sent to the webhook.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "registryName", + "in": "path", + "description": "The name of the container registry.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + { + "name": "webhookName", + "in": "path", + "description": "The name of the webhook.", + "required": true, + "type": "string", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/EventInfo" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "WebhookPing": { + "$ref": "./examples/WebhookPing.json" + } + } + } + } + }, + "definitions": { + "ActionsRequired": { + "type": "string", + "description": "A message indicating if changes on the service provider require any updates on the consumer.", + "enum": [ + "None", + "Recreate" + ], + "x-ms-enum": { + "name": "ActionsRequired", + "modelAsString": true, + "values": [ + { + "name": "None", + "value": "None" + }, + { + "name": "Recreate", + "value": "Recreate" + } + ] + } + }, + "ActivationProperties": { + "type": "object", + "description": "The activation properties of the connected registry.", + "properties": { + "status": { + "$ref": "#/definitions/ActivationStatus", + "description": "The activation status of the connected registry.", + "readOnly": true + } + } + }, + "ActivationStatus": { + "type": "string", + "description": "The activation status of the connected registry.", + "enum": [ + "Active", + "Inactive" + ], + "x-ms-enum": { + "name": "ActivationStatus", + "modelAsString": true, + "values": [ + { + "name": "Active", + "value": "Active" + }, + { + "name": "Inactive", + "value": "Inactive" + } + ] + } + }, + "Actor": { + "type": "object", + "description": "The agent that initiated the event. For most situations, this could be from the authorization context of the request.", + "properties": { + "name": { + "type": "string", + "description": "The subject or username associated with the request context that generated the event." + } + } + }, + "Archive": { + "type": "object", + "description": "An object that represents a archive for a container registry.", + "properties": { + "properties": { + "$ref": "#/definitions/ArchiveProperties", + "description": "The properties of the archive.", + "x-ms-client-flatten": true + } + }, + "allOf": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ProxyResource" + } + ] + }, + "ArchiveListResult": { + "type": "object", + "description": "The result of a request to list archives for a container registry.", + "properties": { + "value": { + "type": "array", + "description": "The list of archives. Since this list may be incomplete, the nextLink field should be used to request the next list of archives.", + "items": { + "$ref": "#/definitions/Archive" + } + }, + "nextLink": { + "type": "string", + "description": "The URI that can be used to request the next list of archives." + } + } + }, + "ArchivePackageSourceProperties": { + "type": "object", + "description": "The properties of the archive package source.", + "properties": { + "type": { + "$ref": "#/definitions/PackageSourceType", + "description": "The type of package source for a archive." + }, + "url": { + "type": "string", + "description": "The external repository url." + } + } + }, + "ArchiveProperties": { + "type": "object", + "description": "The properties of a archive.", + "properties": { + "packageSource": { + "$ref": "#/definitions/ArchivePackageSourceProperties", + "description": "The package source of the archive." + }, + "publishedVersion": { + "type": "string", + "description": "The published version of the archive." + }, + "repositoryEndpointPrefix": { + "type": "string" + }, + "repositoryEndpoint": { + "type": "string", + "readOnly": true + }, + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "The provisioning state of the archive at the time the operation was called.", + "readOnly": true + } + } + }, + "ArchiveUpdateParameters": { + "type": "object", + "description": "The parameters for updating a archive.", + "properties": { + "properties": { + "$ref": "#/definitions/ArchiveUpdateProperties", + "description": "The properties of the connected registry update parameters.", + "x-ms-client-flatten": true + } + } + }, + "ArchiveUpdateProperties": { + "type": "object", + "description": "The properties of a archive.", + "properties": { + "publishedVersion": { + "type": "string", + "description": "The published version of the archive." + } + } + }, + "ArchiveVersion": { + "type": "object", + "description": "An object that represents an export pipeline for a container registry.", + "properties": { + "properties": { + "$ref": "#/definitions/ArchiveVersionProperties", + "description": "The properties of the archive.", + "x-ms-client-flatten": true + } + }, + "allOf": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ProxyResource" + } + ] + }, + "ArchiveVersionListResult": { + "type": "object", + "description": "The result of a request to list archive versions for a container registry.", + "properties": { + "value": { + "type": "array", + "description": "The list of archive versions. Since this list may be incomplete, the nextLink field should be used to request the next list of archive versions.", + "items": { + "$ref": "#/definitions/ArchiveVersion" + } + }, + "nextLink": { + "type": "string", + "description": "The URI that can be used to request the next list of archive versions." + } + } + }, + "ArchiveVersionProperties": { + "type": "object", + "description": "The properties of an archive version.", + "properties": { + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "The provisioning state of the archive at the time the operation was called.", + "readOnly": true + }, + "archiveVersionErrorMessage": { + "type": "string", + "description": "The detailed error message for the archive version in the case of failure." + } + } + }, + "AuthCredential": { + "type": "object", + "description": "Authentication credential stored for an upstream.", + "properties": { + "name": { + "$ref": "#/definitions/CredentialName", + "description": "The name of the credential." + }, + "usernameSecretIdentifier": { + "type": "string", + "description": "KeyVault Secret URI for accessing the username." + }, + "passwordSecretIdentifier": { + "type": "string", + "description": "KeyVault Secret URI for accessing the password." + }, + "credentialHealth": { + "$ref": "#/definitions/CredentialHealth", + "description": "This provides data pertaining to the health of the auth credential.", + "readOnly": true + } + } + }, + "AzureADAuthenticationAsArmPolicy": { + "type": "object", + "description": "The policy for using Azure Resource Manager audience token for a container registry.", + "properties": { + "status": { + "type": "string", + "description": "The value that indicates whether the policy is enabled or not.", + "default": "enabled", + "enum": [ + "enabled", + "disabled" + ], + "x-ms-enum": { + "name": "AzureADAuthenticationAsArmPolicyStatus", + "modelAsString": true, + "values": [ + { + "name": "enabled", + "value": "enabled" + }, + { + "name": "disabled", + "value": "disabled" + } + ] + } + } + } + }, + "CacheRule": { + "type": "object", + "description": "An object that represents a cache rule for a container registry.", + "properties": { + "properties": { + "$ref": "#/definitions/CacheRuleProperties", + "description": "The properties of the cache rule.", + "x-ms-client-flatten": true + }, + "identity": { + "$ref": "#/definitions/IdentityProperties", + "description": "The identity of the cache rule." + } + }, + "allOf": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ProxyResource" + } + ] + }, + "CacheRuleProperties": { + "type": "object", + "description": "The properties of a cache rule.", + "properties": { + "credentialSetResourceId": { + "type": "string", + "description": "The ARM resource ID of the credential store which is associated with the cache rule." + }, + "sourceRepository": { + "type": "string", + "description": "Source repository pulled from upstream." + }, + "targetRepository": { + "type": "string", + "description": "Target repository specified in docker pull command.\nEg: docker pull myregistry.azurecr.io/{targetRepository}:{tag}" + }, + "creationDate": { + "type": "string", + "format": "date-time", + "description": "The creation date of the cache rule.", + "readOnly": true + }, + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "Provisioning state of the resource.", + "readOnly": true + } + } + }, + "CacheRuleUpdateParameters": { + "type": "object", + "description": "The parameters for updating a cache rule.", + "properties": { + "properties": { + "$ref": "#/definitions/CacheRuleUpdateProperties", + "description": "The properties of the cache rule update parameters.", + "x-ms-client-flatten": true + }, + "identity": { + "$ref": "#/definitions/IdentityProperties", + "description": "The identity of the cache rule." + } + } + }, + "CacheRuleUpdateProperties": { + "type": "object", + "description": "The parameters for updating cache rule properties.", + "properties": { + "credentialSetResourceId": { + "type": "string", + "description": "The ARM resource ID of the credential store which is associated with the Cache rule." + } + } + }, + "CacheRulesListResult": { + "type": "object", + "description": "The result of a request to list cache rules for a container registry.", + "properties": { + "value": { + "type": "array", + "description": "The list of cache rules. Since this list may be incomplete, the nextLink field should be used to request the next list of cache rules.", + "items": { + "$ref": "#/definitions/CacheRule" + } + }, + "nextLink": { + "type": "string", + "description": "The URI that can be used to request the next list of cache rules." + } + } + }, + "CallbackConfig": { + "type": "object", + "description": "The configuration of service URI and custom headers for the webhook.", + "properties": { + "serviceUri": { + "type": "string", + "description": "The service URI for the webhook to post notifications." + }, + "customHeaders": { + "type": "object", + "description": "Custom headers that will be added to the webhook notifications.", + "additionalProperties": { + "type": "string" + } + } + }, + "required": [ + "serviceUri" + ] + }, + "CertificateType": { + "type": "string", + "description": "The type of certificate location.", + "enum": [ + "LocalDirectory" + ], + "x-ms-enum": { + "name": "CertificateType", + "modelAsString": true, + "values": [ + { + "name": "LocalDirectory", + "value": "LocalDirectory" + } + ] + } + }, + "ConnectedRegistry": { + "type": "object", + "description": "An object that represents a connected registry for a container registry.", + "properties": { + "properties": { + "$ref": "#/definitions/ConnectedRegistryProperties", + "description": "The properties of the connected registry.", + "x-ms-client-flatten": true + } + }, + "allOf": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ProxyResource" + } + ] + }, + "ConnectedRegistryListResult": { + "type": "object", + "description": "The result of a request to list connected registries for a container registry.", + "properties": { + "value": { + "type": "array", + "description": "The list of connected registries. Since this list may be incomplete, the nextLink field should be used to request the next list of connected registries.", + "items": { + "$ref": "#/definitions/ConnectedRegistry" + } + }, + "nextLink": { + "type": "string", + "description": "The URI that can be used to request the next list of connected registries." + } + } + }, + "ConnectedRegistryMode": { + "type": "string", + "description": "The mode of the connected registry resource that indicates the permissions of the registry.", + "enum": [ + "ReadWrite", + "ReadOnly", + "Registry", + "Mirror" + ], + "x-ms-enum": { + "name": "ConnectedRegistryMode", + "modelAsString": true, + "values": [ + { + "name": "ReadWrite", + "value": "ReadWrite" + }, + { + "name": "ReadOnly", + "value": "ReadOnly" + }, + { + "name": "Registry", + "value": "Registry" + }, + { + "name": "Mirror", + "value": "Mirror" + } + ] + } + }, + "ConnectedRegistryProperties": { + "type": "object", + "description": "The properties of a connected registry.", + "properties": { + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "Provisioning state of the resource.", + "readOnly": true + }, + "mode": { + "$ref": "#/definitions/ConnectedRegistryMode", + "description": "The mode of the connected registry resource that indicates the permissions of the registry." + }, + "version": { + "type": "string", + "description": "The current version of ACR runtime on the connected registry.", + "readOnly": true + }, + "connectionState": { + "$ref": "#/definitions/ConnectionState", + "description": "The current connection state of the connected registry.", + "readOnly": true + }, + "lastActivityTime": { + "type": "string", + "format": "date-time", + "description": "The last activity time of the connected registry.", + "readOnly": true + }, + "activation": { + "$ref": "#/definitions/ActivationProperties", + "description": "The activation properties of the connected registry.", + "readOnly": true + }, + "parent": { + "$ref": "#/definitions/ParentProperties", + "description": "The parent of the connected registry." + }, + "clientTokenIds": { + "type": "array", + "description": "The list of the ACR token resource IDs used to authenticate clients to the connected registry.", + "items": { + "type": "string" + } + }, + "loginServer": { + "$ref": "#/definitions/LoginServerProperties", + "description": "The login server properties of the connected registry." + }, + "logging": { + "$ref": "#/definitions/LoggingProperties", + "description": "The logging properties of the connected registry." + }, + "statusDetails": { + "type": "array", + "description": "The list of current statuses of the connected registry.", + "items": { + "$ref": "#/definitions/StatusDetailProperties" + }, + "readOnly": true, + "x-ms-identifiers": [ + "correlationId" + ] + }, + "notificationsList": { + "type": "array", + "description": "The list of notifications subscription information for the connected registry.", + "items": { + "type": "string" + } + }, + "garbageCollection": { + "$ref": "#/definitions/GarbageCollectionProperties", + "description": "The garbage collection properties of the connected registry." + }, + "registrySyncResult": { + "$ref": "#/definitions/RegistrySyncResult", + "description": "The result of the connected registry's most recent sync with its parent." + } + }, + "required": [ + "mode", + "parent" + ] + }, + "ConnectedRegistryUpdateParameters": { + "type": "object", + "description": "The parameters for updating a connected registry.", + "properties": { + "properties": { + "$ref": "#/definitions/ConnectedRegistryUpdateProperties", + "description": "The properties of the connected registry update parameters.", + "x-ms-client-flatten": true + } + } + }, + "ConnectedRegistryUpdateProperties": { + "type": "object", + "description": "The parameters for updating token properties.", + "properties": { + "syncProperties": { + "$ref": "#/definitions/SyncUpdateProperties", + "description": "The sync properties of the connected registry with its parent." + }, + "logging": { + "$ref": "#/definitions/LoggingProperties", + "description": "The logging properties of the connected registry." + }, + "clientTokenIds": { + "type": "array", + "description": "The list of the ACR token resource IDs used to authenticate clients to the connected registry.", + "items": { + "type": "string" + } + }, + "notificationsList": { + "type": "array", + "description": "The list of notifications subscription information for the connected registry.", + "items": { + "type": "string" + } + }, + "garbageCollection": { + "$ref": "#/definitions/GarbageCollectionProperties", + "description": "The garbage collection properties of the connected registry." + } + } + }, + "ConnectionState": { + "type": "string", + "description": "The current connection state of the connected registry.", + "enum": [ + "Online", + "Offline", + "Syncing", + "Unhealthy" + ], + "x-ms-enum": { + "name": "ConnectionState", + "modelAsString": true, + "values": [ + { + "name": "Online", + "value": "Online" + }, + { + "name": "Offline", + "value": "Offline" + }, + { + "name": "Syncing", + "value": "Syncing" + }, + { + "name": "Unhealthy", + "value": "Unhealthy" + } + ] + } + }, + "ConnectionStatus": { + "type": "string", + "description": "The private link service connection status.", + "enum": [ + "Approved", + "Pending", + "Rejected", + "Disconnected" + ], + "x-ms-enum": { + "name": "ConnectionStatus", + "modelAsString": true, + "values": [ + { + "name": "Approved", + "value": "Approved" + }, + { + "name": "Pending", + "value": "Pending" + }, + { + "name": "Rejected", + "value": "Rejected" + }, + { + "name": "Disconnected", + "value": "Disconnected" + } + ] + } + }, + "ContainerRegistryResourceType": { + "type": "string", + "description": "The resource type for Container Registry.", + "enum": [ + "Microsoft.ContainerRegistry/registries" + ], + "x-ms-enum": { + "name": "ContainerRegistryResourceType", + "modelAsString": false + } + }, + "CredentialHealth": { + "type": "object", + "description": "The health of the auth credential.", + "properties": { + "status": { + "$ref": "#/definitions/CredentialHealthStatus", + "description": "The health status of credential." + }, + "errorCode": { + "type": "string", + "description": "Error code representing the health check error." + }, + "errorMessage": { + "type": "string", + "description": "Descriptive message representing the health check error." + } + } + }, + "CredentialHealthStatus": { + "type": "string", + "description": "The health status of credential.", + "enum": [ + "Healthy", + "Unhealthy" + ], + "x-ms-enum": { + "name": "CredentialHealthStatus", + "modelAsString": true, + "values": [ + { + "name": "Healthy", + "value": "Healthy" + }, + { + "name": "Unhealthy", + "value": "Unhealthy" + } + ] + } + }, + "CredentialName": { + "type": "string", + "description": "The name of the credential.", + "enum": [ + "Credential1" + ], + "x-ms-enum": { + "name": "CredentialName", + "modelAsString": true, + "values": [ + { + "name": "Credential1", + "value": "Credential1" + } + ] + } + }, + "CredentialSet": { + "type": "object", + "description": "An object that represents a credential set resource for a container registry.", + "properties": { + "properties": { + "$ref": "#/definitions/CredentialSetProperties", + "description": "The properties of the credential set.", + "x-ms-client-flatten": true + }, + "identity": { + "$ref": "#/definitions/IdentityProperties", + "description": "Identities associated with the resource. This is used to access the KeyVault secrets." + } + }, + "allOf": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ProxyResource" + } + ] + }, + "CredentialSetListResult": { + "type": "object", + "description": "The result of a request to list credential sets for a container registry.", + "properties": { + "value": { + "type": "array", + "description": "The list of credential sets. Since this list may be incomplete, the nextLink field should be used to request the next list of credential sets.", + "items": { + "$ref": "#/definitions/CredentialSet" + } + }, + "nextLink": { + "type": "string", + "description": "The URI that can be used to request the next list of credential sets." + } + } + }, + "CredentialSetProperties": { + "type": "object", + "description": "The properties of a credential set resource.", + "properties": { + "loginServer": { + "type": "string", + "description": "The credentials are stored for this upstream or login server." + }, + "authCredentials": { + "type": "array", + "description": "List of authentication credentials stored for an upstream.\nUsually consists of a primary and an optional secondary credential.", + "items": { + "$ref": "#/definitions/AuthCredential" + }, + "x-ms-identifiers": [ + "name" + ] + }, + "creationDate": { + "type": "string", + "format": "date-time", + "description": "The creation date of credential store resource.", + "readOnly": true + }, + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "Provisioning state of the resource.", + "readOnly": true + } + } + }, + "CredentialSetUpdateParameters": { + "type": "object", + "description": "The parameters for updating a credential set", + "properties": { + "properties": { + "$ref": "#/definitions/CredentialSetUpdateProperties", + "description": "The properties of the credential set update parameters", + "x-ms-client-flatten": true + }, + "identity": { + "$ref": "#/definitions/IdentityProperties", + "description": "Identities associated with the resource. This is used to access the KeyVault secrets." + } + } + }, + "CredentialSetUpdateProperties": { + "type": "object", + "description": "The parameters for updating credential set properties.", + "properties": { + "authCredentials": { + "type": "array", + "description": "List of authentication credentials stored for an upstream.\nUsually consists of a primary and an optional secondary credential.", + "items": { + "$ref": "#/definitions/AuthCredential" + }, + "x-ms-identifiers": [ + "name" + ] + } + } + }, + "DebianArchivePackageSourceProperties": { + "type": "object", + "description": "The properties of the archive package source.", + "properties": { + "distributionName": { + "type": "string", + "description": "Upstream Debian distribution Name." + } + }, + "allOf": [ + { + "$ref": "#/definitions/ArchivePackageSourceProperties" + } + ] + }, + "DebianArchiveProperties": { + "type": "object", + "description": "The properties of the Debian package Archive.", + "properties": { + "distributionName": { + "type": "string", + "description": "Debian distribution Name." + } + }, + "allOf": [ + { + "$ref": "#/definitions/ArchiveProperties" + } + ] + }, + "EncryptionProperty": { + "type": "object", + "properties": { + "status": { + "$ref": "#/definitions/EncryptionStatus", + "description": "Indicates whether or not the encryption is enabled for container registry." + }, + "keyVaultProperties": { + "$ref": "#/definitions/KeyVaultProperties", + "description": "Key vault properties." + } + } + }, + "EncryptionStatus": { + "type": "string", + "description": "Indicates whether or not the encryption is enabled for container registry.", + "enum": [ + "enabled", + "disabled" + ], + "x-ms-enum": { + "name": "EncryptionStatus", + "modelAsString": true, + "values": [ + { + "name": "enabled", + "value": "enabled" + }, + { + "name": "disabled", + "value": "disabled" + } + ] + } + }, + "EndpointProtocol": { + "type": "string", + "description": "The connectivity protocol for the registry.", + "enum": [ + "IPv4", + "IPv4AndIPv6" + ], + "x-ms-enum": { + "name": "EndpointProtocol", + "modelAsString": true, + "values": [ + { + "name": "IPv4", + "value": "IPv4", + "description": "IPv4 connectivity only" + }, + { + "name": "IPv4AndIPv6", + "value": "IPv4AndIPv6", + "description": "IPv4 and IPv6 (dual stack) connectivity" + } + ] + } + }, + "Event": { + "type": "object", + "description": "The event for a webhook.", + "properties": { + "eventRequestMessage": { + "$ref": "#/definitions/EventRequestMessage", + "description": "The event request message sent to the service URI." + }, + "eventResponseMessage": { + "$ref": "#/definitions/EventResponseMessage", + "description": "The event response message received from the service URI." + } + }, + "allOf": [ + { + "$ref": "#/definitions/EventInfo" + } + ] + }, + "EventContent": { + "type": "object", + "description": "The content of the event request message.", + "properties": { + "id": { + "type": "string", + "description": "The event ID." + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "The time at which the event occurred." + }, + "action": { + "type": "string", + "description": "The action that encompasses the provided event." + }, + "target": { + "$ref": "#/definitions/Target", + "description": "The target of the event." + }, + "request": { + "$ref": "#/definitions/Request", + "description": "The request that generated the event." + }, + "actor": { + "$ref": "#/definitions/Actor", + "description": "The agent that initiated the event. For most situations, this could be from the authorization context of the request." + }, + "source": { + "$ref": "#/definitions/Source", + "description": "The registry node that generated the event. Put differently, while the actor initiates the event, the source generates it." + } + } + }, + "EventInfo": { + "type": "object", + "description": "The basic information of an event.", + "properties": { + "id": { + "type": "string", + "description": "The event ID." + } + } + }, + "EventListResult": { + "type": "object", + "description": "The result of a request to list events for a webhook.", + "properties": { + "value": { + "type": "array", + "description": "The list of events. Since this list may be incomplete, the nextLink field should be used to request the next list of events.", + "items": { + "$ref": "#/definitions/Event" + } + }, + "nextLink": { + "type": "string", + "description": "The URI that can be used to request the next list of events." + } + } + }, + "EventRequestMessage": { + "type": "object", + "description": "The event request message sent to the service URI.", + "properties": { + "content": { + "$ref": "#/definitions/EventContent", + "description": "The content of the event request message." + }, + "headers": { + "type": "object", + "description": "The headers of the event request message.", + "additionalProperties": { + "type": "string" + } + }, + "method": { + "type": "string", + "description": "The HTTP method used to send the event request message." + }, + "requestUri": { + "type": "string", + "description": "The URI used to send the event request message." + }, + "version": { + "type": "string", + "description": "The HTTP message version." + } + } + }, + "EventResponseMessage": { + "type": "object", + "description": "The event response message received from the service URI.", + "properties": { + "content": { + "type": "string", + "description": "The content of the event response message." + }, + "headers": { + "type": "object", + "description": "The headers of the event response message.", + "additionalProperties": { + "type": "string" + } + }, + "reasonPhrase": { + "type": "string", + "description": "The reason phrase of the event response message." + }, + "statusCode": { + "type": "string", + "description": "The status code of the event response message." + }, + "version": { + "type": "string", + "description": "The HTTP message version." + } + } + }, + "ExportPipeline": { + "type": "object", + "description": "An object that represents an export pipeline for a container registry.", + "properties": { + "properties": { + "$ref": "#/definitions/ExportPipelineProperties", + "description": "The properties of the export pipeline.", + "x-ms-client-flatten": true + }, + "location": { + "type": "string", + "description": "The location of the export pipeline." + }, + "identity": { + "$ref": "#/definitions/IdentityProperties", + "description": "The identity of the export pipeline." + } + }, + "allOf": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ProxyResource" + } + ] + }, + "ExportPipelineListResult": { + "type": "object", + "description": "The result of a request to list export pipelines for a container registry.", + "properties": { + "value": { + "type": "array", + "description": "The list of export pipelines. Since this list may be incomplete, the nextLink field should be used to request the next list of export pipelines.", + "items": { + "$ref": "#/definitions/ExportPipeline" + } + }, + "nextLink": { + "type": "string", + "description": "The URI that can be used to request the next list of export pipelines." + } + } + }, + "ExportPipelineProperties": { + "type": "object", + "description": "The properties of an export pipeline.", + "properties": { + "target": { + "$ref": "#/definitions/ExportPipelineTargetProperties", + "description": "The target properties of the export pipeline." + }, + "options": { + "type": "array", + "description": "The list of all options configured for the pipeline.", + "items": { + "$ref": "#/definitions/PipelineOptions" + } + }, + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "The provisioning state of the pipeline at the time the operation was called.", + "readOnly": true + } + }, + "required": [ + "target" + ] + }, + "ExportPipelineTargetProperties": { + "type": "object", + "description": "The properties of the export pipeline target.", + "properties": { + "type": { + "type": "string", + "description": "The type of target for the export pipeline." + }, + "uri": { + "type": "string", + "description": "The target uri of the export pipeline.\nWhen 'AzureStorageBlob': \"https://accountName.blob.core.windows.net/containerName/blobName\"\nWhen 'AzureStorageBlobContainer': \"https://accountName.blob.core.windows.net/containerName\"" + }, + "keyVaultUri": { + "type": "string", + "description": "They key vault secret uri to obtain the target storage SAS token." + }, + "storageAccessMode": { + "type": "string", + "description": "The storage access mode used for the customer storage account.", + "default": "SasToken", + "enum": [ + "ManagedIdentity", + "SasToken" + ], + "x-ms-enum": { + "name": "StorageAccessMode", + "modelAsString": true, + "values": [ + { + "name": "ManagedIdentity", + "value": "ManagedIdentity", + "description": "Managed Identity access mode" + }, + { + "name": "SasToken", + "value": "SasToken", + "description": "SAS Token access mode" + } + ] + } + } + } + }, + "ExportPolicy": { + "type": "object", + "description": "The export policy for a container registry.", + "properties": { + "status": { + "type": "string", + "description": "The value that indicates whether the policy is enabled or not.", + "default": "enabled", + "enum": [ + "enabled", + "disabled" + ], + "x-ms-enum": { + "name": "ExportPolicyStatus", + "modelAsString": true, + "values": [ + { + "name": "enabled", + "value": "enabled" + }, + { + "name": "disabled", + "value": "disabled" + } + ] + } + } + } + }, + "GarbageCollectionProperties": { + "type": "object", + "description": "The garbage collection properties of the connected registry.", + "properties": { + "enabled": { + "type": "boolean", + "description": "Indicates whether garbage collection is enabled for the connected registry." + }, + "schedule": { + "type": "string", + "description": "The cron expression indicating the schedule that the connected registry will run garbage collection." + } + } + }, + "GenerateCredentialsParameters": { + "type": "object", + "description": "The parameters used to generate credentials for a specified token or user of a container registry.", + "properties": { + "tokenId": { + "type": "string", + "description": "The resource ID of the token for which credentials have to be generated." + }, + "expiry": { + "type": "string", + "format": "date-time", + "description": "The expiry date of the generated credentials after which the credentials become invalid." + }, + "name": { + "$ref": "#/definitions/TokenPasswordName", + "description": "Specifies name of the password which should be regenerated if any -- password1 or password2." + } + } + }, + "GenerateCredentialsResult": { + "type": "object", + "description": "The response from the GenerateCredentials operation.", + "properties": { + "username": { + "type": "string", + "description": "The username for a container registry." + }, + "passwords": { + "type": "array", + "description": "The list of passwords for a container registry.", + "items": { + "$ref": "#/definitions/TokenPassword" + }, + "x-ms-identifiers": [] + } + } + }, + "IPRule": { + "type": "object", + "description": "IP rule with specific IP or IP range in CIDR format.", + "properties": { + "action": { + "type": "string", + "description": "The action of IP ACL rule.", + "default": "Allow", + "enum": [ + "Allow" + ], + "x-ms-enum": { + "name": "Action", + "modelAsString": true, + "values": [ + { + "name": "Allow", + "value": "Allow" + } + ] + } + }, + "value": { + "type": "string", + "description": "Specifies the IP or IP range in CIDR format. Only IPV4 address is allowed.", + "x-ms-client-name": "IPAddressOrRange" + } + }, + "required": [ + "value" + ] + }, + "IdentityProperties": { + "type": "object", + "description": "Managed identity for the resource.", + "properties": { + "principalId": { + "type": "string", + "description": "The principal ID of resource identity.", + "readOnly": true + }, + "tenantId": { + "type": "string", + "description": "The tenant ID of resource.", + "readOnly": true + }, + "type": { + "$ref": "#/definitions/ResourceIdentityType", + "description": "The identity type." + }, + "userAssignedIdentities": { + "type": "object", + "description": "The list of user identities associated with the resource. The user identity\ndictionary key references will be ARM resource ids in the form:\n'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/\nproviders/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.", + "additionalProperties": { + "$ref": "#/definitions/UserIdentityProperties" + } + } + } + }, + "ImportImageParameters": { + "type": "object", + "properties": { + "source": { + "$ref": "#/definitions/ImportSource", + "description": "The source of the image." + }, + "targetTags": { + "type": "array", + "description": "List of strings of the form repo[:tag]. When tag is omitted the source will be used (or 'latest' if source tag is also omitted).", + "items": { + "type": "string" + } + }, + "untaggedTargetRepositories": { + "type": "array", + "description": "List of strings of repository names to do a manifest only copy. No tag will be created.", + "items": { + "type": "string" + } + }, + "mode": { + "type": "string", + "description": "When Force, any existing target tags will be overwritten. When NoForce, any existing target tags will fail the operation before any copying begins.", + "default": "NoForce", + "enum": [ + "NoForce", + "Force" + ], + "x-ms-enum": { + "name": "ImportMode", + "modelAsString": true, + "values": [ + { + "name": "NoForce", + "value": "NoForce" + }, + { + "name": "Force", + "value": "Force" + } + ] + } + } + }, + "required": [ + "source" + ] + }, + "ImportPipeline": { + "type": "object", + "description": "An object that represents an import pipeline for a container registry.", + "properties": { + "properties": { + "$ref": "#/definitions/ImportPipelineProperties", + "description": "The properties of the import pipeline.", + "x-ms-client-flatten": true + }, + "location": { + "type": "string", + "description": "The location of the import pipeline." + }, + "identity": { + "$ref": "#/definitions/IdentityProperties", + "description": "The identity of the import pipeline." + } + }, + "allOf": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ProxyResource" + } + ] + }, + "ImportPipelineListResult": { + "type": "object", + "description": "The result of a request to list import pipelines for a container registry.", + "properties": { + "value": { + "type": "array", + "description": "The list of import pipelines. Since this list may be incomplete, the nextLink field should be used to request the next list of import pipelines.", + "items": { + "$ref": "#/definitions/ImportPipeline" + } + }, + "nextLink": { + "type": "string", + "description": "The URI that can be used to request the next list of import pipelines." + } + } + }, + "ImportPipelineProperties": { + "type": "object", + "description": "The properties of an import pipeline.", + "properties": { + "source": { + "$ref": "#/definitions/ImportPipelineSourceProperties", + "description": "The source properties of the import pipeline." + }, + "trigger": { + "$ref": "#/definitions/PipelineTriggerProperties", + "description": "The properties that describe the trigger of the import pipeline." + }, + "options": { + "type": "array", + "description": "The list of all options configured for the pipeline.", + "items": { + "$ref": "#/definitions/PipelineOptions" + } + }, + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "The provisioning state of the pipeline at the time the operation was called.", + "readOnly": true + } + }, + "required": [ + "source" + ] + }, + "ImportPipelineSourceProperties": { + "type": "object", + "description": "The properties of the import pipeline source.", + "properties": { + "type": { + "type": "string", + "description": "The type of source for the import pipeline.", + "default": "AzureStorageBlobContainer", + "enum": [ + "AzureStorageBlobContainer" + ], + "x-ms-enum": { + "name": "PipelineSourceType", + "modelAsString": true, + "values": [ + { + "name": "AzureStorageBlobContainer", + "value": "AzureStorageBlobContainer" + } + ] + } + }, + "uri": { + "type": "string", + "description": "The source uri of the import pipeline.\nWhen 'AzureStorageBlob': \"https://accountName.blob.core.windows.net/containerName/blobName\"\nWhen 'AzureStorageBlobContainer': \"https://accountName.blob.core.windows.net/containerName\"" + }, + "keyVaultUri": { + "type": "string", + "description": "They key vault secret uri to obtain the source storage SAS token." + }, + "storageAccessMode": { + "type": "string", + "description": "The storage access mode used for the customer storage account.", + "default": "SasToken", + "enum": [ + "ManagedIdentity", + "SasToken" + ], + "x-ms-enum": { + "name": "StorageAccessMode", + "modelAsString": true, + "values": [ + { + "name": "ManagedIdentity", + "value": "ManagedIdentity", + "description": "Managed Identity access mode" + }, + { + "name": "SasToken", + "value": "SasToken", + "description": "SAS Token access mode" + } + ] + } + } + } + }, + "ImportSource": { + "type": "object", + "properties": { + "resourceId": { + "type": "string", + "description": "The resource identifier of the source Azure Container Registry." + }, + "registryUri": { + "type": "string", + "description": "The address of the source registry (e.g. 'mcr.microsoft.com')." + }, + "credentials": { + "$ref": "#/definitions/ImportSourceCredentials", + "description": "Credentials used when importing from a registry uri." + }, + "sourceImage": { + "type": "string", + "description": "Repository name of the source image.\nSpecify an image by repository ('hello-world'). This will use the 'latest' tag.\nSpecify an image by tag ('hello-world:latest').\nSpecify an image by sha256-based manifest digest ('hello-world@sha256:abc123')." + } + }, + "required": [ + "sourceImage" + ] + }, + "ImportSourceCredentials": { + "type": "object", + "properties": { + "username": { + "type": "string", + "description": "The username to authenticate with the source registry." + }, + "password": { + "type": "string", + "description": "The password used to authenticate with the source registry." + } + }, + "required": [ + "password" + ] + }, + "KeyVaultProperties": { + "type": "object", + "properties": { + "keyIdentifier": { + "type": "string", + "description": "Key vault uri to access the encryption key." + }, + "versionedKeyIdentifier": { + "type": "string", + "description": "The fully qualified key identifier that includes the version of the key that is actually used for encryption.", + "readOnly": true + }, + "identity": { + "type": "string", + "description": "The client id of the identity which will be used to access key vault." + }, + "keyRotationEnabled": { + "type": "boolean", + "description": "Auto key rotation status for a CMK enabled registry.", + "readOnly": true + }, + "lastKeyRotationTimestamp": { + "type": "string", + "format": "date-time", + "description": "Timestamp of the last successful key rotation.", + "readOnly": true + } + } + }, + "LoggingProperties": { + "type": "object", + "description": "The logging properties of the connected registry.", + "properties": { + "logLevel": { + "type": "string", + "description": "The verbosity of logs persisted on the connected registry.", + "default": "Information", + "enum": [ + "Debug", + "Information", + "Warning", + "Error", + "None" + ], + "x-ms-enum": { + "name": "LogLevel", + "modelAsString": true, + "values": [ + { + "name": "Debug", + "value": "Debug" + }, + { + "name": "Information", + "value": "Information" + }, + { + "name": "Warning", + "value": "Warning" + }, + { + "name": "Error", + "value": "Error" + }, + { + "name": "None", + "value": "None" + } + ] + } + }, + "auditLogStatus": { + "type": "string", + "description": "Indicates whether audit logs are enabled on the connected registry.", + "default": "Disabled", + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "AuditLogStatus", + "modelAsString": true, + "values": [ + { + "name": "Enabled", + "value": "Enabled" + }, + { + "name": "Disabled", + "value": "Disabled" + } + ] + } + } + } + }, + "LoginServerProperties": { + "type": "object", + "description": "The login server properties of the connected registry.", + "properties": { + "host": { + "type": "string", + "description": "The host of the connected registry. Can be FQDN or IP.", + "readOnly": true + }, + "tls": { + "$ref": "#/definitions/TlsProperties", + "description": "The TLS properties of the connected registry login server.", + "readOnly": true + } + } + }, + "NetworkRuleSet": { + "type": "object", + "description": "The network rule set for a container registry.", + "properties": { + "defaultAction": { + "type": "string", + "description": "The default action of allow or deny when no other rules match.", + "default": "Allow", + "enum": [ + "Allow", + "Deny" + ], + "x-ms-enum": { + "name": "DefaultAction", + "modelAsString": true, + "values": [ + { + "name": "Allow", + "value": "Allow" + }, + { + "name": "Deny", + "value": "Deny" + } + ] + } + }, + "ipRules": { + "type": "array", + "description": "The IP ACL rules.", + "items": { + "$ref": "#/definitions/IPRule" + }, + "x-ms-identifiers": [] + } + }, + "required": [ + "defaultAction" + ] + }, + "OperationDefinition": { + "type": "object", + "description": "The definition of a container registry operation.", + "properties": { + "origin": { + "type": "string", + "description": "The origin information of the container registry operation." + }, + "name": { + "type": "string", + "description": "Operation name: {provider}/{resource}/{operation}." + }, + "display": { + "$ref": "#/definitions/OperationDisplayDefinition", + "description": "The display information for the container registry operation." + }, + "properties": { + "$ref": "#/definitions/OperationPropertiesDefinition", + "description": "The properties information for the container registry operation.", + "x-ms-client-flatten": true + }, + "isDataAction": { + "type": "boolean", + "description": "This property indicates if the operation is an action or a data action\nref: https://docs.microsoft.com/en-us/azure/role-based-access-control/role-definitions#management-and-data-operations" + } + } + }, + "OperationDisplayDefinition": { + "type": "object", + "description": "The display information for a container registry operation.", + "properties": { + "provider": { + "type": "string", + "description": "The resource provider name: Microsoft.ContainerRegistry." + }, + "resource": { + "type": "string", + "description": "The resource on which the operation is performed." + }, + "operation": { + "type": "string", + "description": "The operation that users can perform." + }, + "description": { + "type": "string", + "description": "The description for the operation." + } + } + }, + "OperationListResult": { + "type": "object", + "description": "The result of a request to list container registry operations.", + "properties": { + "value": { + "type": "array", + "description": "The list of container registry operations. Since this list may be incomplete, the nextLink field should be used to request the next list of operations.", + "items": { + "$ref": "#/definitions/OperationDefinition" + } + }, + "nextLink": { + "type": "string", + "description": "The URI that can be used to request the next list of container registry operations." + } + } + }, + "OperationLogSpecificationDefinition": { + "type": "object", + "description": "The definition of Azure Monitoring log.", + "properties": { + "name": { + "type": "string", + "description": "Log name." + }, + "displayName": { + "type": "string", + "description": "Log display name." + }, + "blobDuration": { + "type": "string", + "description": "Log blob duration." + } + } + }, + "OperationMetricSpecificationDefinition": { + "type": "object", + "description": "The definition of Azure Monitoring metric.", + "properties": { + "name": { + "type": "string", + "description": "Metric name." + }, + "displayName": { + "type": "string", + "description": "Metric display name." + }, + "displayDescription": { + "type": "string", + "description": "Metric description." + }, + "unit": { + "type": "string", + "description": "Metric unit." + }, + "aggregationType": { + "type": "string", + "description": "Metric aggregation type." + }, + "internalMetricName": { + "type": "string", + "description": "Internal metric name." + } + } + }, + "OperationPropertiesDefinition": { + "type": "object", + "description": "The definition of Azure Monitoring properties.", + "properties": { + "serviceSpecification": { + "$ref": "#/definitions/OperationServiceSpecificationDefinition", + "description": "The definition of Azure Monitoring service." + } + } + }, + "OperationServiceSpecificationDefinition": { + "type": "object", + "description": "The definition of Azure Monitoring list.", + "properties": { + "metricSpecifications": { + "type": "array", + "description": "A list of Azure Monitoring metrics definition.", + "items": { + "$ref": "#/definitions/OperationMetricSpecificationDefinition" + }, + "x-ms-identifiers": [ + "name" + ] + }, + "logSpecifications": { + "type": "array", + "description": "A list of Azure Monitoring log definitions.", + "items": { + "$ref": "#/definitions/OperationLogSpecificationDefinition" + }, + "x-ms-identifiers": [ + "name" + ] + } + } + }, + "PackageSourceType": { + "type": "string", + "description": "The type of package source for a archive.", + "enum": [ + "remote" + ], + "x-ms-enum": { + "name": "PackageSourceType", + "modelAsString": true, + "values": [ + { + "name": "remote", + "value": "remote" + } + ] + } + }, + "ParentProperties": { + "type": "object", + "description": "The properties of the connected registry parent.", + "properties": { + "id": { + "type": "string", + "format": "arm-id", + "description": "The resource ID of the parent to which the connected registry will be associated." + }, + "syncProperties": { + "$ref": "#/definitions/SyncProperties", + "description": "The sync properties of the connected registry with its parent." + } + }, + "required": [ + "syncProperties" + ] + }, + "PasswordName": { + "type": "string", + "description": "The password name.", + "enum": [ + "password", + "password2" + ], + "x-ms-enum": { + "name": "PasswordName", + "modelAsString": false + } + }, + "PipelineOptions": { + "type": "string", + "enum": [ + "OverwriteTags", + "OverwriteBlobs", + "DeleteSourceBlobOnSuccess", + "ContinueOnErrors" + ], + "x-ms-enum": { + "name": "PipelineOptions", + "modelAsString": true, + "values": [ + { + "name": "OverwriteTags", + "value": "OverwriteTags" + }, + { + "name": "OverwriteBlobs", + "value": "OverwriteBlobs" + }, + { + "name": "DeleteSourceBlobOnSuccess", + "value": "DeleteSourceBlobOnSuccess" + }, + { + "name": "ContinueOnErrors", + "value": "ContinueOnErrors" + } + ] + } + }, + "PipelineRun": { + "type": "object", + "description": "An object that represents a pipeline run for a container registry.", + "properties": { + "properties": { + "$ref": "#/definitions/PipelineRunProperties", + "description": "The properties of a pipeline run.", + "x-ms-client-flatten": true + } + }, + "allOf": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ProxyResource" + } + ] + }, + "PipelineRunListResult": { + "type": "object", + "description": "The result of a request to list pipeline runs for a container registry.", + "properties": { + "value": { + "type": "array", + "description": "The list of pipeline runs. Since this list may be incomplete, the nextLink field should be used to request the next list of pipeline runs.", + "items": { + "$ref": "#/definitions/PipelineRun" + } + }, + "nextLink": { + "type": "string", + "description": "The URI that can be used to request the next list of pipeline runs." + } + } + }, + "PipelineRunProperties": { + "type": "object", + "description": "The properties of a pipeline run.", + "properties": { + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "The provisioning state of a pipeline run.", + "readOnly": true + }, + "request": { + "$ref": "#/definitions/PipelineRunRequest", + "description": "The request parameters for a pipeline run." + }, + "response": { + "$ref": "#/definitions/PipelineRunResponse", + "description": "The response of a pipeline run.", + "readOnly": true + }, + "forceUpdateTag": { + "type": "string", + "description": "How the pipeline run should be forced to recreate even if the pipeline run configuration has not changed." + } + } + }, + "PipelineRunRequest": { + "type": "object", + "description": "The request properties provided for a pipeline run.", + "properties": { + "pipelineResourceId": { + "type": "string", + "description": "The resource ID of the pipeline to run." + }, + "artifacts": { + "type": "array", + "description": "List of source artifacts to be transferred by the pipeline. \nSpecify an image by repository ('hello-world'). This will use the 'latest' tag.\nSpecify an image by tag ('hello-world:latest').\nSpecify an image by sha256-based manifest digest ('hello-world@sha256:abc123').", + "items": { + "type": "string" + } + }, + "source": { + "$ref": "#/definitions/PipelineRunSourceProperties", + "description": "The source properties of the pipeline run." + }, + "target": { + "$ref": "#/definitions/PipelineRunTargetProperties", + "description": "The target properties of the pipeline run." + }, + "catalogDigest": { + "type": "string", + "description": "The digest of the tar used to transfer the artifacts." + } + } + }, + "PipelineRunResponse": { + "type": "object", + "description": "The response properties returned for a pipeline run.", + "properties": { + "status": { + "type": "string", + "description": "The current status of the pipeline run." + }, + "importedArtifacts": { + "type": "array", + "description": "The artifacts imported in the pipeline run.", + "items": { + "type": "string" + } + }, + "progress": { + "$ref": "#/definitions/ProgressProperties", + "description": "The current progress of the copy operation." + }, + "startTime": { + "type": "string", + "format": "date-time", + "description": "The time the pipeline run started." + }, + "finishTime": { + "type": "string", + "format": "date-time", + "description": "The time the pipeline run finished." + }, + "source": { + "$ref": "#/definitions/ImportPipelineSourceProperties", + "description": "The source of the pipeline run." + }, + "target": { + "$ref": "#/definitions/ExportPipelineTargetProperties", + "description": "The target of the pipeline run." + }, + "catalogDigest": { + "type": "string", + "description": "The digest of the tar used to transfer the artifacts." + }, + "trigger": { + "$ref": "#/definitions/PipelineTriggerDescriptor", + "description": "The trigger that caused the pipeline run." + }, + "pipelineRunErrorMessage": { + "type": "string", + "description": "The detailed error message for the pipeline run in the case of failure." + } + } + }, + "PipelineRunSourceProperties": { + "type": "object", + "description": "The pipeline run source properties", + "properties": { + "type": { + "type": "string", + "description": "The type of the source.", + "default": "AzureStorageBlob", + "enum": [ + "AzureStorageBlob" + ], + "x-ms-enum": { + "name": "PipelineRunSourceType", + "modelAsString": true, + "values": [ + { + "name": "AzureStorageBlob", + "value": "AzureStorageBlob" + } + ] + } + }, + "name": { + "type": "string", + "description": "The name of the source." + } + } + }, + "PipelineRunTargetProperties": { + "type": "object", + "description": "The pipeline run target properties", + "properties": { + "type": { + "type": "string", + "description": "The type of the target.", + "default": "AzureStorageBlob", + "enum": [ + "AzureStorageBlob" + ], + "x-ms-enum": { + "name": "PipelineRunTargetType", + "modelAsString": true, + "values": [ + { + "name": "AzureStorageBlob", + "value": "AzureStorageBlob" + } + ] + } + }, + "name": { + "type": "string", + "description": "The name of the target." + } + } + }, + "PipelineSourceTriggerDescriptor": { + "type": "object", + "description": "The pipeline source trigger descriptor.", + "properties": { + "timestamp": { + "type": "string", + "format": "date-time", + "description": "The timestamp when the source update happened." + } + } + }, + "PipelineSourceTriggerProperties": { + "type": "object", + "description": "The source trigger properties of the import pipeline", + "properties": { + "status": { + "type": "string", + "description": "The current status of the source trigger.", + "default": "Enabled", + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "TriggerStatus", + "modelAsString": true, + "values": [ + { + "name": "Enabled", + "value": "Enabled" + }, + { + "name": "Disabled", + "value": "Disabled" + } + ] + } + } + }, + "required": [ + "status" + ] + }, + "PipelineTriggerDescriptor": { + "type": "object", + "description": "The pipeline trigger descriptor", + "properties": { + "sourceTrigger": { + "$ref": "#/definitions/PipelineSourceTriggerDescriptor", + "description": "The source trigger that caused the pipeline run." + } + } + }, + "PipelineTriggerProperties": { + "type": "object", + "description": "The trigger properties of the import pipeline", + "properties": { + "sourceTrigger": { + "$ref": "#/definitions/PipelineSourceTriggerProperties", + "description": "The source trigger properties of the pipeline." + } + } + }, + "Policies": { + "type": "object", + "description": "The policies for a container registry.", + "properties": { + "quarantinePolicy": { + "$ref": "#/definitions/QuarantinePolicy", + "description": "The quarantine policy for a container registry." + }, + "trustPolicy": { + "$ref": "#/definitions/TrustPolicy", + "description": "The content trust policy for a container registry." + }, + "retentionPolicy": { + "$ref": "#/definitions/RetentionPolicy", + "description": "The retention policy for a container registry." + }, + "exportPolicy": { + "$ref": "#/definitions/ExportPolicy", + "description": "The export policy for a container registry." + }, + "azureADAuthenticationAsArmPolicy": { + "$ref": "#/definitions/AzureADAuthenticationAsArmPolicy", + "description": "The policy for using Azure Resource Manager audience token for a container registry." + }, + "softDeletePolicy": { + "$ref": "#/definitions/SoftDeletePolicy", + "description": "The soft delete policy for a container registry." + } + } + }, + "PrivateEndpoint": { + "type": "object", + "description": "The Private Endpoint resource.", + "properties": { + "id": { + "type": "string", + "description": "This is private endpoint resource created with Microsoft.Network resource provider." + } + } + }, + "PrivateEndpointConnection": { + "type": "object", + "description": "An object that represents a private endpoint connection for a container registry.", + "properties": { + "properties": { + "$ref": "#/definitions/PrivateEndpointConnectionProperties", + "description": "The properties of a private endpoint connection.", + "x-ms-client-flatten": true + } + }, + "allOf": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ProxyResource" + } + ] + }, + "PrivateEndpointConnectionListResult": { + "type": "object", + "description": "The result of a request to list private endpoint connections for a container registry.", + "properties": { + "value": { + "type": "array", + "description": "The list of private endpoint connections. Since this list may be incomplete, the nextLink field should be used to request the next list of private endpoint connections.", + "items": { + "$ref": "#/definitions/PrivateEndpointConnection" + } + }, + "nextLink": { + "type": "string", + "description": "The URI that can be used to request the next list of private endpoint connections." + } + } + }, + "PrivateEndpointConnectionProperties": { + "type": "object", + "description": "The properties of a private endpoint connection.", + "properties": { + "privateEndpoint": { + "$ref": "#/definitions/PrivateEndpoint", + "description": "The resource of private endpoint." + }, + "privateLinkServiceConnectionState": { + "$ref": "#/definitions/PrivateLinkServiceConnectionState", + "description": "A collection of information about the state of the connection between service consumer and provider." + }, + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "The provisioning state of private endpoint connection resource.", + "readOnly": true + } + } + }, + "PrivateLinkResourceListResult": { + "type": "object", + "description": "The result of a request to list private link resources for a container registry.", + "properties": { + "value": { + "type": "array", + "description": "The list of private link resources. Since this list may be incomplete, the nextLink field should be used to request the next list of private link resources.", + "items": { + "$ref": "../../../../../../common-types/resource-management/v6/privatelinks.json#/definitions/PrivateLinkResource" + } + }, + "nextLink": { + "type": "string", + "description": "The URI that can be used to request the next list of private link resources." + } + } + }, + "PrivateLinkServiceConnectionState": { + "type": "object", + "description": "The state of a private link service connection.", + "properties": { + "status": { + "$ref": "#/definitions/ConnectionStatus", + "description": "The private link service connection status." + }, + "description": { + "type": "string", + "description": "The description for connection status. For example if connection is rejected it can indicate reason for rejection." + }, + "actionsRequired": { + "$ref": "#/definitions/ActionsRequired", + "description": "A message indicating if changes on the service provider require any updates on the consumer." + } + } + }, + "ProgressProperties": { + "type": "object", + "description": "The progress properties.", + "properties": { + "percentage": { + "type": "string", + "description": "The percentage complete of the copy operation." + } + } + }, + "ProvisioningState": { + "type": "string", + "description": "The provisioning state of the archive at the time the operation was called.", + "enum": [ + "Creating", + "Updating", + "Deleting", + "Succeeded", + "Failed", + "Canceled" + ], + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": true, + "values": [ + { + "name": "Creating", + "value": "Creating" + }, + { + "name": "Updating", + "value": "Updating" + }, + { + "name": "Deleting", + "value": "Deleting" + }, + { + "name": "Succeeded", + "value": "Succeeded" + }, + { + "name": "Failed", + "value": "Failed" + }, + { + "name": "Canceled", + "value": "Canceled" + } + ] + } + }, + "PublicNetworkAccess": { + "type": "string", + "description": "Whether or not public network access is allowed for the container registry.", + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "PublicNetworkAccess", + "modelAsString": true, + "values": [ + { + "name": "Enabled", + "value": "Enabled" + }, + { + "name": "Disabled", + "value": "Disabled" + } + ] + } + }, + "QuarantinePolicy": { + "type": "object", + "description": "The quarantine policy for a container registry.", + "properties": { + "status": { + "type": "string", + "description": "The value that indicates whether the policy is enabled or not.", + "default": "disabled", + "enum": [ + "enabled", + "disabled" + ], + "x-ms-enum": { + "name": "PolicyStatus", + "modelAsString": true, + "values": [ + { + "name": "enabled", + "value": "enabled" + }, + { + "name": "disabled", + "value": "disabled" + } + ] + } + } + } + }, + "RegenerateCredentialParameters": { + "type": "object", + "description": "The parameters used to regenerate the login credential.", + "properties": { + "name": { + "$ref": "#/definitions/PasswordName", + "description": "Specifies name of the password which should be regenerated -- password or password2." + } + }, + "required": [ + "name" + ] + }, + "RegionalEndpoints": { + "type": "string", + "description": "Whether or not per-region endpoints are enabled for accessing the registry.", + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "RegionalEndpoints", + "modelAsString": true, + "values": [ + { + "name": "Enabled", + "value": "Enabled", + "description": "Regional endpoints are enabled." + }, + { + "name": "Disabled", + "value": "Disabled", + "description": "Regional endpoints are disabled." + } + ] + } + }, + "Registry": { + "type": "object", + "description": "An object that represents a container registry.", + "properties": { + "properties": { + "$ref": "#/definitions/RegistryProperties", + "description": "The properties of the container registry.", + "x-ms-client-flatten": true + }, + "sku": { + "$ref": "#/definitions/Sku", + "description": "The SKU of the container registry." + }, + "identity": { + "$ref": "#/definitions/IdentityProperties", + "description": "The identity of the container registry." + } + }, + "required": [ + "sku" + ], + "allOf": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/TrackedResource" + } + ] + }, + "RegistryListCredentialsResult": { + "type": "object", + "description": "The response from the ListCredentials operation.", + "properties": { + "username": { + "type": "string", + "description": "The username for a container registry." + }, + "passwords": { + "type": "array", + "description": "The list of passwords for a container registry.", + "items": { + "$ref": "#/definitions/RegistryPassword" + }, + "x-ms-identifiers": [] + } + } + }, + "RegistryListResult": { + "type": "object", + "description": "The result of a request to list container registries.", + "properties": { + "value": { + "type": "array", + "description": "The list of container registries. Since this list may be incomplete, the nextLink field should be used to request the next list of container registries.", + "items": { + "$ref": "#/definitions/Registry" + } + }, + "nextLink": { + "type": "string", + "description": "The URI that can be used to request the next list of container registries." + } + } + }, + "RegistryNameCheckRequest": { + "type": "object", + "description": "A request to check whether a container registry name is available.", + "properties": { + "name": { + "type": "string", + "description": "The name of the container registry.", + "minLength": 5, + "maxLength": 50, + "pattern": "^[a-zA-Z0-9]*$" + }, + "type": { + "$ref": "#/definitions/ContainerRegistryResourceType", + "description": "The resource type of the container registry. This field must be set to 'Microsoft.ContainerRegistry/registries'." + }, + "resourceGroupName": { + "type": "string", + "description": "The resource group name of the container registry.", + "minLength": 1, + "maxLength": 90 + }, + "autoGeneratedDomainNameLabelScope": { + "type": "string", + "description": "The auto generated domain name label of the container registry. This value defaults to \"Unsecure\".", + "default": "Unsecure", + "enum": [ + "Unsecure", + "TenantReuse", + "SubscriptionReuse", + "ResourceGroupReuse", + "NoReuse" + ], + "x-ms-enum": { + "name": "AutoGeneratedDomainNameLabelScope", + "modelAsString": true, + "values": [ + { + "name": "Unsecure", + "value": "Unsecure" + }, + { + "name": "TenantReuse", + "value": "TenantReuse" + }, + { + "name": "SubscriptionReuse", + "value": "SubscriptionReuse" + }, + { + "name": "ResourceGroupReuse", + "value": "ResourceGroupReuse" + }, + { + "name": "NoReuse", + "value": "NoReuse" + } + ] + } + } + }, + "required": [ + "name", + "type" + ] + }, + "RegistryNameStatus": { + "type": "object", + "description": "The result of a request to check the availability of a container registry name.", + "properties": { + "availableLoginServerName": { + "type": "string", + "description": "The complete login server name with domain name label (DNL) hash, if available" + }, + "nameAvailable": { + "type": "boolean", + "description": "The value that indicates whether the name is available." + }, + "reason": { + "type": "string", + "description": "If any, the reason that the name is not available." + }, + "message": { + "type": "string", + "description": "If any, the error message that provides more detail for the reason that the name is not available." + } + } + }, + "RegistryPassword": { + "type": "object", + "description": "The login password for the container registry.", + "properties": { + "name": { + "$ref": "#/definitions/PasswordName", + "description": "The password name." + }, + "value": { + "type": "string", + "description": "The password value." + } + } + }, + "RegistryProperties": { + "type": "object", + "description": "The properties of a container registry.", + "properties": { + "loginServer": { + "type": "string", + "description": "The URL that can be used to log into the container registry.", + "readOnly": true + }, + "creationDate": { + "type": "string", + "format": "date-time", + "description": "The creation date of the container registry in ISO8601 format.", + "readOnly": true + }, + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "The provisioning state of the container registry at the time the operation was called.", + "readOnly": true + }, + "status": { + "$ref": "#/definitions/Status", + "description": "The status of the container registry at the time the operation was called.", + "readOnly": true + }, + "adminUserEnabled": { + "type": "boolean", + "description": "The value that indicates whether the admin user is enabled.", + "default": false + }, + "networkRuleSet": { + "$ref": "#/definitions/NetworkRuleSet", + "description": "The network rule set for a container registry." + }, + "policies": { + "$ref": "#/definitions/Policies", + "description": "The policies for a container registry." + }, + "encryption": { + "$ref": "#/definitions/EncryptionProperty", + "description": "The encryption settings of container registry." + }, + "dataEndpointEnabled": { + "type": "boolean", + "description": "Enable a single data endpoint per region for serving data." + }, + "dataEndpointHostNames": { + "type": "array", + "description": "List of host names that will serve data when dataEndpointEnabled is true.", + "items": { + "type": "string" + }, + "readOnly": true + }, + "regionalEndpoints": { + "type": "string", + "description": "Enable per-region endpoints for accessing registry.", + "default": "Disabled", + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "RegionalEndpoints", + "modelAsString": true, + "values": [ + { + "name": "Enabled", + "value": "Enabled", + "description": "Regional endpoints are enabled." + }, + { + "name": "Disabled", + "value": "Disabled", + "description": "Regional endpoints are disabled." + } + ] + } + }, + "regionalEndpointHostNames": { + "type": "array", + "description": "List of host names that will serve registry when RegionalEndpoints is enabled.", + "items": { + "type": "string" + }, + "readOnly": true + }, + "endpointProtocol": { + "$ref": "#/definitions/EndpointProtocol", + "description": "The connectivity protocol for the registry, such as IPv4 or dual stack (IPv4 and IPv6)." + }, + "privateEndpointConnections": { + "type": "array", + "description": "List of private endpoint connections for a container registry.", + "items": { + "$ref": "#/definitions/PrivateEndpointConnection" + }, + "readOnly": true + }, + "publicNetworkAccess": { + "type": "string", + "description": "Whether or not public network access is allowed for the container registry.", + "default": "Enabled", + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "PublicNetworkAccess", + "modelAsString": true, + "values": [ + { + "name": "Enabled", + "value": "Enabled" + }, + { + "name": "Disabled", + "value": "Disabled" + } + ] + } + }, + "networkRuleBypassOptions": { + "type": "string", + "description": "Whether to allow trusted Azure services to access a network restricted registry.", + "default": "AzureServices", + "enum": [ + "AzureServices", + "None" + ], + "x-ms-enum": { + "name": "NetworkRuleBypassOptions", + "modelAsString": true, + "values": [ + { + "name": "AzureServices", + "value": "AzureServices" + }, + { + "name": "None", + "value": "None" + } + ] + } + }, + "networkRuleBypassAllowedForTasks": { + "type": "boolean", + "description": "Whether or not Tasks allowed to bypass the network rules for this container registry.", + "default": false + }, + "zoneRedundancy": { + "type": "string", + "description": "Whether or not zone redundancy is enabled for this container registry", + "default": "Disabled", + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "ZoneRedundancy", + "modelAsString": true, + "values": [ + { + "name": "Enabled", + "value": "Enabled" + }, + { + "name": "Disabled", + "value": "Disabled" + } + ] + } + }, + "anonymousPullEnabled": { + "type": "boolean", + "description": "Enables registry-wide pull from unauthenticated clients.", + "default": false + }, + "metadataSearch": { + "type": "string", + "description": "Determines whether registry artifacts are indexed for metadata search.", + "default": "Disabled", + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "MetadataSearch", + "modelAsString": true, + "values": [ + { + "name": "Enabled", + "value": "Enabled" + }, + { + "name": "Disabled", + "value": "Disabled" + } + ] + } + }, + "autoGeneratedDomainNameLabelScope": { + "type": "string", + "description": "Determines the domain name label reuse scope.", + "default": "Unsecure", + "enum": [ + "Unsecure", + "TenantReuse", + "SubscriptionReuse", + "ResourceGroupReuse", + "NoReuse" + ], + "x-ms-enum": { + "name": "AutoGeneratedDomainNameLabelScope", + "modelAsString": true, + "values": [ + { + "name": "Unsecure", + "value": "Unsecure" + }, + { + "name": "TenantReuse", + "value": "TenantReuse" + }, + { + "name": "SubscriptionReuse", + "value": "SubscriptionReuse" + }, + { + "name": "ResourceGroupReuse", + "value": "ResourceGroupReuse" + }, + { + "name": "NoReuse", + "value": "NoReuse" + } + ] + } + }, + "roleAssignmentMode": { + "type": "string", + "description": "Determines registry role assignment mode.", + "default": "LegacyRegistryPermissions", + "enum": [ + "AbacRepositoryPermissions", + "LegacyRegistryPermissions" + ], + "x-ms-enum": { + "name": "RoleAssignmentMode", + "modelAsString": true, + "values": [ + { + "name": "AbacRepositoryPermissions", + "value": "AbacRepositoryPermissions" + }, + { + "name": "LegacyRegistryPermissions", + "value": "LegacyRegistryPermissions" + } + ] + } + } + } + }, + "RegistryPropertiesUpdateParameters": { + "type": "object", + "description": "The parameters for updating the properties of a container registry.", + "properties": { + "adminUserEnabled": { + "type": "boolean", + "description": "The value that indicates whether the admin user is enabled." + }, + "networkRuleSet": { + "$ref": "#/definitions/NetworkRuleSet", + "description": "The network rule set for a container registry." + }, + "policies": { + "$ref": "#/definitions/Policies", + "description": "The policies for a container registry." + }, + "encryption": { + "$ref": "#/definitions/EncryptionProperty", + "description": "The encryption settings of container registry." + }, + "dataEndpointEnabled": { + "type": "boolean", + "description": "Enable a single data endpoint per region for serving data." + }, + "regionalEndpoints": { + "$ref": "#/definitions/RegionalEndpoints", + "description": "Enable per-region endpoints for accessing registry." + }, + "endpointProtocol": { + "$ref": "#/definitions/EndpointProtocol", + "description": "The connectivity protocol for the registry, such as IPv4 or dual stack (IPv4 and IPv6)." + }, + "publicNetworkAccess": { + "$ref": "#/definitions/PublicNetworkAccess", + "description": "Whether or not public network access is allowed for the container registry." + }, + "networkRuleBypassOptions": { + "type": "string", + "description": "Whether to allow trusted Azure services to access a network restricted registry.", + "default": "AzureServices", + "enum": [ + "AzureServices", + "None" + ], + "x-ms-enum": { + "name": "NetworkRuleBypassOptions", + "modelAsString": true, + "values": [ + { + "name": "AzureServices", + "value": "AzureServices" + }, + { + "name": "None", + "value": "None" + } + ] + } + }, + "networkRuleBypassAllowedForTasks": { + "type": "boolean", + "description": "Whether to allow ACR Tasks service to access a network restricted registry." + }, + "anonymousPullEnabled": { + "type": "boolean", + "description": "Enables registry-wide pull from unauthenticated clients." + }, + "metadataSearch": { + "type": "string", + "description": "Determines whether registry artifacts are indexed for metadata search.", + "default": "Disabled", + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "MetadataSearch", + "modelAsString": true, + "values": [ + { + "name": "Enabled", + "value": "Enabled" + }, + { + "name": "Disabled", + "value": "Disabled" + } + ] + } + }, + "roleAssignmentMode": { + "$ref": "#/definitions/RoleAssignmentMode", + "description": "Determines registry role assignment mode." + } + } + }, + "RegistrySyncResult": { + "type": "object", + "description": "The registry sync result of the connected registry.", + "properties": { + "syncTrigger": { + "$ref": "#/definitions/SyncTrigger", + "description": "The action that triggered the most recent registry sync.", + "readOnly": true + }, + "syncState": { + "$ref": "#/definitions/SyncState", + "description": "The status of the connected registry's most recent sync.", + "readOnly": true + }, + "lastSyncStartTime": { + "type": "string", + "format": "date-time", + "description": "The time that the connected registry's most recent sync started." + }, + "lastSyncEndTime": { + "type": "string", + "format": "date-time", + "description": "The time that the connected registry's most recent sync ended." + }, + "lastSuccessfulSyncEndTime": { + "type": "string", + "format": "date-time", + "description": "The time that the connected registry's most recent successful sync ended." + } + }, + "required": [ + "syncTrigger", + "syncState" + ] + }, + "RegistryUpdateParameters": { + "type": "object", + "description": "The parameters for updating a container registry.", + "properties": { + "identity": { + "$ref": "#/definitions/IdentityProperties", + "description": "The identity of the container registry." + }, + "tags": { + "type": "object", + "description": "The tags for the container registry.", + "additionalProperties": { + "type": "string" + } + }, + "sku": { + "$ref": "#/definitions/Sku", + "description": "The SKU of the container registry." + }, + "properties": { + "$ref": "#/definitions/RegistryPropertiesUpdateParameters", + "description": "The properties that the container registry will be updated with.", + "x-ms-client-flatten": true + } + } + }, + "RegistryUsage": { + "type": "object", + "description": "The quota usage for a container registry.", + "properties": { + "name": { + "type": "string", + "description": "The name of the usage." + }, + "limit": { + "type": "integer", + "format": "int64", + "description": "The limit of the usage." + }, + "currentValue": { + "type": "integer", + "format": "int64", + "description": "The current value of the usage." + }, + "unit": { + "$ref": "#/definitions/RegistryUsageUnit", + "description": "The unit of measurement." + } + } + }, + "RegistryUsageListResult": { + "type": "object", + "description": "The result of a request to get container registry quota usages.", + "properties": { + "value": { + "type": "array", + "description": "The list of container registry quota usages.", + "items": { + "$ref": "#/definitions/RegistryUsage" + }, + "x-ms-identifiers": [ + "name" + ] + } + } + }, + "RegistryUsageUnit": { + "type": "string", + "description": "The unit of measurement.", + "enum": [ + "Count", + "Bytes" + ], + "x-ms-enum": { + "name": "RegistryUsageUnit", + "modelAsString": true, + "values": [ + { + "name": "Count", + "value": "Count" + }, + { + "name": "Bytes", + "value": "Bytes" + } + ] + } + }, + "Replication": { + "type": "object", + "description": "An object that represents a replication for a container registry.", + "properties": { + "properties": { + "$ref": "#/definitions/ReplicationProperties", + "description": "The properties of the replication.", + "x-ms-client-flatten": true + } + }, + "allOf": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/TrackedResource" + } + ] + }, + "ReplicationListResult": { + "type": "object", + "description": "The result of a request to list replications for a container registry.", + "properties": { + "value": { + "type": "array", + "description": "The list of replications. Since this list may be incomplete, the nextLink field should be used to request the next list of replications.", + "items": { + "$ref": "#/definitions/Replication" + } + }, + "nextLink": { + "type": "string", + "description": "The URI that can be used to request the next list of replications." + } + } + }, + "ReplicationProperties": { + "type": "object", + "description": "The properties of a replication.", + "properties": { + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "The provisioning state of the replication at the time the operation was called.", + "readOnly": true + }, + "status": { + "$ref": "#/definitions/Status", + "description": "The status of the replication at the time the operation was called.", + "readOnly": true + }, + "regionEndpointEnabled": { + "type": "boolean", + "description": "Specifies whether the replication's regional endpoint is enabled. Requests will not be routed to a replication whose regional endpoint is disabled, however its data will continue to be synced with other replications.", + "default": true + }, + "zoneRedundancy": { + "type": "string", + "description": "Whether or not zone redundancy is enabled for this container registry replication", + "default": "Disabled", + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "ZoneRedundancy", + "modelAsString": true, + "values": [ + { + "name": "Enabled", + "value": "Enabled" + }, + { + "name": "Disabled", + "value": "Disabled" + } + ] + } + } + } + }, + "ReplicationUpdateParameters": { + "type": "object", + "description": "The parameters for updating a replication.", + "properties": { + "tags": { + "type": "object", + "description": "The tags for the replication.", + "additionalProperties": { + "type": "string" + } + }, + "properties": { + "$ref": "#/definitions/ReplicationUpdateParametersProperties", + "description": "The parameters for updating a replication's properties", + "x-ms-client-flatten": true + } + } + }, + "ReplicationUpdateParametersProperties": { + "type": "object", + "properties": { + "regionEndpointEnabled": { + "type": "boolean", + "description": "Specifies whether the replication's regional endpoint is enabled. Requests will not be routed to a replication whose regional endpoint is disabled, however its data will continue to be synced with other replications." + } + } + }, + "Request": { + "type": "object", + "description": "The request that generated the event.", + "properties": { + "id": { + "type": "string", + "description": "The ID of the request that initiated the event." + }, + "addr": { + "type": "string", + "description": "The IP or hostname and possibly port of the client connection that initiated the event. This is the RemoteAddr from the standard http request." + }, + "host": { + "type": "string", + "description": "The externally accessible hostname of the registry instance, as specified by the http host header on incoming requests." + }, + "method": { + "type": "string", + "description": "The request method that generated the event." + }, + "useragent": { + "type": "string", + "description": "The user agent header of the request." + } + } + }, + "ResourceIdentityType": { + "type": "string", + "description": "The identity type.", + "enum": [ + "SystemAssigned", + "UserAssigned", + "SystemAssigned, UserAssigned", + "None" + ], + "x-ms-enum": { + "name": "ResourceIdentityType", + "modelAsString": false + } + }, + "RetentionPolicy": { + "type": "object", + "description": "The retention policy for a container registry.", + "properties": { + "days": { + "type": "integer", + "format": "int32", + "description": "The number of days to retain an untagged manifest after which it gets purged.", + "default": 7 + }, + "lastUpdatedTime": { + "type": "string", + "format": "date-time", + "description": "The timestamp when the policy was last updated.", + "readOnly": true + }, + "status": { + "type": "string", + "description": "The value that indicates whether the policy is enabled or not.", + "default": "disabled", + "enum": [ + "enabled", + "disabled" + ], + "x-ms-enum": { + "name": "PolicyStatus", + "modelAsString": true, + "values": [ + { + "name": "enabled", + "value": "enabled" + }, + { + "name": "disabled", + "value": "disabled" + } + ] + } + } + } + }, + "RoleAssignmentMode": { + "type": "string", + "description": "Determines registry role assignment mode.", + "enum": [ + "AbacRepositoryPermissions", + "LegacyRegistryPermissions" + ], + "x-ms-enum": { + "name": "RoleAssignmentMode", + "modelAsString": true, + "values": [ + { + "name": "AbacRepositoryPermissions", + "value": "AbacRepositoryPermissions" + }, + { + "name": "LegacyRegistryPermissions", + "value": "LegacyRegistryPermissions" + } + ] + } + }, + "ScopeMap": { + "type": "object", + "description": "An object that represents a scope map for a container registry.", + "properties": { + "properties": { + "$ref": "#/definitions/ScopeMapProperties", + "description": "The properties of the scope map.", + "x-ms-client-flatten": true + } + }, + "allOf": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ProxyResource" + } + ] + }, + "ScopeMapListResult": { + "type": "object", + "description": "The result of a request to list scope maps for a container registry.", + "properties": { + "value": { + "type": "array", + "description": "The list of scope maps. Since this list may be incomplete, the nextLink field should be used to request the next list of scope maps.", + "items": { + "$ref": "#/definitions/ScopeMap" + } + }, + "nextLink": { + "type": "string", + "description": "The URI that can be used to request the next list of scope maps." + } + } + }, + "ScopeMapProperties": { + "type": "object", + "description": "The properties of a scope map.", + "properties": { + "description": { + "type": "string", + "description": "The user friendly description of the scope map." + }, + "type": { + "type": "string", + "description": "The type of the scope map. E.g. BuildIn scope map.", + "readOnly": true + }, + "creationDate": { + "type": "string", + "format": "date-time", + "description": "The creation date of scope map.", + "readOnly": true + }, + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "Provisioning state of the resource.", + "readOnly": true + }, + "actions": { + "type": "array", + "description": "The list of scoped permissions for registry artifacts.\nE.g. repositories/repository-name/content/read,\nrepositories/repository-name/metadata/write", + "items": { + "type": "string" + } + } + }, + "required": [ + "actions" + ] + }, + "ScopeMapPropertiesUpdateParameters": { + "type": "object", + "description": "The update parameters for scope map properties.", + "properties": { + "description": { + "type": "string", + "description": "The user friendly description of the scope map." + }, + "actions": { + "type": "array", + "description": "The list of scope permissions for registry artifacts.\nE.g. repositories/repository-name/pull,\nrepositories/repository-name/delete", + "items": { + "type": "string" + } + } + } + }, + "ScopeMapUpdateParameters": { + "type": "object", + "description": "The properties for updating the scope map.", + "properties": { + "properties": { + "$ref": "#/definitions/ScopeMapPropertiesUpdateParameters", + "description": "The update parameters for scope map properties.", + "x-ms-client-flatten": true + } + } + }, + "Sku": { + "type": "object", + "description": "The SKU of a container registry.", + "properties": { + "name": { + "$ref": "#/definitions/SkuName", + "description": "The SKU name of the container registry. Required for registry creation." + }, + "tier": { + "$ref": "#/definitions/SkuTier", + "description": "The SKU tier based on the SKU name.", + "readOnly": true + } + }, + "required": [ + "name" + ] + }, + "SkuName": { + "type": "string", + "description": "The SKU name of the container registry. Required for registry creation.", + "enum": [ + "Classic", + "Basic", + "Standard", + "Premium" + ], + "x-ms-enum": { + "name": "SkuName", + "modelAsString": true, + "values": [ + { + "name": "Classic", + "value": "Classic" + }, + { + "name": "Basic", + "value": "Basic" + }, + { + "name": "Standard", + "value": "Standard" + }, + { + "name": "Premium", + "value": "Premium" + } + ] + } + }, + "SkuTier": { + "type": "string", + "description": "The SKU tier based on the SKU name.", + "enum": [ + "Classic", + "Basic", + "Standard", + "Premium" + ], + "x-ms-enum": { + "name": "SkuTier", + "modelAsString": true, + "values": [ + { + "name": "Classic", + "value": "Classic" + }, + { + "name": "Basic", + "value": "Basic" + }, + { + "name": "Standard", + "value": "Standard" + }, + { + "name": "Premium", + "value": "Premium" + } + ] + } + }, + "SoftDeletePolicy": { + "type": "object", + "description": "The soft delete policy for a container registry", + "properties": { + "retentionDays": { + "type": "integer", + "format": "int32", + "description": "The number of days after which a soft-deleted item is permanently deleted.", + "default": 7 + }, + "lastUpdatedTime": { + "type": "string", + "format": "date-time", + "description": "The timestamp when the policy was last updated.", + "readOnly": true + }, + "status": { + "type": "string", + "description": "The value that indicates whether the policy is enabled or not.", + "default": "disabled", + "enum": [ + "enabled", + "disabled" + ], + "x-ms-enum": { + "name": "PolicyStatus", + "modelAsString": true, + "values": [ + { + "name": "enabled", + "value": "enabled" + }, + { + "name": "disabled", + "value": "disabled" + } + ] + } + } + } + }, + "Source": { + "type": "object", + "description": "The registry node that generated the event. Put differently, while the actor initiates the event, the source generates it.", + "properties": { + "addr": { + "type": "string", + "description": "The IP or hostname and the port of the registry node that generated the event. Generally, this will be resolved by os.Hostname() along with the running port." + }, + "instanceID": { + "type": "string", + "description": "The running instance of an application. Changes after each restart." + } + } + }, + "Status": { + "type": "object", + "description": "The status of an Azure resource at the time the operation was called.", + "properties": { + "displayStatus": { + "type": "string", + "description": "The short label for the status.", + "readOnly": true + }, + "message": { + "type": "string", + "description": "The detailed message for the status, including alerts and error messages.", + "readOnly": true + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "The timestamp when the status was changed to the current value.", + "readOnly": true + } + } + }, + "StatusDetailProperties": { + "type": "object", + "description": "The status detail properties of the connected registry.", + "properties": { + "type": { + "type": "string", + "description": "The component of the connected registry corresponding to the status.", + "readOnly": true + }, + "code": { + "type": "string", + "description": "The HTTP status code.", + "readOnly": true + }, + "description": { + "type": "string", + "description": "The description of the status.", + "readOnly": true + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "The timestamp of the status.", + "readOnly": true + }, + "correlationId": { + "type": "string", + "description": "The correlation ID of the status.", + "readOnly": true + } + } + }, + "SyncProperties": { + "type": "object", + "description": "The sync properties of the connected registry with its parent.", + "properties": { + "tokenId": { + "type": "string", + "description": "The resource ID of the ACR token used to authenticate the connected registry to its parent during sync." + }, + "schedule": { + "type": "string", + "description": "The cron expression indicating the schedule that the connected registry will sync with its parent." + }, + "syncWindow": { + "type": "string", + "format": "duration", + "description": "The time window during which sync is enabled for each schedule occurrence. Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601." + }, + "messageTtl": { + "type": "string", + "format": "duration", + "description": "The period of time for which a message is available to sync before it is expired. Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601." + }, + "lastSyncTime": { + "type": "string", + "format": "date-time", + "description": "The last time a sync occurred between the connected registry and its parent.", + "readOnly": true + }, + "gatewayEndpoint": { + "type": "string", + "description": "The gateway endpoint used by the connected registry to communicate with its parent.", + "readOnly": true + } + }, + "required": [ + "tokenId", + "messageTtl" + ] + }, + "SyncState": { + "type": "string", + "description": "The action that triggered the most recent registry sync.", + "enum": [ + "NotActivated", + "Syncing", + "Failed", + "Succeeded", + "TimedOut", + "Pending" + ], + "x-ms-enum": { + "name": "SyncState", + "modelAsString": true, + "values": [ + { + "name": "NotActivated", + "value": "NotActivated", + "description": "Connected Registry is not activated" + }, + { + "name": "Syncing", + "value": "Syncing", + "description": "Connected Registry is syncing" + }, + { + "name": "Failed", + "value": "Failed", + "description": "Connected Registry sync failed" + }, + { + "name": "Succeeded", + "value": "Succeeded", + "description": "Connected Registry sync succeeded" + }, + { + "name": "TimedOut", + "value": "TimedOut", + "description": "Connected Registry sync timed out" + }, + { + "name": "Pending", + "value": "Pending", + "description": "Connected Registry sync is pending" + } + ] + } + }, + "SyncTrigger": { + "type": "string", + "description": "The status of the connected registry's most recent sync.", + "enum": [ + "SyncTokenUpdate", + "InitialSync", + "ManualResync", + "RecoveryService" + ], + "x-ms-enum": { + "name": "SyncTrigger", + "modelAsString": true, + "values": [ + { + "name": "SyncTokenUpdate", + "value": "SyncTokenUpdate", + "description": "Connected Registry sync was triggered by a sync token update" + }, + { + "name": "InitialSync", + "value": "InitialSync", + "description": "Connected Registry sync was triggered by an initial sync during activation" + }, + { + "name": "ManualResync", + "value": "ManualResync", + "description": "Connected Registry sync was triggered by a manual resync request" + }, + { + "name": "RecoveryService", + "value": "RecoveryService", + "description": "Connected Registry sync was triggered by the Connected Registry's recovery service" + } + ] + } + }, + "SyncUpdateProperties": { + "type": "object", + "description": "The parameters for updating the sync properties of the connected registry with its parent.", + "properties": { + "schedule": { + "type": "string", + "description": "The cron expression indicating the schedule that the connected registry will sync with its parent." + }, + "syncWindow": { + "type": "string", + "format": "duration", + "description": "The time window during which sync is enabled for each schedule occurrence. Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601." + }, + "messageTtl": { + "type": "string", + "format": "duration", + "description": "The period of time for which a message is available to sync before it is expired. Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601." + } + } + }, + "Target": { + "type": "object", + "description": "The target of the event.", + "properties": { + "mediaType": { + "type": "string", + "description": "The MIME type of the referenced object." + }, + "size": { + "type": "integer", + "format": "int64", + "description": "The number of bytes of the content. Same as Length field." + }, + "digest": { + "type": "string", + "description": "The digest of the content, as defined by the Registry V2 HTTP API Specification." + }, + "length": { + "type": "integer", + "format": "int64", + "description": "The number of bytes of the content. Same as Size field." + }, + "repository": { + "type": "string", + "description": "The repository name." + }, + "url": { + "type": "string", + "description": "The direct URL to the content." + }, + "tag": { + "type": "string", + "description": "The tag name." + }, + "name": { + "type": "string", + "description": "The name of the artifact." + }, + "version": { + "type": "string", + "description": "The version of the artifact." + } + } + }, + "TlsCertificateProperties": { + "type": "object", + "description": "The TLS certificate properties of the connected registry login server.", + "properties": { + "type": { + "$ref": "#/definitions/CertificateType", + "description": "The type of certificate location.", + "readOnly": true + }, + "location": { + "type": "string", + "description": "Indicates the location of the certificates.", + "readOnly": true + } + } + }, + "TlsProperties": { + "type": "object", + "description": "The TLS properties of the connected registry login server.", + "properties": { + "status": { + "$ref": "#/definitions/TlsStatus", + "description": "Indicates whether HTTPS is enabled for the login server.", + "readOnly": true + }, + "certificate": { + "$ref": "#/definitions/TlsCertificateProperties", + "description": "The certificate used to configure HTTPS for the login server.", + "readOnly": true + } + } + }, + "TlsStatus": { + "type": "string", + "description": "Indicates whether HTTPS is enabled for the login server.", + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "TlsStatus", + "modelAsString": true, + "values": [ + { + "name": "Enabled", + "value": "Enabled" + }, + { + "name": "Disabled", + "value": "Disabled" + } + ] + } + }, + "Token": { + "type": "object", + "description": "An object that represents a token for a container registry.", + "properties": { + "properties": { + "$ref": "#/definitions/TokenProperties", + "description": "The properties of the token.", + "x-ms-client-flatten": true + } + }, + "allOf": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ProxyResource" + } + ] + }, + "TokenCertificate": { + "type": "object", + "description": "The properties of a certificate used for authenticating a token.", + "properties": { + "name": { + "$ref": "#/definitions/TokenCertificateName" + }, + "expiry": { + "type": "string", + "format": "date-time", + "description": "The expiry datetime of the certificate." + }, + "thumbprint": { + "type": "string", + "description": "The thumbprint of the certificate." + }, + "encodedPemCertificate": { + "type": "string", + "description": "Base 64 encoded string of the public certificate1 in PEM format that will be used for authenticating the token." + } + } + }, + "TokenCertificateName": { + "type": "string", + "enum": [ + "certificate1", + "certificate2" + ], + "x-ms-enum": { + "name": "TokenCertificateName", + "modelAsString": true, + "values": [ + { + "name": "certificate1", + "value": "certificate1" + }, + { + "name": "certificate2", + "value": "certificate2" + } + ] + } + }, + "TokenCredentialsProperties": { + "type": "object", + "description": "The properties of the credentials that can be used for authenticating the token.", + "properties": { + "certificates": { + "type": "array", + "items": { + "$ref": "#/definitions/TokenCertificate" + }, + "x-ms-identifiers": [ + "thumbprint" + ] + }, + "passwords": { + "type": "array", + "items": { + "$ref": "#/definitions/TokenPassword" + }, + "x-ms-identifiers": [] + } + } + }, + "TokenListResult": { + "type": "object", + "description": "The result of a request to list tokens for a container registry.", + "properties": { + "value": { + "type": "array", + "description": "The list of tokens. Since this list may be incomplete, the nextLink field should be used to request the next list of tokens.", + "items": { + "$ref": "#/definitions/Token" + } + }, + "nextLink": { + "type": "string", + "description": "The URI that can be used to request the next list of tokens." + } + } + }, + "TokenPassword": { + "type": "object", + "description": "The password that will be used for authenticating the token of a container registry.", + "properties": { + "creationTime": { + "type": "string", + "format": "date-time", + "description": "The creation datetime of the password." + }, + "expiry": { + "type": "string", + "format": "date-time", + "description": "The expiry datetime of the password." + }, + "name": { + "$ref": "#/definitions/TokenPasswordName", + "description": "The password name \"password1\" or \"password2\"" + }, + "value": { + "type": "string", + "description": "The password value.", + "readOnly": true + } + } + }, + "TokenPasswordName": { + "type": "string", + "description": "The password name \"password1\" or \"password2\"", + "enum": [ + "password1", + "password2" + ], + "x-ms-enum": { + "name": "TokenPasswordName", + "modelAsString": true, + "values": [ + { + "name": "password1", + "value": "password1" + }, + { + "name": "password2", + "value": "password2" + } + ] + } + }, + "TokenProperties": { + "type": "object", + "description": "The properties of a token.", + "properties": { + "creationDate": { + "type": "string", + "format": "date-time", + "description": "The creation date of scope map.", + "readOnly": true + }, + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "Provisioning state of the resource.", + "readOnly": true + }, + "scopeMapId": { + "type": "string", + "description": "The resource ID of the scope map to which the token will be associated with." + }, + "credentials": { + "$ref": "#/definitions/TokenCredentialsProperties", + "description": "The credentials that can be used for authenticating the token." + }, + "status": { + "$ref": "#/definitions/TokenStatus", + "description": "The status of the token example enabled or disabled." + } + } + }, + "TokenStatus": { + "type": "string", + "description": "The status of the token example enabled or disabled.", + "enum": [ + "enabled", + "disabled" + ], + "x-ms-enum": { + "name": "TokenStatus", + "modelAsString": true, + "values": [ + { + "name": "enabled", + "value": "enabled" + }, + { + "name": "disabled", + "value": "disabled" + } + ] + } + }, + "TokenUpdateParameters": { + "type": "object", + "description": "The parameters for updating a token.", + "properties": { + "properties": { + "$ref": "#/definitions/TokenUpdateProperties", + "description": "The properties of the token update parameters.", + "x-ms-client-flatten": true + } + } + }, + "TokenUpdateProperties": { + "type": "object", + "description": "The parameters for updating token properties.", + "properties": { + "scopeMapId": { + "type": "string", + "description": "The resource ID of the scope map to which the token will be associated with." + }, + "status": { + "$ref": "#/definitions/TokenStatus", + "description": "The status of the token example enabled or disabled." + }, + "credentials": { + "$ref": "#/definitions/TokenCredentialsProperties", + "description": "The credentials that can be used for authenticating the token." + } + } + }, + "TrustPolicy": { + "type": "object", + "description": "The content trust policy for a container registry.", + "properties": { + "type": { + "type": "string", + "description": "The type of trust policy.", + "default": "Notary", + "enum": [ + "Notary" + ], + "x-ms-enum": { + "name": "TrustPolicyType", + "modelAsString": true, + "values": [ + { + "name": "Notary", + "value": "Notary" + } + ] + } + }, + "status": { + "type": "string", + "description": "The value that indicates whether the policy is enabled or not.", + "default": "disabled", + "enum": [ + "enabled", + "disabled" + ], + "x-ms-enum": { + "name": "PolicyStatus", + "modelAsString": true, + "values": [ + { + "name": "enabled", + "value": "enabled" + }, + { + "name": "disabled", + "value": "disabled" + } + ] + } + } + } + }, + "UserIdentityProperties": { + "type": "object", + "properties": { + "principalId": { + "type": "string", + "description": "The principal id of user assigned identity.", + "readOnly": true + }, + "clientId": { + "type": "string", + "description": "The client id of user assigned identity.", + "readOnly": true + } + } + }, + "Webhook": { + "type": "object", + "description": "An object that represents a webhook for a container registry.", + "properties": { + "properties": { + "$ref": "#/definitions/WebhookProperties", + "description": "The properties of the webhook.", + "x-ms-client-flatten": true + } + }, + "allOf": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/TrackedResource" + } + ] + }, + "WebhookAction": { + "type": "string", + "enum": [ + "push", + "delete", + "quarantine", + "chart_push", + "chart_delete" + ], + "x-ms-enum": { + "name": "WebhookAction", + "modelAsString": true, + "values": [ + { + "name": "push", + "value": "push" + }, + { + "name": "delete", + "value": "delete" + }, + { + "name": "quarantine", + "value": "quarantine" + }, + { + "name": "chart_push", + "value": "chart_push" + }, + { + "name": "chart_delete", + "value": "chart_delete" + } + ] + } + }, + "WebhookCreateParameters": { + "type": "object", + "description": "The parameters for creating a webhook.", + "properties": { + "tags": { + "type": "object", + "description": "The tags for the webhook.", + "additionalProperties": { + "type": "string" + } + }, + "location": { + "type": "string", + "description": "The location of the webhook. This cannot be changed after the resource is created." + }, + "properties": { + "$ref": "#/definitions/WebhookPropertiesCreateParameters", + "description": "The properties that the webhook will be created with.", + "x-ms-client-flatten": true + } + }, + "required": [ + "location" + ] + }, + "WebhookListResult": { + "type": "object", + "description": "The result of a request to list webhooks for a container registry.", + "properties": { + "value": { + "type": "array", + "description": "The list of webhooks. Since this list may be incomplete, the nextLink field should be used to request the next list of webhooks.", + "items": { + "$ref": "#/definitions/Webhook" + } + }, + "nextLink": { + "type": "string", + "description": "The URI that can be used to request the next list of webhooks." + } + } + }, + "WebhookProperties": { + "type": "object", + "description": "The properties of a webhook.", + "properties": { + "status": { + "$ref": "#/definitions/WebhookStatus", + "description": "The status of the webhook at the time the operation was called." + }, + "scope": { + "type": "string", + "description": "The scope of repositories where the event can be triggered. For example, 'foo:*' means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to 'foo:latest'. Empty means all events." + }, + "actions": { + "type": "array", + "description": "The list of actions that trigger the webhook to post notifications.", + "items": { + "$ref": "#/definitions/WebhookAction" + } + }, + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "The provisioning state of the webhook at the time the operation was called.", + "readOnly": true + } + }, + "required": [ + "actions" + ] + }, + "WebhookPropertiesCreateParameters": { + "type": "object", + "description": "The parameters for creating the properties of a webhook.", + "properties": { + "serviceUri": { + "type": "string", + "format": "password", + "description": "The service URI for the webhook to post notifications.", + "x-ms-secret": true + }, + "customHeaders": { + "type": "object", + "format": "password", + "description": "Custom headers that will be added to the webhook notifications.", + "additionalProperties": { + "type": "string" + }, + "x-ms-secret": true + }, + "status": { + "$ref": "#/definitions/WebhookStatus", + "description": "The status of the webhook at the time the operation was called." + }, + "scope": { + "type": "string", + "description": "The scope of repositories where the event can be triggered. For example, 'foo:*' means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to 'foo:latest'. Empty means all events." + }, + "actions": { + "type": "array", + "description": "The list of actions that trigger the webhook to post notifications.", + "items": { + "$ref": "#/definitions/WebhookAction" + } + } + }, + "required": [ + "serviceUri", + "actions" + ] + }, + "WebhookPropertiesUpdateParameters": { + "type": "object", + "description": "The parameters for updating the properties of a webhook.", + "properties": { + "serviceUri": { + "type": "string", + "format": "password", + "description": "The service URI for the webhook to post notifications.", + "x-ms-secret": true + }, + "customHeaders": { + "type": "object", + "format": "password", + "description": "Custom headers that will be added to the webhook notifications.", + "additionalProperties": { + "type": "string" + }, + "x-ms-secret": true + }, + "status": { + "$ref": "#/definitions/WebhookStatus", + "description": "The status of the webhook at the time the operation was called." + }, + "scope": { + "type": "string", + "description": "The scope of repositories where the event can be triggered. For example, 'foo:*' means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to 'foo:latest'. Empty means all events." + }, + "actions": { + "type": "array", + "description": "The list of actions that trigger the webhook to post notifications.", + "items": { + "$ref": "#/definitions/WebhookAction" + } + } + } + }, + "WebhookStatus": { + "type": "string", + "description": "The status of the webhook at the time the operation was called.", + "enum": [ + "enabled", + "disabled" + ], + "x-ms-enum": { + "name": "WebhookStatus", + "modelAsString": true, + "values": [ + { + "name": "enabled", + "value": "enabled" + }, + { + "name": "disabled", + "value": "disabled" + } + ] + } + }, + "WebhookUpdateParameters": { + "type": "object", + "description": "The parameters for updating a webhook.", + "properties": { + "tags": { + "type": "object", + "description": "The tags for the webhook.", + "additionalProperties": { + "type": "string" + } + }, + "properties": { + "$ref": "#/definitions/WebhookPropertiesUpdateParameters", + "description": "The properties that the webhook will be updated with.", + "x-ms-client-flatten": true + } + } + } + }, + "parameters": {} +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveCreate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveCreate.json new file mode 100644 index 00000000000..535be7f780b --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveCreate.json @@ -0,0 +1,61 @@ +{ + "title": "ArchiveCreate", + "operationId": "Archives_Create", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "packageType": "rpm", + "archiveName": "myArchiveName", + "archiveCreateParameters": { + "properties": { + "packageSource": { + "type": "remote", + "url": "string" + }, + "publishedVersion": "string", + "repositoryEndpointPrefix": "string" + } + } + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.ContainerRegistry/registries/archives", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/packages/rpm/archives/myArchiveName", + "name": "myArchiveName", + "properties": { + "packageSource": { + "type": "remote", + "url": "string" + }, + "publishedVersion": "string", + "repositoryEndpointPrefix": "string", + "repositoryEndpoint": "string", + "provisioningState": "Succeeded" + } + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/packages/rpm/archives/myArchiveName/operationStatuses/archive-00000000-0000-0000-0000-000000000000?api-version=2023-01-01-preview" + }, + "body": { + "type": "Microsoft.ContainerRegistry/registries/archives", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/archives/myArchiveName", + "name": "myArchiveName", + "properties": { + "packageSource": { + "type": "remote", + "url": "string" + }, + "publishedVersion": "string", + "repositoryEndpointPrefix": "string", + "repositoryEndpoint": "string", + "provisioningState": "Succeeded" + } + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveDelete.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveDelete.json new file mode 100644 index 00000000000..daef4170f6c --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveDelete.json @@ -0,0 +1,20 @@ +{ + "title": "ArchiveDelete", + "operationId": "Archives_Delete", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "packageType": "myPackageType", + "archiveName": "myArchiveName" + }, + "responses": { + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/packages/myPackageType/archives/myArchiveName/operationStatuses/archive-00000000-0000-0000-0000-000000000000?api-version=2023-01-01-preview" + } + }, + "204": {} + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveGet.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveGet.json new file mode 100644 index 00000000000..4060847c15a --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveGet.json @@ -0,0 +1,37 @@ +{ + "title": "ArchiveGet", + "operationId": "Archives_Get", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "packageType": "myPackageType", + "archiveName": "myArchiveName" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.ContainerRegistry/registries/packages/archives", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/packages/myPackageType/archives/myArchiveName", + "name": "myArchiveName", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2023-02-24T00:13:46.836Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-02-24T00:13:46.836Z" + }, + "properties": { + "packageSource": { + "type": "string", + "url": "string" + }, + "publishedVersion": "string", + "provisioningState": "Creating" + } + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveList.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveList.json new file mode 100644 index 00000000000..7d89a44cf42 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveList.json @@ -0,0 +1,41 @@ +{ + "title": "ArchiveList", + "operationId": "Archives_List", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "packageType": "myPackageType" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/packages/myPackageType/archives/myArchiveName", + "name": "myArchiveName", + "type": "Microsoft.ContainerRegistry/registries/archives", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2023-02-24T00:22:47.311Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-02-24T00:22:47.311Z" + }, + "properties": { + "packageSource": { + "type": "string", + "url": "string" + }, + "publishedVersion": "string", + "provisioningState": "Creating" + } + } + ], + "nextLink": "string" + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveUpdate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveUpdate.json new file mode 100644 index 00000000000..cf7281441dc --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveUpdate.json @@ -0,0 +1,44 @@ +{ + "title": "ArchiveUpdate", + "operationId": "Archives_Update", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "packageType": "myPackageType", + "archiveName": "myArchiveName", + "archiveUpdateParameters": { + "properties": { + "publishedVersion": "string" + } + } + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.ContainerRegistry/registries/packages/archives", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/packages/myPackageType/archives/myArchiveName", + "name": "myArchiveName", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2023-06-09T23:41:38.720Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-06-09T23:41:38.720Z" + }, + "properties": { + "packageSource": { + "type": "remote", + "url": "string" + }, + "publishedVersion": "string", + "repositoryEndpointPrefix": "string", + "repositoryEndpoint": "string", + "provisioningState": "Creating" + } + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveVersionCreate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveVersionCreate.json new file mode 100644 index 00000000000..77aae794fe1 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveVersionCreate.json @@ -0,0 +1,38 @@ +{ + "title": "ArchiveVersionCreate", + "operationId": "ArchiveVersions_Create", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "packageType": "rpm", + "archiveName": "myArchiveName", + "archiveVersionName": "myArchiveVersionName" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.ContainerRegistry/registries/packages/archives/versions", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/packages/rpm/archives/myArchiveName/versions/myArchiveVersionName", + "name": "myArchiveVersionName", + "properties": { + "provisioningState": "Succeeded" + } + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/packages/rpm/archives/myArchiveName/versions/myArchiveVersionName/operationStatuses/archoveversion-00000000-0000-0000-0000-000000000000?api-version=2023-01-01-preview" + }, + "body": { + "type": "Microsoft.ContainerRegistry/registries/packages/archives/versions", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/packages/rpm/archives/myArchiveName/versions/myArchiveVersionName", + "name": "myCacheRule", + "properties": { + "provisioningState": "Succeeded" + } + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveVersionDelete.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveVersionDelete.json new file mode 100644 index 00000000000..678b2e456c6 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveVersionDelete.json @@ -0,0 +1,21 @@ +{ + "title": "ArchiveVersionDelete", + "operationId": "ArchiveVersions_Delete", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "packageType": "myPackageType", + "archiveName": "myArchiveName", + "archiveVersionName": "myArchiveVersionName" + }, + "responses": { + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/packages/myPackageType/archives/myArchiveName/versions/myArchiveVersionName/operationStatuses/archive-00000000-0000-0000-0000-000000000000?api-version=2023-01-01-preview" + } + }, + "204": {} + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveVersionGet.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveVersionGet.json new file mode 100644 index 00000000000..350ab35e42e --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveVersionGet.json @@ -0,0 +1,34 @@ +{ + "title": "ArchiveVersionGet", + "operationId": "ArchiveVersions_Get", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "packageType": "rpm", + "archiveName": "myArchiveName", + "archiveVersionName": "myArchiveVersionName" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.ContainerRegistry/registries/packages/archives", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/packages/rpm/archives/myArchiveName/versions/myArchiveVersionName", + "name": "myArchiveName", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2023-02-24T00:13:46.836Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-02-24T00:13:46.836Z" + }, + "properties": { + "provisioningState": "Creating", + "archiveVersionErrorMessage": "string" + } + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveVersionList.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveVersionList.json new file mode 100644 index 00000000000..45c488529c5 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveVersionList.json @@ -0,0 +1,38 @@ +{ + "title": "ArchiveVersionList", + "operationId": "ArchiveVersions_List", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "packageType": "myPackageType", + "archiveName": "myArchiveName" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/packages/myPackageType/archives/myArchiveName/versions/myArchiveVersionName", + "name": "myArchiveVersionName", + "type": "Microsoft.ContainerRegistry/registries/packages/archives/versions", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2023-02-24T00:22:47.311Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-02-24T00:22:47.311Z" + }, + "properties": { + "provisioningState": "Creating", + "archiveVersionErrorMessage": "string" + } + } + ], + "nextLink": "string" + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CacheRuleCreate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CacheRuleCreate.json new file mode 100644 index 00000000000..0ad2f79c097 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CacheRuleCreate.json @@ -0,0 +1,51 @@ +{ + "title": "CacheRuleCreate", + "operationId": "CacheRules_Create", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "cacheRuleName": "myCacheRule", + "cacheRuleCreateParameters": { + "properties": { + "sourceRepository": "docker.io/library/hello-world", + "targetRepository": "cached-docker-hub/hello-world", + "credentialSetResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/credentialSets/myCredentialSet" + } + } + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.ContainerRegistry/registries/cacheRules", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/cacheRules/myCacheRule", + "name": "myCacheRule", + "properties": { + "credentialSetResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/credentialSets/myCredentialSet", + "sourceRepository": "docker.io/library/hello-world", + "targetRepository": "cached-docker-hub/hello-world", + "creationDate": "2022-11-07T18:20:33.8374968+00:00", + "provisioningState": "Succeeded" + } + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/cacheRules/myCacheRule/operationStatuses/cacherules-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" + }, + "body": { + "type": "Microsoft.ContainerRegistry/registries/cacheRules", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/cacheRules/myCacheRule", + "name": "myCacheRule", + "properties": { + "credentialSetResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/credentialSets/myCredentialSet", + "sourceRepository": "docker.io/library/hello-world", + "targetRepository": "cached-docker-hub/hello-world", + "creationDate": "2022-11-07T18:20:33.8374968+00:00", + "provisioningState": "Creating" + } + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CacheRuleCreateUserAssignedMIAuthentication.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CacheRuleCreateUserAssignedMIAuthentication.json new file mode 100644 index 00000000000..7b57e6b6f15 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CacheRuleCreateUserAssignedMIAuthentication.json @@ -0,0 +1,72 @@ +{ + "title": "CacheRuleCreateUserAssignedMIAuthentication", + "operationId": "CacheRules_Create", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "cacheRuleName": "myCacheRule", + "cacheRuleCreateParameters": { + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myUserAssignedIdentity": {} + } + }, + "properties": { + "sourceRepository": "acr-registry.azurecr.io/library/repository", + "targetRepository": "cached-acr/hello-world" + } + } + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.ContainerRegistry/registries/cacheRules", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/cacheRules/myCacheRule", + "name": "myCacheRule", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myUserAssignedIdentity": { + "clientId": "12345678-1234-1234-1234-123456789012", + "principalId": "12345678-1234-1234-1234-123456789012" + } + } + } + }, + "properties": { + "sourceRepository": "acr-registry.azurecr.io/library/repository", + "targetRepository": "cached-acr/hello-world", + "creationDate": "2022-11-07T18:20:33.8374968+00:00", + "provisioningState": "Succeeded" + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/cacheRules/myCacheRule/operationStatuses/cacherules-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" + }, + "body": { + "type": "Microsoft.ContainerRegistry/registries/cacheRules", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/cacheRules/myCacheRule", + "name": "myCacheRule", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myUserAssignedIdentity": { + "clientId": "12345678-1234-1234-1234-123456789012", + "principalId": "12345678-1234-1234-1234-123456789012" + } + } + }, + "properties": { + "sourceRepository": "acr-registry.azurecr.io/library/repository", + "targetRepository": "cached-acr/hello-world", + "creationDate": "2022-11-07T18:20:33.8374968+00:00", + "provisioningState": "Creating" + } + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CacheRuleDelete.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CacheRuleDelete.json new file mode 100644 index 00000000000..dae579bcb7b --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CacheRuleDelete.json @@ -0,0 +1,19 @@ +{ + "title": "CacheRuleDelete", + "operationId": "CacheRules_Delete", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "cacheRuleName": "myCacheRule" + }, + "responses": { + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/cacheRules/myCacheRule/operationStatuses/cacherules-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" + } + }, + "204": {} + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CacheRuleGet.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CacheRuleGet.json new file mode 100644 index 00000000000..3a007b3ea86 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CacheRuleGet.json @@ -0,0 +1,27 @@ +{ + "title": "CacheRuleGet", + "operationId": "CacheRules_Get", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "cacheRuleName": "myCacheRule" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.ContainerRegistry/registries/cacheRules", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/cacheRules/myCacheRule", + "name": "myCacheRule", + "properties": { + "credentialSetResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/credentialSets/myCredentialSet", + "sourceRepository": "docker.io/library/hello-world", + "targetRepository": "cached-docker-hub/hello-world", + "creationDate": "2022-11-07T18:20:33.8374968+00:00", + "provisioningState": "Succeeded" + } + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CacheRuleList.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CacheRuleList.json new file mode 100644 index 00000000000..ae37c5be64f --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CacheRuleList.json @@ -0,0 +1,30 @@ +{ + "title": "CacheRuleList", + "operationId": "CacheRules_List", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "type": "Microsoft.ContainerRegistry/registries/cacheRules", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/cacheRules/myCacheRule", + "name": "myCacheRule", + "properties": { + "credentialSetResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/credentialSets/myCredentialSet", + "sourceRepository": "docker.io/library/hello-world", + "targetRepository": "cached-docker-hub/hello-world", + "creationDate": "2022-11-07T18:20:33.8374968+00:00", + "provisioningState": "Succeeded" + } + } + ] + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CacheRuleUpdate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CacheRuleUpdate.json new file mode 100644 index 00000000000..2fe4b347388 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CacheRuleUpdate.json @@ -0,0 +1,49 @@ +{ + "title": "CacheRuleUpdate", + "operationId": "CacheRules_Update", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "cacheRuleName": "myCacheRule", + "cacheRuleUpdateParameters": { + "properties": { + "credentialSetResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/credentialSets/myCredentialSet2" + } + } + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.ContainerRegistry/registries/cacheRules", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/cacheRules/myCacheRule", + "name": "myCacheRule", + "properties": { + "credentialSetResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/credentialSets/myCredentialSet2", + "sourceRepository": "docker.io/library/hello-world", + "targetRepository": "cached-docker-hub/hello-world", + "creationDate": "2022-11-07T18:20:33.8374968+00:00", + "provisioningState": "Succeeded" + } + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/cacheRules/myCacheRule/operationStatuses/cacherules-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" + }, + "body": { + "type": "Microsoft.ContainerRegistry/registries/cacheRules", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/cacheRules/myCacheRule", + "name": "myCacheRule", + "properties": { + "credentialSetResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/credentialSets/myCredentialSet2", + "sourceRepository": "docker.io/library/hello-world", + "targetRepository": "cached-docker-hub/hello-world", + "creationDate": "2022-11-07T18:20:33.8374968+00:00", + "provisioningState": "Updating" + } + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ConnectedRegistryCreate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ConnectedRegistryCreate.json new file mode 100644 index 00000000000..53cc668e493 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ConnectedRegistryCreate.json @@ -0,0 +1,112 @@ +{ + "title": "ConnectedRegistryCreate", + "operationId": "ConnectedRegistries_Create", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "connectedRegistryName": "myConnectedRegistry", + "connectedRegistryCreateParameters": { + "properties": { + "mode": "ReadWrite", + "parent": { + "syncProperties": { + "tokenId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/syncToken", + "schedule": "0 9 * * *", + "messageTtl": "P2D", + "syncWindow": "PT3H" + } + }, + "clientTokenIds": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/client1Token" + ], + "notificationsList": [ + "hello-world:*:*", + "sample/repo/*:1.0:*" + ], + "garbageCollection": { + "enabled": true, + "schedule": "0 5 * * *" + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/connectedRegistries/myConnectedRegistry", + "name": "myConnectedRegistry", + "type": "Microsoft.ContainerRegistry/registries/connectedRegistries", + "properties": { + "mode": "ReadWrite", + "activation": { + "status": "Inactive" + }, + "parent": { + "syncProperties": { + "tokenId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/syncToken", + "schedule": "0 9 * * *", + "messageTtl": "P2D", + "syncWindow": "PT3H" + } + }, + "clientTokenIds": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/client1Token" + ], + "logging": { + "logLevel": "Information", + "auditLogStatus": "Disabled" + }, + "notificationsList": [ + "hello-world:*:*", + "sample/repo/*:1.0:*" + ], + "garbageCollection": { + "enabled": true, + "schedule": "0 5 * * *" + } + } + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/connectedRegistries/myConnectedRegistry/operationStatuses/connectedregistries-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" + }, + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/connectedRegistries/myConnectedRegistry", + "name": "myConnectedRegistry", + "type": "Microsoft.ContainerRegistry/registries/connectedRegistries", + "properties": { + "mode": "ReadWrite", + "activation": { + "status": "Inactive" + }, + "parent": { + "syncProperties": { + "tokenId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/syncToken", + "schedule": "0 9 * * *", + "messageTtl": "P2D", + "syncWindow": "PT3H" + } + }, + "clientTokenIds": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/client1Token" + ], + "logging": { + "logLevel": "Information", + "auditLogStatus": "Disabled" + }, + "notificationsList": [ + "hello-world:*:*", + "sample/repo/*:1.0:*" + ], + "garbageCollection": { + "enabled": true, + "schedule": "0 5 * * *" + } + } + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ConnectedRegistryDeactivate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ConnectedRegistryDeactivate.json new file mode 100644 index 00000000000..bb1ba130335 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ConnectedRegistryDeactivate.json @@ -0,0 +1,19 @@ +{ + "title": "ConnectedRegistryDeactivate", + "operationId": "ConnectedRegistries_Deactivate", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "connectedRegistryName": "myConnectedRegistry" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/connectedRegistries/myConnectedRegistry/operationStatuses/connectedregistries-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ConnectedRegistryDelete.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ConnectedRegistryDelete.json new file mode 100644 index 00000000000..81b8bef42ba --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ConnectedRegistryDelete.json @@ -0,0 +1,20 @@ +{ + "title": "ConnectedRegistryDelete", + "operationId": "ConnectedRegistries_Delete", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "connectedRegistryName": "myConnectedRegistry" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/connectedRegistries/myConnectedRegistry/operationStatuses/connectedregistries-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" + } + }, + "204": {} + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ConnectedRegistryGet.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ConnectedRegistryGet.json new file mode 100644 index 00000000000..5a6b127cd2a --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ConnectedRegistryGet.json @@ -0,0 +1,56 @@ +{ + "title": "ConnectedRegistryGet", + "operationId": "ConnectedRegistries_Get", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "connectedRegistryName": "myConnectedRegistry" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/connectedRegistries/myConnectedRegistry", + "name": "myConnectedRegistry", + "type": "Microsoft.ContainerRegistry/registries/connectedRegistries", + "properties": { + "mode": "ReadWrite", + "activation": { + "status": "Inactive" + }, + "parent": { + "syncProperties": { + "tokenId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/syncToken", + "schedule": "0 9 * * *", + "messageTtl": "P2D", + "syncWindow": "PT3H" + } + }, + "clientTokenIds": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/client1Token" + ], + "logging": { + "logLevel": "Information", + "auditLogStatus": "Disabled" + }, + "notificationsList": [ + "hello-world:*:*", + "sample/repo/*:1.0:*" + ], + "garbageCollection": { + "enabled": true, + "schedule": "0 5 * * *" + }, + "registrySyncResult": { + "syncTrigger": "InitialSync", + "syncState": "Succeeded", + "lastSyncStartTime": "2026-01-01T00:00:00.0000000-01:00", + "lastSyncEndTime": "2026-01-01T00:01:00.0000000-01:00", + "lastSuccessfulSyncEndTime": "2026-01-01T00:01:00.0000000-01:00" + } + } + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ConnectedRegistryList.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ConnectedRegistryList.json new file mode 100644 index 00000000000..5fe5db98b00 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ConnectedRegistryList.json @@ -0,0 +1,59 @@ +{ + "title": "ConnectedRegistryList", + "operationId": "ConnectedRegistries_List", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/connectedRegistries/myConnectedRegistry", + "name": "myConnectedRegistry", + "type": "Microsoft.ContainerRegistry/registries/connectedRegistries", + "properties": { + "mode": "ReadWrite", + "activation": { + "status": "Inactive" + }, + "parent": { + "syncProperties": { + "tokenId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/syncToken", + "schedule": "0 9 * * *", + "messageTtl": "P2D", + "syncWindow": "PT3H" + } + }, + "clientTokenIds": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/client1Token" + ], + "logging": { + "logLevel": "Information", + "auditLogStatus": "Disabled" + }, + "notificationsList": [ + "hello-world:*:*", + "sample/repo/*:1.0:*" + ], + "garbageCollection": { + "enabled": true, + "schedule": "0 5 * * *" + }, + "registrySyncResult": { + "syncTrigger": "InitialSync", + "syncState": "Succeeded", + "lastSyncStartTime": "2026-01-01T00:00:00.0000000-01:00", + "lastSyncEndTime": "2026-01-01T00:01:00.0000000-01:00", + "lastSuccessfulSyncEndTime": "2026-01-01T00:01:00.0000000-01:00" + } + } + } + ] + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ConnectedRegistryResync.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ConnectedRegistryResync.json new file mode 100644 index 00000000000..2ee27c96444 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ConnectedRegistryResync.json @@ -0,0 +1,54 @@ +{ + "title": "ConnectedRegistryResync", + "operationId": "ConnectedRegistries_Resync", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "connectedRegistryName": "myConnectedRegistry" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/connectedRegistries/myConnectedRegistry", + "name": "myConnectedRegistry", + "type": "Microsoft.ContainerRegistry/registries/connectedRegistries", + "properties": { + "mode": "ReadWrite", + "parent": { + "syncProperties": { + "tokenId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/syncToken", + "schedule": "0 0 */10 * *", + "messageTtl": "P30D", + "syncWindow": "P2D" + } + }, + "clientTokenIds": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/client1Token", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/client2Token" + ], + "logging": { + "logLevel": "Debug", + "auditLogStatus": "Enabled" + }, + "notificationsList": [ + "hello-world:*:*", + "sample/repo/*:1.0:*" + ], + "garbageCollection": { + "enabled": true, + "schedule": "0 5 * * *" + }, + "registrySyncResult": { + "syncTrigger": "InitialSync", + "syncState": "Succeeded", + "lastSyncStartTime": "2026-01-01T00:00:00.0000000-01:00", + "lastSyncEndTime": "2026-01-01T00:01:00.0000000-01:00", + "lastSuccessfulSyncEndTime": "2026-01-01T00:01:00.0000000-01:00" + } + } + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ConnectedRegistryUpdate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ConnectedRegistryUpdate.json new file mode 100644 index 00000000000..10517e04fc5 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ConnectedRegistryUpdate.json @@ -0,0 +1,123 @@ +{ + "title": "ConnectedRegistryUpdate", + "operationId": "ConnectedRegistries_Update", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "connectedRegistryName": "myScopeMap", + "connectedRegistryUpdateParameters": { + "properties": { + "syncProperties": { + "schedule": "0 0 */10 * *", + "messageTtl": "P30D", + "syncWindow": "P2D" + }, + "logging": { + "logLevel": "Debug", + "auditLogStatus": "Enabled" + }, + "clientTokenIds": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/client1Token", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/client2Token" + ], + "notificationsList": [ + "hello-world:*:*", + "sample/repo/*:1.0:*" + ], + "garbageCollection": { + "enabled": true, + "schedule": "0 5 * * *" + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/connectedRegistries/myConnectedRegistry", + "name": "myConnectedRegistry", + "type": "Microsoft.ContainerRegistry/registries/connectedRegistries", + "properties": { + "mode": "ReadWrite", + "parent": { + "syncProperties": { + "tokenId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/syncToken", + "schedule": "0 0 */10 * *", + "messageTtl": "P30D", + "syncWindow": "P2D" + } + }, + "clientTokenIds": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/client1Token", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/client2Token" + ], + "logging": { + "logLevel": "Debug", + "auditLogStatus": "Enabled" + }, + "notificationsList": [ + "hello-world:*:*", + "sample/repo/*:1.0:*" + ], + "garbageCollection": { + "enabled": true, + "schedule": "0 5 * * *" + }, + "registrySyncResult": { + "syncTrigger": "InitialSync", + "syncState": "Succeeded", + "lastSyncStartTime": "2026-01-01T00:00:00.0000000-01:00", + "lastSyncEndTime": "2026-01-01T00:01:00.0000000-01:00", + "lastSuccessfulSyncEndTime": "2026-01-01T00:01:00.0000000-01:00" + } + } + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/connectedRegistries/myConnectedRegistry/operationStatuses/connectedregistries-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" + }, + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/connectedRegistries/myConnectedRegistry", + "name": "myConnectedRegistry", + "type": "Microsoft.ContainerRegistry/registries/connectedRegistries", + "properties": { + "mode": "ReadWrite", + "parent": { + "syncProperties": { + "tokenId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/syncToken", + "schedule": "0 0 */10 * *", + "messageTtl": "P30D", + "syncWindow": "P2D" + } + }, + "clientTokenIds": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/client1Token", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/client2Token" + ], + "logging": { + "logLevel": "Debug", + "auditLogStatus": "Enabled" + }, + "notificationsList": [ + "hello-world:*:*", + "sample/repo/*:1.0:*" + ], + "garbageCollection": { + "enabled": true, + "schedule": "0 5 * * *" + }, + "registrySyncResult": { + "syncTrigger": "InitialSync", + "syncState": "Succeeded", + "lastSyncStartTime": "2026-01-01T00:00:00.0000000-01:00", + "lastSyncEndTime": "2026-01-01T00:01:00.0000000-01:00", + "lastSuccessfulSyncEndTime": "2026-01-01T00:01:00.0000000-01:00" + } + } + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CredentialSetCreate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CredentialSetCreate.json new file mode 100644 index 00000000000..91043413248 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CredentialSetCreate.json @@ -0,0 +1,85 @@ +{ + "title": "CredentialSetCreate", + "operationId": "CredentialSets_Create", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "credentialSetName": "myCredentialSet", + "credentialSetCreateParameters": { + "properties": { + "loginServer": "docker.io", + "authCredentials": [ + { + "name": "Credential1", + "usernameSecretIdentifier": "https://myvault.vault.azure.net/secrets/username", + "passwordSecretIdentifier": "https://myvault.vault.azure.net/secrets/password" + } + ] + }, + "identity": { + "type": "SystemAssigned" + } + } + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.ContainerRegistry/registries/credentialSets", + "identity": { + "principalId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000", + "type": "SystemAssigned" + }, + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/credentialSets/myCredentialSet", + "name": "myCredentialSet", + "properties": { + "loginServer": "docker.io", + "authCredentials": [ + { + "name": "Credential1", + "usernameSecretIdentifier": "https://myvault.vault.azure.net/secrets/username", + "passwordSecretIdentifier": "https://myvault.vault.azure.net/secrets/password", + "credentialHealth": { + "status": "Healthy" + } + } + ], + "creationDate": "2022-11-07T18:20:08.012276+00:00", + "provisioningState": "Succeeded" + } + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/credentialSets/myCredentialSet/operationStatuses/credentialsets-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" + }, + "body": { + "type": "Microsoft.ContainerRegistry/registries/credentialSets", + "identity": { + "principalId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000", + "type": "SystemAssigned" + }, + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/credentialSets/myCredentialSet", + "name": "myCredentialSet", + "properties": { + "loginServer": "docker.io", + "authCredentials": [ + { + "name": "Credential1", + "usernameSecretIdentifier": "https://myvault.vault.azure.net/secrets/username", + "passwordSecretIdentifier": "https://myvault.vault.azure.net/secrets/password", + "credentialHealth": { + "status": "Healthy" + } + } + ], + "creationDate": "2022-11-07T18:20:08.012276+00:00", + "provisioningState": "Creating" + } + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CredentialSetDelete.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CredentialSetDelete.json new file mode 100644 index 00000000000..fbedd7c5e13 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CredentialSetDelete.json @@ -0,0 +1,19 @@ +{ + "title": "CredentialSetDelete", + "operationId": "CredentialSets_Delete", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "credentialSetName": "myCredentialSet" + }, + "responses": { + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/credentialSets/myCredentialSet/operationStatuses/credentialsets-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" + } + }, + "204": {} + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CredentialSetGet.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CredentialSetGet.json new file mode 100644 index 00000000000..95ad3ea91a1 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CredentialSetGet.json @@ -0,0 +1,40 @@ +{ + "title": "CredentialSetGet", + "operationId": "CredentialSets_Get", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "credentialSetName": "myCredentialSet" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.ContainerRegistry/registries/credentialSets", + "identity": { + "principalId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000", + "type": "SystemAssigned" + }, + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/credentialSets/myCredentialSet", + "name": "myCredentialSet", + "properties": { + "loginServer": "docker.io", + "authCredentials": [ + { + "name": "Credential1", + "usernameSecretIdentifier": "https://myvault.vault.azure.net/secrets/username", + "passwordSecretIdentifier": "https://myvault.vault.azure.net/secrets/password", + "credentialHealth": { + "status": "Healthy" + } + } + ], + "creationDate": "2022-11-07T18:20:08.012276+00:00", + "provisioningState": "Succeeded" + } + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CredentialSetList.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CredentialSetList.json new file mode 100644 index 00000000000..787c8da74c1 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CredentialSetList.json @@ -0,0 +1,43 @@ +{ + "title": "CredentialSetList", + "operationId": "CredentialSets_List", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "type": "Microsoft.ContainerRegistry/registries/credentialSets", + "identity": { + "principalId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000", + "type": "SystemAssigned" + }, + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/credentialSets/myCredentialSet", + "name": "myCredentialSet", + "properties": { + "loginServer": "docker.io", + "authCredentials": [ + { + "name": "Credential1", + "usernameSecretIdentifier": "https://myvault.vault.azure.net/secrets/username", + "passwordSecretIdentifier": "https://myvault.vault.azure.net/secrets/password", + "credentialHealth": { + "status": "Healthy" + } + } + ], + "creationDate": "2022-11-07T18:20:08.012276+00:00", + "provisioningState": "Succeeded" + } + } + ] + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CredentialSetUpdate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CredentialSetUpdate.json new file mode 100644 index 00000000000..59dd1642737 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CredentialSetUpdate.json @@ -0,0 +1,81 @@ +{ + "title": "CredentialSetUpdate", + "operationId": "CredentialSets_Update", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "credentialSetName": "myCredentialSet", + "credentialSetUpdateParameters": { + "properties": { + "authCredentials": [ + { + "name": "Credential1", + "usernameSecretIdentifier": "https://myvault.vault.azure.net/secrets/username2", + "passwordSecretIdentifier": "https://myvault.vault.azure.net/secrets/password2" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.ContainerRegistry/registries/credentialSets", + "identity": { + "principalId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000", + "type": "SystemAssigned" + }, + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/credentialSets/myCredentialSet", + "name": "myCredentialSet", + "properties": { + "loginServer": "docker.io", + "authCredentials": [ + { + "name": "Credential1", + "usernameSecretIdentifier": "https://myvault.vault.azure.net/secrets/username2", + "passwordSecretIdentifier": "https://myvault.vault.azure.net/secrets/password2", + "credentialHealth": { + "status": "Healthy" + } + } + ], + "creationDate": "2022-11-07T18:20:08.012276+00:00", + "provisioningState": "Succeeded" + } + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/credentialSets/myCredentialSet/operationStatuses/credentialsets-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" + }, + "body": { + "type": "Microsoft.ContainerRegistry/registries/credentialSets", + "identity": { + "principalId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000", + "type": "SystemAssigned" + }, + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/credentialSets/myCredentialSet", + "name": "myCredentialSet", + "properties": { + "loginServer": "docker.io", + "authCredentials": [ + { + "name": "Credential1", + "usernameSecretIdentifier": "https://myvault.vault.azure.net/secrets/username2", + "passwordSecretIdentifier": "https://myvault.vault.azure.net/secrets/password2", + "credentialHealth": { + "status": "Healthy" + } + } + ], + "creationDate": "2022-11-07T18:20:08.012276+00:00", + "provisioningState": "Updating" + } + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ExportPipelineCreate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ExportPipelineCreate.json new file mode 100644 index 00000000000..e0f49ce205b --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ExportPipelineCreate.json @@ -0,0 +1,83 @@ +{ + "title": "ExportPipelineCreate", + "operationId": "ExportPipelines_Create", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "exportPipelineName": "myExportPipeline", + "exportPipelineCreateParameters": { + "location": "westus", + "identity": { + "type": "SystemAssigned" + }, + "properties": { + "target": { + "type": "AzureStorageBlobContainer", + "uri": "https://accountname.blob.core.windows.net/containername", + "keyVaultUri": "https://myvault.vault.azure.net/secrets/acrexportsas", + "storageAccessMode": "SasToken" + }, + "options": [ + "OverwriteBlobs" + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/exportPipelines/myExportPipeline", + "name": "myExportPipeline", + "type": "Microsoft.ContainerRegistry/registries/exportPipelines", + "properties": { + "target": { + "type": "AzureStorageBlobContainer", + "uri": "https://accountname.blob.core.windows.net/containername", + "keyVaultUri": "https://myvault.vault.azure.net/secrets/acrexportsas", + "storageAccessMode": "SasToken" + }, + "options": [ + "OverwriteBlobs" + ], + "provisioningState": "Succeeded" + }, + "location": "westus", + "identity": { + "principalId": "fa153151-b9fd-46f4-9088-5e6600f2689v", + "tenantId": "f686d426-8d16-42db-81b7-abu4gm510ccd", + "type": "SystemAssigned" + } + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/exportPipelines/myExportPipeline/operationStatuses/exportpipelines-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" + }, + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/exportPipelines/myExportPipeline", + "name": "myExportPipeline", + "type": "Microsoft.ContainerRegistry/registries/exportPipelines", + "properties": { + "target": { + "type": "AzureStorageBlobContainer", + "uri": "https://accountname.blob.core.windows.net/containername", + "keyVaultUri": "https://myvault.vault.azure.net/secrets/acrexportsas", + "storageAccessMode": "SasToken" + }, + "options": [ + "OverwriteBlobs" + ], + "provisioningState": "Succeeded" + }, + "location": "westus", + "identity": { + "principalId": "fa153151-b9fd-46f4-9088-5e6600f2689v", + "tenantId": "f686d426-8d16-42db-81b7-abu4gm510ccd", + "type": "SystemAssigned" + } + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ExportPipelineDelete.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ExportPipelineDelete.json new file mode 100644 index 00000000000..459a9818f77 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ExportPipelineDelete.json @@ -0,0 +1,20 @@ +{ + "title": "ExportPipelineDelete", + "operationId": "ExportPipelines_Delete", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "exportPipelineName": "myExportPipeline" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/exportPipelines/myExportPipeline/operationStatuses/exportpipelines-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" + } + }, + "204": {} + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ExportPipelineGet.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ExportPipelineGet.json new file mode 100644 index 00000000000..d6a4e5ee027 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ExportPipelineGet.json @@ -0,0 +1,38 @@ +{ + "title": "ExportPipelineGet", + "operationId": "ExportPipelines_Get", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "exportPipelineName": "myExportPipeline" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/exportPipelines/myExportPipeline", + "name": "myExportPipeline", + "type": "Microsoft.ContainerRegistry/registries/exportPipelines", + "properties": { + "target": { + "type": "AzureStorageBlobContainer", + "uri": "https://accountname.blob.core.windows.net/containername", + "keyVaultUri": "https://myvault.vault.azure.net/secrets/acrexportsas", + "storageAccessMode": "SasToken" + }, + "options": [ + "OverwriteBlobs" + ], + "provisioningState": "Succeeded" + }, + "location": "westus", + "identity": { + "principalId": "fa153151-b9fd-46f4-9088-5e6600f2689v", + "tenantId": "f686d426-8d16-42db-81b7-abu4gm510ccd", + "type": "SystemAssigned" + } + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ExportPipelineList.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ExportPipelineList.json new file mode 100644 index 00000000000..52acae5e1d1 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ExportPipelineList.json @@ -0,0 +1,41 @@ +{ + "title": "ExportPipelineList", + "operationId": "ExportPipelines_List", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/exportPipelines/myExportPipeline", + "name": "myExportPipeline", + "type": "Microsoft.ContainerRegistry/registries/exportPipelines", + "properties": { + "target": { + "type": "AzureStorageBlobContainer", + "uri": "https://accountname.blob.core.windows.net/containername", + "keyVaultUri": "https://myvault.vault.azure.net/secrets/acrexportsas", + "storageAccessMode": "SasToken" + }, + "options": [ + "OverwriteBlobs" + ], + "provisioningState": "Succeeded" + }, + "location": "westus", + "identity": { + "principalId": "fa153151-b9fd-46f4-9088-5e6600f2689v", + "tenantId": "f686d426-8d16-42db-81b7-abu4gm510ccd", + "type": "SystemAssigned" + } + } + ] + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ImportImageByManifestDigest.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ImportImageByManifestDigest.json new file mode 100644 index 00000000000..c0480b452fc --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ImportImageByManifestDigest.json @@ -0,0 +1,31 @@ +{ + "title": "ImportImageByManifestDigest", + "operationId": "Registries_ImportImage", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "parameters": { + "source": { + "resourceId": "/subscriptions/10000000-0000-0000-0000-000000000000/resourceGroups/sourceResourceGroup/providers/Microsoft.ContainerRegistry/registries/sourceRegistry", + "sourceImage": "sourceRepository@sha256:0000000000000000000000000000000000000000000000000000000000000000" + }, + "targetTags": [ + "targetRepository:targetTag" + ], + "untaggedTargetRepositories": [ + "targetRepository1" + ], + "mode": "Force" + } + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/locations/location/operationResults/operationStatuses/registries-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ImportImageByTag.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ImportImageByTag.json new file mode 100644 index 00000000000..411b201baf3 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ImportImageByTag.json @@ -0,0 +1,31 @@ +{ + "title": "ImportImageByTag", + "operationId": "Registries_ImportImage", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "parameters": { + "source": { + "resourceId": "/subscriptions/10000000-0000-0000-0000-000000000000/resourceGroups/sourceResourceGroup/providers/Microsoft.ContainerRegistry/registries/sourceRegistry", + "sourceImage": "sourceRepository:sourceTag" + }, + "targetTags": [ + "targetRepository:targetTag" + ], + "untaggedTargetRepositories": [ + "targetRepository1" + ], + "mode": "Force" + } + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/locations/location/operationResults/operationStatuses/registries-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ImportImageFromPublicRegistry.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ImportImageFromPublicRegistry.json new file mode 100644 index 00000000000..a77c028f3fd --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ImportImageFromPublicRegistry.json @@ -0,0 +1,31 @@ +{ + "title": "ImportImageFromPublicRegistry", + "operationId": "Registries_ImportImage", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "parameters": { + "source": { + "registryUri": "registry.hub.docker.com", + "sourceImage": "library/hello-world" + }, + "targetTags": [ + "targetRepository:targetTag" + ], + "untaggedTargetRepositories": [ + "targetRepository1" + ], + "mode": "Force" + } + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/locations/location/operationResults/operationStatuses/registries-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ImportPipelineCreate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ImportPipelineCreate.json new file mode 100644 index 00000000000..56acc8eb84c --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ImportPipelineCreate.json @@ -0,0 +1,110 @@ +{ + "title": "ImportPipelineCreate", + "operationId": "ImportPipelines_Create", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "importPipelineName": "myImportPipeline", + "importPipelineCreateParameters": { + "location": "westus", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/f9d7ebed-adbd-4cb4-b973-aaf82c136138/resourcegroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity2": {} + } + }, + "properties": { + "source": { + "type": "AzureStorageBlobContainer", + "uri": "https://accountname.blob.core.windows.net/containername", + "keyVaultUri": "https://myvault.vault.azure.net/secrets/acrimportsas", + "storageAccessMode": "SasToken" + }, + "options": [ + "OverwriteTags", + "DeleteSourceBlobOnSuccess", + "ContinueOnErrors" + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/importPipelines/myImportPipeline", + "name": "myImportPipeline", + "type": "Microsoft.ContainerRegistry/registries/importPipelines", + "properties": { + "source": { + "type": "AzureStorageBlobContainer", + "uri": "https://accountname.blob.core.windows.net/containername", + "keyVaultUri": "https://myvault.vault.azure.net/secrets/acrimportsas", + "storageAccessMode": "SasToken" + }, + "trigger": { + "sourceTrigger": { + "status": "Enabled" + } + }, + "options": [ + "OverwriteTags", + "DeleteSourceBlobOnSuccess", + "ContinueOnErrors" + ], + "provisioningState": "Succeeded" + }, + "location": "westus", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/f9d7ebed-adbd-4cb4-b973-aaf82c136138/resourcegroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity2": { + "clientId": "d3ce1bc2-f7d7-4a5b-9979-950f4e57680e", + "principalId": "b6p9f58b-6fbf-4efd-a7e0-fvd46911a466" + } + } + } + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/importPipelines/myImportPipeline/operationStatuses/importpipelines-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" + }, + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/importPipelines/myImportPipeline", + "name": "myImportPipeline", + "type": "Microsoft.ContainerRegistry/registries/importPipelines", + "properties": { + "source": { + "type": "AzureStorageBlobContainer", + "uri": "https://accountname.blob.core.windows.net/containername", + "keyVaultUri": "https://myvault.vault.azure.net/secrets/acrimportsas", + "storageAccessMode": "SasToken" + }, + "trigger": { + "sourceTrigger": { + "status": "Enabled" + } + }, + "options": [ + "OverwriteTags", + "DeleteSourceBlobOnSuccess", + "ContinueOnErrors" + ], + "provisioningState": "Succeeded" + }, + "location": "westus", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/f9d7ebed-adbd-4cb4-b973-aaf82c136138/resourcegroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity2": { + "clientId": "d3ce1bc2-f7d7-4a5b-9979-950f4e57680e", + "principalId": "b6p9f58b-6fbf-4efd-a7e0-fvd46911a466" + } + } + } + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ImportPipelineDelete.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ImportPipelineDelete.json new file mode 100644 index 00000000000..fabe633c359 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ImportPipelineDelete.json @@ -0,0 +1,20 @@ +{ + "title": "ImportPipelineDelete", + "operationId": "ImportPipelines_Delete", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "importPipelineName": "myImportPipeline" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/importPipelines/myImportPipeline/operationStatuses/importpipelines-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" + } + }, + "204": {} + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ImportPipelineGet.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ImportPipelineGet.json new file mode 100644 index 00000000000..b2f27d1cad7 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ImportPipelineGet.json @@ -0,0 +1,49 @@ +{ + "title": "ImportPipelineGet", + "operationId": "ImportPipelines_Get", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "importPipelineName": "myImportPipeline" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/importPipelines/myImportPipeline", + "name": "myImportPipeline", + "type": "Microsoft.ContainerRegistry/registries/importPipelines", + "properties": { + "source": { + "type": "AzureStorageBlobContainer", + "uri": "https://accountname.blob.core.windows.net/containername", + "keyVaultUri": "https://myvault.vault.azure.net/secrets/acrimportsas", + "storageAccessMode": "SasToken" + }, + "trigger": { + "sourceTrigger": { + "status": "Enabled" + } + }, + "options": [ + "OverwriteTags", + "DeleteSourceBlobOnSuccess", + "ContinueOnErrors" + ], + "provisioningState": "Succeeded" + }, + "location": "westus", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/f9d7ebed-adbd-4cb4-b973-aaf82c136138/resourcegroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity2": { + "clientId": "d3ce1bc2-f7d7-4a5b-9979-950f4e57680e", + "principalId": "b6p9f58b-6fbf-4efd-a7e0-fvd46911a466" + } + } + } + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ImportPipelineList.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ImportPipelineList.json new file mode 100644 index 00000000000..046f005f1d6 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ImportPipelineList.json @@ -0,0 +1,52 @@ +{ + "title": "ImportPipelineList", + "operationId": "ImportPipelines_List", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/importPipelines/myImportPipeline", + "name": "myImportPipeline", + "type": "Microsoft.ContainerRegistry/registries/importPipelines", + "properties": { + "source": { + "type": "AzureStorageBlobContainer", + "uri": "https://accountname.blob.core.windows.net/containername", + "keyVaultUri": "https://myvault.vault.azure.net/secrets/acrimportsas", + "storageAccessMode": "SasToken" + }, + "trigger": { + "sourceTrigger": { + "status": "Enabled" + } + }, + "options": [ + "OverwriteTags", + "DeleteSourceBlobOnSuccess", + "ContinueOnErrors" + ], + "provisioningState": "Succeeded" + }, + "location": "westus", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/f9d7ebed-adbd-4cb4-b973-aaf82c136138/resourcegroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity2": { + "clientId": "d3ce1bc2-f7d7-4a5b-9979-950f4e57680e", + "principalId": "b6p9f58b-6fbf-4efd-a7e0-fvd46911a466" + } + } + } + } + ] + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/OperationList.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/OperationList.json new file mode 100644 index 00000000000..09715326802 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/OperationList.json @@ -0,0 +1,24 @@ +{ + "title": "OperationList", + "operationId": "Operations_List", + "parameters": { + "api-version": "2026-01-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Microsoft.ContainerRegistry/locations/deleteVirtualNetworkOrSubnets/action", + "display": { + "provider": "Microsoft ContainerRegistry", + "resource": "", + "operation": "Delete virtual network or subnets notifications", + "description": "Notifies Microsoft.ContainerRegistry that virtual network or subnet is being deleted" + } + } + ] + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PipelineRunCreate_Export.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PipelineRunCreate_Export.json new file mode 100644 index 00000000000..a6ea3bce37e --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PipelineRunCreate_Export.json @@ -0,0 +1,93 @@ +{ + "title": "PipelineRunCreate_Export", + "operationId": "PipelineRuns_Create", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "pipelineRunName": "myPipelineRun", + "pipelineRunCreateParameters": { + "properties": { + "request": { + "pipelineResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/exportPipelines/myExportPipeline", + "target": { + "type": "AzureStorageBlob", + "name": "myblob.tar.gz" + }, + "artifacts": [ + "sourceRepository/hello-world", + "sourceRepository2@sha256:00000000000000000000000000000000000" + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/pipelineRuns/myPipelineRun", + "name": "myPipelineRun", + "type": "Microsoft.ContainerRegistry/registries/pipelineRuns", + "properties": { + "request": { + "pipelineResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/exportPipelines/myExportPipeline", + "artifacts": [ + "sourceRepository/hello-world", + "sourceRepository2@sha256:00000000000000000000000000000000000" + ] + }, + "response": { + "status": "Running", + "catalogDigest": "sha256@", + "progress": { + "percentage": "20" + }, + "startTime": "2020-03-04T17:23:21.9261521+00:00", + "target": { + "type": "AzureStorageBlob", + "uri": "https://accountname.blob.core.windows.net/containername/myblob.tar.gz", + "keyVaultUri": "https://myvault.vault.azure.net/secrets/acrexportsas", + "storageAccessMode": "SasToken" + } + }, + "provisioningState": "Succeeded" + } + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/pipelineRuns/myPipelineRun/operationStatuses/pipelineruns-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" + }, + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/pipelineRuns/myPipelineRun", + "name": "myPipelineRun", + "type": "Microsoft.ContainerRegistry/registries/pipelineRuns", + "properties": { + "request": { + "pipelineResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/exportPipelines/myExportPipeline", + "artifacts": [ + "sourceRepository/hello-world", + "sourceRepository2@sha256:00000000000000000000000000000000000" + ] + }, + "response": { + "status": "Running", + "catalogDigest": "sha256@", + "progress": { + "percentage": "20" + }, + "startTime": "2020-03-04T17:23:21.9261521+00:00", + "target": { + "type": "AzureStorageBlob", + "uri": "https://accountname.blob.core.windows.net/containername/myblob.tar.gz", + "keyVaultUri": "https://myvault.vault.azure.net/secrets/acrexportsas", + "storageAccessMode": "SasToken" + } + }, + "provisioningState": "Succeeded" + } + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PipelineRunCreate_Import.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PipelineRunCreate_Import.json new file mode 100644 index 00000000000..28fe1c9b0b2 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PipelineRunCreate_Import.json @@ -0,0 +1,92 @@ +{ + "title": "PipelineRunCreate_Import", + "operationId": "PipelineRuns_Create", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "pipelineRunName": "myPipelineRun", + "pipelineRunCreateParameters": { + "properties": { + "request": { + "pipelineResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/importPipelines/myImportPipeline", + "source": { + "type": "AzureStorageBlob", + "name": "myblob.tar.gz" + }, + "catalogDigest": "sha256@" + }, + "forceUpdateTag": "2020-03-04T17:23:21.9261521+00:00" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/pipelineRuns/myPipelineRun", + "name": "myPipelineRun", + "type": "Microsoft.ContainerRegistry/registries/pipelineRuns", + "properties": { + "request": { + "pipelineResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/importPipelines/myImportPipeline" + }, + "response": { + "status": "Succeeded", + "progress": { + "percentage": "100" + }, + "startTime": "2020-03-04T17:23:21.9261521+00:00", + "importedArtifacts": [ + "sourceRepository/hello-world", + "sourceRepository2@sha256:00000000000000000000000000000000000" + ], + "source": { + "type": "AzureStorageBlob", + "uri": "https://accountname.blob.core.windows.net/containername/myblob.tar.gz", + "keyVaultUri": "https://myvault.vault.azure.net/secrets/acrimportsas", + "storageAccessMode": "SasToken" + }, + "catalogDigest": "sha256@" + }, + "provisioningState": "Succeeded" + } + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/pipelineRuns/myPipelineRun/operationStatuses/pipelineruns-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" + }, + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/pipelineRuns/myPipelineRun", + "name": "myPipelineRun", + "type": "Microsoft.ContainerRegistry/registries/pipelineRuns", + "properties": { + "request": { + "pipelineResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/importPipelines/myImportPipeline" + }, + "response": { + "status": "Succeeded", + "progress": { + "percentage": "100" + }, + "startTime": "2020-03-04T17:23:21.9261521+00:00", + "finishTime": "2020-03-04T17:25:21.9261521+00:00", + "importedArtifacts": [ + "sourceRepository/hello-world", + "sourceRepository2@sha256:00000000000000000000000000000000000" + ], + "source": { + "type": "AzureStorageBlob", + "uri": "https://accountname.blob.core.windows.net/containername/myblob.tar.gz", + "keyVaultUri": "https://myvault.vault.azure.net/secrets/acrimportsas", + "storageAccessMode": "SasToken" + }, + "catalogDigest": "sha256@" + }, + "provisioningState": "Succeeded" + } + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PipelineRunDelete.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PipelineRunDelete.json new file mode 100644 index 00000000000..49faa4b511d --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PipelineRunDelete.json @@ -0,0 +1,20 @@ +{ + "title": "PipelineRunDelete", + "operationId": "PipelineRuns_Delete", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "pipelineRunName": "myPipelineRun" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/pipelineRuns/myPipelineRun/operationStatuses/pipelineruns-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" + } + }, + "204": {} + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PipelineRunGet.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PipelineRunGet.json new file mode 100644 index 00000000000..a947c0bc17b --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PipelineRunGet.json @@ -0,0 +1,44 @@ +{ + "title": "PipelineRunGet", + "operationId": "PipelineRuns_Get", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "pipelineRunName": "myPipelineRun" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/pipelineRuns/myPipelineRun", + "name": "myPipelineRun", + "type": "Microsoft.ContainerRegistry/registries/pipelineRuns", + "properties": { + "request": { + "pipelineResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/exportPipelines/myExportPipeline", + "artifacts": [ + "sourceRepository/hello-world", + "sourceRepository2@sha256:00000000000000000000000000000000000" + ] + }, + "response": { + "status": "Running", + "catalogDigest": "sha256@", + "progress": { + "percentage": "20" + }, + "startTime": "2020-03-04T17:23:21.9261521+00:00", + "target": { + "type": "AzureStorageBlob", + "uri": "https://accountname.blob.core.windows.net/containername/myblob.tar.gz", + "keyVaultUri": "https://myvault.vault.azure.net/secrets/acrexportsas", + "storageAccessMode": "SasToken" + } + }, + "provisioningState": "Succeeded" + } + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PipelineRunList.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PipelineRunList.json new file mode 100644 index 00000000000..152cc6effb1 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PipelineRunList.json @@ -0,0 +1,76 @@ +{ + "title": "PipelineRunList", + "operationId": "PipelineRuns_List", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/pipelineRuns/myPipelineRun", + "name": "myPipelineRun", + "type": "Microsoft.ContainerRegistry/registries/pipelineRuns", + "properties": { + "request": { + "pipelineResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/exportPipelines/myExportPipeline", + "artifacts": [ + "sourceRepository/hello-world", + "sourceRepository2@sha256:00000000000000000000000000000000000" + ] + }, + "response": { + "status": "Running", + "catalogDigest": "sha256@", + "progress": { + "percentage": "20" + }, + "startTime": "2020-03-04T17:23:21.9261521+00:00", + "target": { + "type": "AzureStorageBlob", + "uri": "https://accountname.blob.core.windows.net/containername/myblob.tar.gz", + "keyVaultUri": "https://myvault.vault.azure.net/secrets/acrexportsas", + "storageAccessMode": "SasToken" + } + }, + "provisioningState": "Succeeded" + } + }, + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/pipelineRuns/myPipelineRun", + "name": "myPipelineRun", + "type": "Microsoft.ContainerRegistry/registries/pipelineRuns", + "properties": { + "request": { + "pipelineResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/importPipelines/myImportPipeline" + }, + "response": { + "status": "Succeeded", + "progress": { + "percentage": "100" + }, + "startTime": "2020-03-03T17:23:21.9261521+00:00", + "importedArtifacts": [ + "sourceRepository/hello-world", + "sourceRepository2@sha256:00000000000000000000000000000000000" + ], + "source": { + "type": "AzureStorageBlob", + "uri": "https://accountname.blob.core.windows.net/containername/myblob.tar.gz", + "keyVaultUri": "https://myvault.vault.azure.net/secrets/acrimportsas", + "storageAccessMode": "SasToken" + }, + "catalogDigest": "sha256@" + }, + "provisioningState": "Succeeded" + } + } + ] + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PrivateEndpointConnectionCreateOrUpdate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PrivateEndpointConnectionCreateOrUpdate.json new file mode 100644 index 00000000000..0581d5dca9b --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PrivateEndpointConnectionCreateOrUpdate.json @@ -0,0 +1,60 @@ +{ + "title": "PrivateEndpointConnectionCreateOrUpdate", + "operationId": "PrivateEndpointConnections_CreateOrUpdate", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "privateEndpointConnectionName": "myConnection", + "privateEndpointConnection": { + "properties": { + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-Approved" + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/privateEndpointConnections/myConnection", + "name": "myConnection", + "type": "Microsoft.ContainerRegistry/registries/privateEndpointConnections", + "properties": { + "provisioningState": "Succeeded", + "privateEndpoint": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/peexample01" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-Approved", + "actionsRequired": "None" + } + } + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/privateEndpointConnections/myConnection/operationStatuses/privateendpointconnections-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" + }, + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/privateEndpointConnections/myConnection", + "name": "myConnection", + "type": "Microsoft.ContainerRegistry/registries/privateEndpointConnections", + "properties": { + "provisioningState": "Succeeded", + "privateEndpoint": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/peexample01" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-Approved", + "actionsRequired": "None" + } + } + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PrivateEndpointConnectionDelete.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PrivateEndpointConnectionDelete.json new file mode 100644 index 00000000000..a1426a15ad6 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PrivateEndpointConnectionDelete.json @@ -0,0 +1,20 @@ +{ + "title": "PrivateEndpointConnectionDelete", + "operationId": "PrivateEndpointConnections_Delete", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "privateEndpointConnectionName": "myConnection" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/privateEndpointConnections/myConnection/operationStatuses/privateendpointconnections-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" + } + }, + "204": {} + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PrivateEndpointConnectionGet.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PrivateEndpointConnectionGet.json new file mode 100644 index 00000000000..5054d55b646 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PrivateEndpointConnectionGet.json @@ -0,0 +1,31 @@ +{ + "title": "PrivateEndpointConnectionGet", + "operationId": "PrivateEndpointConnections_Get", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "privateEndpointConnectionName": "myConnection" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/privateEndpointConnections/myConnection", + "name": "myConnection", + "type": "Microsoft.ContainerRegistry/registries/privateEndpointConnections", + "properties": { + "provisioningState": "Succeeded", + "privateEndpoint": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/peexample01" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-Approved", + "actionsRequired": "None" + } + } + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PrivateEndpointConnectionList.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PrivateEndpointConnectionList.json new file mode 100644 index 00000000000..c9144ab9dcd --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PrivateEndpointConnectionList.json @@ -0,0 +1,34 @@ +{ + "title": "PrivateEndpointConnectionList", + "operationId": "PrivateEndpointConnections_List", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/privateEndpointConnections/myConnection", + "name": "myConnection", + "type": "Microsoft.ContainerRegistry/registries/privateEndpointConnections", + "properties": { + "provisioningState": "Succeeded", + "privateEndpoint": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/peexample01" + }, + "privateLinkServiceConnectionState": { + "status": "Approved", + "description": "Auto-Approved", + "actionsRequired": "None" + } + } + } + ] + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryCheckNameAvailable.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryCheckNameAvailable.json new file mode 100644 index 00000000000..bd585cfab02 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryCheckNameAvailable.json @@ -0,0 +1,22 @@ +{ + "title": "RegistryCheckNameAvailable", + "operationId": "Registries_CheckNameAvailability", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "registryNameCheckRequest": { + "name": "myRegistry", + "type": "Microsoft.ContainerRegistry/registries", + "resourceGroupName": "myResourceGroup", + "autoGeneratedDomainNameLabelScope": "ResourceGroupReuse" + } + }, + "responses": { + "200": { + "body": { + "availableLoginServerName": "myregistry-a1b2c3d4e5f6.azurecr.io", + "nameAvailable": true + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryCheckNameNotAvailable.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryCheckNameNotAvailable.json new file mode 100644 index 00000000000..8a244ae8aff --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryCheckNameNotAvailable.json @@ -0,0 +1,23 @@ +{ + "title": "RegistryCheckNameNotAvailable", + "operationId": "Registries_CheckNameAvailability", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "registryNameCheckRequest": { + "name": "myRegistry", + "type": "Microsoft.ContainerRegistry/registries", + "resourceGroupName": "myResourceGroup", + "autoGeneratedDomainNameLabelScope": "ResourceGroupReuse" + } + }, + "responses": { + "200": { + "body": { + "nameAvailable": false, + "reason": "AlreadyExists", + "message": "The registry myRegistry is already in use." + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryCreate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryCreate.json new file mode 100644 index 00000000000..3b2fdf401ea --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryCreate.json @@ -0,0 +1,144 @@ +{ + "title": "RegistryCreate", + "operationId": "Registries_Create", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "registry": { + "location": "westus", + "tags": { + "key": "value" + }, + "sku": { + "name": "Standard" + }, + "properties": { + "adminUserEnabled": true + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry", + "name": "myRegistry", + "type": "Microsoft.ContainerRegistry/registries", + "location": "westus", + "tags": { + "key": "value" + }, + "sku": { + "name": "Standard", + "tier": "Standard" + }, + "properties": { + "loginServer": "myregistry.azurecr.io", + "creationDate": "2021-06-15T21:38:26.1537861Z", + "provisioningState": "Succeeded", + "adminUserEnabled": true, + "networkRuleSet": { + "defaultAction": "Allow", + "ipRules": [] + }, + "policies": { + "quarantinePolicy": { + "status": "disabled" + }, + "trustPolicy": { + "type": "Notary", + "status": "disabled" + }, + "retentionPolicy": { + "days": 7, + "lastUpdatedTime": "2021-06-15T21:40:12.8506835+00:00", + "status": "disabled" + }, + "exportPolicy": { + "status": "enabled" + } + }, + "encryption": { + "status": "disabled" + }, + "status": null, + "dataEndpointEnabled": false, + "dataEndpointHostNames": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Enabled", + "networkRuleBypassOptions": "AzureServices", + "networkRuleBypassAllowedForTasks": false, + "zoneRedundancy": "Disabled", + "anonymousPullEnabled": false, + "metadataSearch": "Disabled", + "autoGeneratedDomainNameLabelScope": "Unsecure", + "roleAssignmentMode": "LegacyRegistryPermissions", + "regionalEndpoints": "Disabled", + "regionalEndpointHostNames": [], + "endpointProtocol": "IPv4" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry", + "name": "myRegistry", + "type": "Microsoft.ContainerRegistry/registries", + "location": "westus", + "tags": { + "key": "value" + }, + "sku": { + "name": "Standard", + "tier": "Standard" + }, + "properties": { + "loginServer": "myregistry.azurecr.io", + "creationDate": "2021-06-15T21:38:26.1537861Z", + "provisioningState": "Creating", + "adminUserEnabled": true, + "networkRuleSet": { + "defaultAction": "Allow", + "ipRules": [] + }, + "policies": { + "quarantinePolicy": { + "status": "disabled" + }, + "trustPolicy": { + "type": "Notary", + "status": "disabled" + }, + "retentionPolicy": { + "days": 7, + "lastUpdatedTime": "2021-06-15T21:40:12.8506835+00:00", + "status": "disabled" + }, + "exportPolicy": { + "status": "enabled" + } + }, + "encryption": { + "status": "disabled" + }, + "status": null, + "dataEndpointEnabled": false, + "dataEndpointHostNames": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Enabled", + "networkRuleBypassOptions": "AzureServices", + "networkRuleBypassAllowedForTasks": false, + "zoneRedundancy": "Disabled", + "anonymousPullEnabled": false, + "metadataSearch": "Disabled", + "autoGeneratedDomainNameLabelScope": "Unsecure", + "roleAssignmentMode": "LegacyRegistryPermissions", + "regionalEndpoints": "Disabled", + "regionalEndpointHostNames": [], + "endpointProtocol": "IPv4" + } + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryCreateAbac.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryCreateAbac.json new file mode 100644 index 00000000000..2ba2b013185 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryCreateAbac.json @@ -0,0 +1,144 @@ +{ + "title": "RegistryCreateAbac", + "operationId": "Registries_Create", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "registry": { + "location": "westus", + "tags": { + "key": "value" + }, + "sku": { + "name": "Standard" + }, + "properties": { + "roleAssignmentMode": "AbacRepositoryPermissions" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry", + "name": "myRegistry", + "type": "Microsoft.ContainerRegistry/registries", + "location": "westus", + "tags": { + "key": "value" + }, + "sku": { + "name": "Standard", + "tier": "Standard" + }, + "properties": { + "loginServer": "myregistry.azurecr.io", + "creationDate": "2021-06-15T21:38:26.1537861Z", + "provisioningState": "Succeeded", + "adminUserEnabled": true, + "networkRuleSet": { + "defaultAction": "Allow", + "ipRules": [] + }, + "policies": { + "quarantinePolicy": { + "status": "disabled" + }, + "trustPolicy": { + "type": "Notary", + "status": "disabled" + }, + "retentionPolicy": { + "days": 7, + "lastUpdatedTime": "2021-06-15T21:40:12.8506835+00:00", + "status": "disabled" + }, + "exportPolicy": { + "status": "enabled" + } + }, + "encryption": { + "status": "disabled" + }, + "status": null, + "dataEndpointEnabled": false, + "dataEndpointHostNames": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Enabled", + "networkRuleBypassOptions": "AzureServices", + "networkRuleBypassAllowedForTasks": false, + "zoneRedundancy": "Disabled", + "anonymousPullEnabled": false, + "metadataSearch": "Disabled", + "autoGeneratedDomainNameLabelScope": "Unsecure", + "roleAssignmentMode": "AbacRepositoryPermissions", + "regionalEndpoints": "Disabled", + "regionalEndpointHostNames": [], + "endpointProtocol": "IPv4" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry", + "name": "myRegistry", + "type": "Microsoft.ContainerRegistry/registries", + "location": "westus", + "tags": { + "key": "value" + }, + "sku": { + "name": "Standard", + "tier": "Standard" + }, + "properties": { + "loginServer": "myregistry.azurecr.io", + "creationDate": "2021-06-15T21:38:26.1537861Z", + "provisioningState": "Creating", + "adminUserEnabled": true, + "networkRuleSet": { + "defaultAction": "Allow", + "ipRules": [] + }, + "policies": { + "quarantinePolicy": { + "status": "disabled" + }, + "trustPolicy": { + "type": "Notary", + "status": "disabled" + }, + "retentionPolicy": { + "days": 7, + "lastUpdatedTime": "2021-06-15T21:40:12.8506835+00:00", + "status": "disabled" + }, + "exportPolicy": { + "status": "enabled" + } + }, + "encryption": { + "status": "disabled" + }, + "status": null, + "dataEndpointEnabled": false, + "dataEndpointHostNames": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Enabled", + "networkRuleBypassOptions": "AzureServices", + "networkRuleBypassAllowedForTasks": false, + "zoneRedundancy": "Disabled", + "anonymousPullEnabled": false, + "metadataSearch": "Disabled", + "autoGeneratedDomainNameLabelScope": "Unsecure", + "roleAssignmentMode": "AbacRepositoryPermissions", + "regionalEndpoints": "Disabled", + "regionalEndpointHostNames": [], + "endpointProtocol": "IPv4" + } + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryCreateDomainNameLabelScope.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryCreateDomainNameLabelScope.json new file mode 100644 index 00000000000..bf419e5f702 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryCreateDomainNameLabelScope.json @@ -0,0 +1,144 @@ +{ + "title": "RegistryCreateDomainNameLabelScope", + "operationId": "Registries_Create", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "registry": { + "location": "westus", + "tags": { + "key": "value" + }, + "sku": { + "name": "Standard" + }, + "properties": { + "autoGeneratedDomainNameLabelScope": "TenantReuse" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry", + "name": "myRegistry", + "type": "Microsoft.ContainerRegistry/registries", + "location": "westus", + "tags": { + "key": "value" + }, + "sku": { + "name": "Standard", + "tier": "Standard" + }, + "properties": { + "loginServer": "myRegistry-a1b2c3d4e5f6.azurecr.io", + "creationDate": "2021-06-15T21:38:26.1537861Z", + "provisioningState": "Succeeded", + "adminUserEnabled": false, + "networkRuleSet": { + "defaultAction": "Allow", + "ipRules": [] + }, + "policies": { + "quarantinePolicy": { + "status": "disabled" + }, + "trustPolicy": { + "type": "Notary", + "status": "disabled" + }, + "retentionPolicy": { + "days": 7, + "lastUpdatedTime": "2021-06-15T21:40:12.8506835+00:00", + "status": "disabled" + }, + "exportPolicy": { + "status": "enabled" + } + }, + "encryption": { + "status": "disabled" + }, + "status": null, + "dataEndpointEnabled": false, + "dataEndpointHostNames": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Enabled", + "networkRuleBypassOptions": "AzureServices", + "networkRuleBypassAllowedForTasks": false, + "zoneRedundancy": "Disabled", + "anonymousPullEnabled": false, + "metadataSearch": "Disabled", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "roleAssignmentMode": "LegacyRegistryPermissions", + "regionalEndpoints": "Disabled", + "regionalEndpointHostNames": [], + "endpointProtocol": "IPv4" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry", + "name": "myRegistry", + "type": "Microsoft.ContainerRegistry/registries", + "location": "westus", + "tags": { + "key": "value" + }, + "sku": { + "name": "Standard", + "tier": "Standard" + }, + "properties": { + "loginServer": "myRegistry-a1b2c3d4e5f6.azurecr.io", + "creationDate": "2021-06-15T21:38:26.1537861Z", + "provisioningState": "Creating", + "adminUserEnabled": false, + "networkRuleSet": { + "defaultAction": "Allow", + "ipRules": [] + }, + "policies": { + "quarantinePolicy": { + "status": "disabled" + }, + "trustPolicy": { + "type": "Notary", + "status": "disabled" + }, + "retentionPolicy": { + "days": 7, + "lastUpdatedTime": "2021-06-15T21:40:12.8506835+00:00", + "status": "disabled" + }, + "exportPolicy": { + "status": "enabled" + } + }, + "encryption": { + "status": "disabled" + }, + "status": null, + "dataEndpointEnabled": false, + "dataEndpointHostNames": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Enabled", + "networkRuleBypassOptions": "AzureServices", + "networkRuleBypassAllowedForTasks": false, + "zoneRedundancy": "Disabled", + "anonymousPullEnabled": false, + "metadataSearch": "Disabled", + "autoGeneratedDomainNameLabelScope": "TenantReuse", + "roleAssignmentMode": "LegacyRegistryPermissions", + "regionalEndpoints": "Disabled", + "regionalEndpointHostNames": [], + "endpointProtocol": "IPv4" + } + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryCreateZoneRedundant.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryCreateZoneRedundant.json new file mode 100644 index 00000000000..425f27d775d --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryCreateZoneRedundant.json @@ -0,0 +1,147 @@ +{ + "title": "RegistryCreateZoneRedundant", + "operationId": "Registries_Create", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "registry": { + "location": "westus", + "tags": { + "key": "value" + }, + "sku": { + "name": "Standard" + }, + "properties": { + "zoneRedundancy": "Enabled" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry", + "name": "myRegistry", + "type": "Microsoft.ContainerRegistry/registries", + "location": "westus", + "tags": { + "key": "value" + }, + "sku": { + "name": "Standard", + "tier": "Standard" + }, + "properties": { + "loginServer": "myregistry.azurecr.io", + "creationDate": "2021-06-15T21:38:26.1537861Z", + "provisioningState": "Succeeded", + "adminUserEnabled": false, + "networkRuleSet": { + "defaultAction": "Allow", + "ipRules": [] + }, + "policies": { + "quarantinePolicy": { + "status": "disabled" + }, + "trustPolicy": { + "type": "Notary", + "status": "disabled" + }, + "retentionPolicy": { + "days": 7, + "lastUpdatedTime": "2021-06-15T21:40:12.8506835+00:00", + "status": "disabled" + }, + "exportPolicy": { + "status": "enabled" + } + }, + "encryption": { + "status": "disabled" + }, + "status": null, + "dataEndpointEnabled": false, + "dataEndpointHostNames": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Enabled", + "networkRuleBypassOptions": "AzureServices", + "networkRuleBypassAllowedForTasks": false, + "zoneRedundancy": "Enabled", + "anonymousPullEnabled": false, + "metadataSearch": "Disabled", + "autoGeneratedDomainNameLabelScope": "Unsecure", + "roleAssignmentMode": "LegacyRegistryPermissions", + "regionalEndpoints": "Disabled", + "regionalEndpointHostNames": [], + "endpointProtocol": "IPv4" + } + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/operationStatuses/registries-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" + }, + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry", + "name": "myRegistry", + "type": "Microsoft.ContainerRegistry/registries", + "location": "westus", + "tags": { + "key": "value" + }, + "sku": { + "name": "Standard", + "tier": "Standard" + }, + "properties": { + "loginServer": "myregistry.azurecr.io", + "creationDate": "2021-06-15T21:38:26.1537861Z", + "provisioningState": "Creating", + "adminUserEnabled": false, + "networkRuleSet": { + "defaultAction": "Allow", + "ipRules": [] + }, + "policies": { + "quarantinePolicy": { + "status": "disabled" + }, + "trustPolicy": { + "type": "Notary", + "status": "disabled" + }, + "retentionPolicy": { + "days": 7, + "lastUpdatedTime": "2021-06-15T21:40:12.8506835+00:00", + "status": "disabled" + }, + "exportPolicy": { + "status": "enabled" + } + }, + "encryption": { + "status": "disabled" + }, + "status": null, + "dataEndpointEnabled": false, + "dataEndpointHostNames": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Enabled", + "networkRuleBypassOptions": "AzureServices", + "networkRuleBypassAllowedForTasks": false, + "zoneRedundancy": "Enabled", + "anonymousPullEnabled": false, + "metadataSearch": "Disabled", + "autoGeneratedDomainNameLabelScope": "Unsecure", + "roleAssignmentMode": "LegacyRegistryPermissions", + "regionalEndpoints": "Disabled", + "regionalEndpointHostNames": [], + "endpointProtocol": "IPv4" + } + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryDelete.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryDelete.json new file mode 100644 index 00000000000..75b63b59f39 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryDelete.json @@ -0,0 +1,19 @@ +{ + "title": "RegistryDelete", + "operationId": "Registries_Delete", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/operationStatuses/registries-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" + } + }, + "204": {} + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryGenerateCredentials.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryGenerateCredentials.json new file mode 100644 index 00000000000..71b2bada16d --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryGenerateCredentials.json @@ -0,0 +1,38 @@ +{ + "title": "RegistryGenerateCredentials", + "operationId": "Registries_GenerateCredentials", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "generateCredentialsParameters": { + "tokenId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/myToken", + "expiry": "2020-12-31T15:59:59.0707808Z" + } + }, + "responses": { + "200": { + "body": { + "username": "myToken", + "passwords": [ + { + "expiry": "2020-12-31T15:59:59.0707808Z", + "name": "password1", + "value": "00000000000000000000000000000000" + }, + { + "expiry": "2020-12-31T15:59:59.0707808Z", + "name": "password2", + "value": "00000000000000000000000000000000" + } + ] + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/operationStatuses/registries-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryGet.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryGet.json new file mode 100644 index 00000000000..1a85547d1ff --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryGet.json @@ -0,0 +1,72 @@ +{ + "title": "RegistryGet", + "operationId": "Registries_Get", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry", + "name": "myRegistry", + "type": "Microsoft.ContainerRegistry/registries", + "location": "westus", + "tags": { + "key": "value" + }, + "sku": { + "name": "Standard", + "tier": "Standard" + }, + "properties": { + "loginServer": "myregistry.azurecr.io", + "creationDate": "2021-06-15T21:38:26.1537861Z", + "provisioningState": "Succeeded", + "adminUserEnabled": false, + "networkRuleSet": { + "defaultAction": "Allow", + "ipRules": [] + }, + "policies": { + "quarantinePolicy": { + "status": "disabled" + }, + "trustPolicy": { + "type": "Notary", + "status": "disabled" + }, + "retentionPolicy": { + "days": 7, + "lastUpdatedTime": "2021-06-15T21:40:12.8506835+00:00", + "status": "disabled" + }, + "exportPolicy": { + "status": "enabled" + } + }, + "encryption": { + "status": "disabled" + }, + "status": null, + "dataEndpointEnabled": false, + "dataEndpointHostNames": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Enabled", + "networkRuleBypassOptions": "AzureServices", + "networkRuleBypassAllowedForTasks": false, + "zoneRedundancy": "Disabled", + "anonymousPullEnabled": false, + "metadataSearch": "Disabled", + "autoGeneratedDomainNameLabelScope": "Unsecure", + "roleAssignmentMode": "LegacyRegistryPermissions", + "regionalEndpoints": "Disabled", + "regionalEndpointHostNames": [], + "endpointProtocol": "IPv4" + } + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryGetPrivateLinkResource.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryGetPrivateLinkResource.json new file mode 100644 index 00000000000..a6994533624 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryGetPrivateLinkResource.json @@ -0,0 +1,30 @@ +{ + "title": "RegistryGetPrivateLinkResource", + "operationId": "Registries_GetPrivateLinkResource", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "groupName": "registry" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/privateLinkResources/registry", + "name": "registry", + "type": "Microsoft.ContainerRegistry/registries/privateLinkResources", + "properties": { + "groupId": "registry", + "requiredMembers": [ + "registry", + "registry_data_myregion" + ], + "requiredZoneNames": [ + "privatelink.azurecr.io" + ] + } + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryList.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryList.json new file mode 100644 index 00000000000..6d4bd5749f7 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryList.json @@ -0,0 +1,74 @@ +{ + "title": "RegistryList", + "operationId": "Registries_List", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry", + "name": "myRegistry", + "type": "Microsoft.ContainerRegistry/registries", + "location": "westus", + "tags": { + "key": "value" + }, + "sku": { + "name": "Standard", + "tier": "Standard" + }, + "properties": { + "loginServer": "myregistry.azurecr.io", + "creationDate": "2021-06-15T21:38:26.1537861Z", + "provisioningState": "Succeeded", + "adminUserEnabled": false, + "networkRuleSet": { + "defaultAction": "Allow", + "ipRules": [] + }, + "policies": { + "quarantinePolicy": { + "status": "disabled" + }, + "trustPolicy": { + "type": "Notary", + "status": "disabled" + }, + "retentionPolicy": { + "days": 7, + "lastUpdatedTime": "2021-06-15T21:40:12.8506835+00:00", + "status": "disabled" + }, + "exportPolicy": { + "status": "enabled" + } + }, + "encryption": { + "status": "disabled" + }, + "status": null, + "dataEndpointEnabled": false, + "dataEndpointHostNames": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Enabled", + "networkRuleBypassOptions": "AzureServices", + "networkRuleBypassAllowedForTasks": false, + "zoneRedundancy": "Disabled", + "anonymousPullEnabled": false, + "metadataSearch": "Disabled", + "autoGeneratedDomainNameLabelScope": "Unsecure", + "roleAssignmentMode": "LegacyRegistryPermissions", + "regionalEndpoints": "Disabled", + "regionalEndpointHostNames": [], + "endpointProtocol": "IPv4" + } + } + ] + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryListByResourceGroup.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryListByResourceGroup.json new file mode 100644 index 00000000000..a7354c1375a --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryListByResourceGroup.json @@ -0,0 +1,75 @@ +{ + "title": "RegistryListByResourceGroup", + "operationId": "Registries_ListByResourceGroup", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry", + "name": "myRegistry", + "type": "Microsoft.ContainerRegistry/registries", + "location": "westus", + "tags": { + "key": "value" + }, + "sku": { + "name": "Standard", + "tier": "Standard" + }, + "properties": { + "loginServer": "myregistry.azurecr.io", + "creationDate": "2021-06-15T21:38:26.1537861Z", + "provisioningState": "Succeeded", + "adminUserEnabled": false, + "networkRuleSet": { + "defaultAction": "Allow", + "ipRules": [] + }, + "policies": { + "quarantinePolicy": { + "status": "disabled" + }, + "trustPolicy": { + "type": "Notary", + "status": "disabled" + }, + "retentionPolicy": { + "days": 7, + "lastUpdatedTime": "2021-06-15T21:40:12.8506835+00:00", + "status": "disabled" + }, + "exportPolicy": { + "status": "enabled" + } + }, + "encryption": { + "status": "disabled" + }, + "status": null, + "dataEndpointEnabled": false, + "dataEndpointHostNames": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Enabled", + "networkRuleBypassOptions": "AzureServices", + "networkRuleBypassAllowedForTasks": false, + "zoneRedundancy": "Disabled", + "anonymousPullEnabled": false, + "metadataSearch": "Disabled", + "autoGeneratedDomainNameLabelScope": "Unsecure", + "roleAssignmentMode": "LegacyRegistryPermissions", + "regionalEndpoints": "Disabled", + "regionalEndpointHostNames": [], + "endpointProtocol": "IPv4" + } + } + ] + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryListCredentials.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryListCredentials.json new file mode 100644 index 00000000000..c2c4310ef40 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryListCredentials.json @@ -0,0 +1,27 @@ +{ + "title": "RegistryListCredentials", + "operationId": "Registries_ListCredentials", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry" + }, + "responses": { + "200": { + "body": { + "username": "myRegistry", + "passwords": [ + { + "name": "password", + "value": "00000000000000000000000000000000" + }, + { + "name": "password2", + "value": "00000000000000000000000000000000" + } + ] + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryListPrivateLinkResources.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryListPrivateLinkResources.json new file mode 100644 index 00000000000..30342b449d4 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryListPrivateLinkResources.json @@ -0,0 +1,33 @@ +{ + "title": "RegistryListPrivateLinkResources", + "operationId": "Registries_ListPrivateLinkResources", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/privateLinkResources/registry", + "name": "registry", + "type": "Microsoft.ContainerRegistry/registries/privateLinkResources", + "properties": { + "groupId": "registry", + "requiredMembers": [ + "registry", + "registry_data_myregion" + ], + "requiredZoneNames": [ + "privatelink.azurecr.io" + ] + } + } + ] + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryListUsages.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryListUsages.json new file mode 100644 index 00000000000..8811f4b6175 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryListUsages.json @@ -0,0 +1,30 @@ +{ + "title": "RegistryListUsages", + "operationId": "Registries_ListUsages", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Size", + "limit": 107374182400, + "currentValue": 12345678, + "unit": "Bytes" + }, + { + "name": "Webhooks", + "limit": 10, + "currentValue": 2, + "unit": "Count" + } + ] + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryRegenerateCredential.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryRegenerateCredential.json new file mode 100644 index 00000000000..d26b950e6a7 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryRegenerateCredential.json @@ -0,0 +1,30 @@ +{ + "title": "RegistryRegenerateCredential", + "operationId": "Registries_RegenerateCredential", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "regenerateCredentialParameters": { + "name": "password" + } + }, + "responses": { + "200": { + "body": { + "username": "myRegistry", + "passwords": [ + { + "name": "password", + "value": "00000000000000000000000000000000" + }, + { + "name": "password2", + "value": "00000000000000000000000000000000" + } + ] + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryUpdate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryUpdate.json new file mode 100644 index 00000000000..d0349ea1de2 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryUpdate.json @@ -0,0 +1,147 @@ +{ + "title": "RegistryUpdate", + "operationId": "Registries_Update", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "registryUpdateParameters": { + "tags": { + "key": "value" + }, + "sku": { + "name": "Standard" + }, + "properties": { + "adminUserEnabled": true, + "roleAssignmentMode": "AbacRepositoryPermissions" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry", + "name": "myRegistry", + "type": "Microsoft.ContainerRegistry/registries", + "location": "westus", + "tags": { + "key": "value" + }, + "sku": { + "name": "Standard", + "tier": "Standard" + }, + "properties": { + "loginServer": "myregistry.azurecr.io", + "creationDate": "2021-06-15T21:38:26.1537861Z", + "provisioningState": "Succeeded", + "adminUserEnabled": true, + "networkRuleSet": { + "defaultAction": "Allow", + "ipRules": [] + }, + "policies": { + "quarantinePolicy": { + "status": "disabled" + }, + "trustPolicy": { + "type": "Notary", + "status": "disabled" + }, + "retentionPolicy": { + "days": 7, + "lastUpdatedTime": "2021-06-15T21:40:12.8506835+00:00", + "status": "disabled" + }, + "exportPolicy": { + "status": "enabled" + } + }, + "encryption": { + "status": "disabled" + }, + "status": null, + "dataEndpointEnabled": false, + "dataEndpointHostNames": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Enabled", + "networkRuleBypassOptions": "AzureServices", + "networkRuleBypassAllowedForTasks": false, + "zoneRedundancy": "Disabled", + "anonymousPullEnabled": false, + "metadataSearch": "Disabled", + "autoGeneratedDomainNameLabelScope": "Unsecure", + "roleAssignmentMode": "AbacRepositoryPermissions", + "regionalEndpoints": "Disabled", + "regionalEndpointHostNames": [], + "endpointProtocol": "IPv4" + } + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/operationStatuses/registries-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" + }, + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry", + "name": "myRegistry", + "type": "Microsoft.ContainerRegistry/registries", + "location": "westus", + "tags": { + "key": "value" + }, + "sku": { + "name": "Standard", + "tier": "Standard" + }, + "properties": { + "loginServer": "myregistry.azurecr.io", + "creationDate": "2021-06-15T21:38:26.1537861Z", + "provisioningState": "Updating", + "adminUserEnabled": true, + "networkRuleSet": { + "defaultAction": "Allow", + "ipRules": [] + }, + "policies": { + "quarantinePolicy": { + "status": "disabled" + }, + "trustPolicy": { + "type": "Notary", + "status": "disabled" + }, + "retentionPolicy": { + "days": 7, + "lastUpdatedTime": "2021-06-15T21:40:12.8506835+00:00", + "status": "disabled" + }, + "exportPolicy": { + "status": "enabled" + } + }, + "encryption": { + "status": "disabled" + }, + "status": null, + "dataEndpointEnabled": false, + "dataEndpointHostNames": [], + "privateEndpointConnections": [], + "publicNetworkAccess": "Enabled", + "networkRuleBypassOptions": "AzureServices", + "networkRuleBypassAllowedForTasks": false, + "zoneRedundancy": "Disabled", + "anonymousPullEnabled": false, + "metadataSearch": "Disabled", + "autoGeneratedDomainNameLabelScope": "Unsecure", + "roleAssignmentMode": "AbacRepositoryPermissions", + "regionalEndpoints": "Disabled", + "regionalEndpointHostNames": [], + "endpointProtocol": "IPv4" + } + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ReplicationCreate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ReplicationCreate.json new file mode 100644 index 00000000000..9f27e9b0159 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ReplicationCreate.json @@ -0,0 +1,64 @@ +{ + "title": "ReplicationCreate", + "operationId": "Replications_Create", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "replicationName": "myReplication", + "replication": { + "location": "eastus", + "tags": { + "key": "value" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/replications/myReplication", + "name": "myReplication", + "type": "Microsoft.ContainerRegistry/registries/replications", + "location": "eastus", + "tags": { + "key": "value" + }, + "properties": { + "provisioningState": "Succeeded", + "status": { + "displayStatus": "Ready", + "message": "The replication is ready.", + "timestamp": "2017-03-01T23:15:37.0707808Z" + }, + "regionEndpointEnabled": true, + "zoneRedundancy": "Disabled" + } + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/replications/myReplication/operationStatuses/replications-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" + }, + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/replications/myReplication", + "name": "myReplication", + "type": "Microsoft.ContainerRegistry/registries/replications", + "location": "eastus", + "tags": { + "key": "value" + }, + "properties": { + "provisioningState": "Creating", + "status": { + "displayStatus": "Provisioning", + "message": "The replication is provisioning.", + "timestamp": "2017-03-01T23:15:37.0707808Z" + }, + "regionEndpointEnabled": true, + "zoneRedundancy": "Disabled" + } + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ReplicationCreateZoneRedundant.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ReplicationCreateZoneRedundant.json new file mode 100644 index 00000000000..8df9ac715a4 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ReplicationCreateZoneRedundant.json @@ -0,0 +1,68 @@ +{ + "title": "ReplicationCreateZoneRedundant", + "operationId": "Replications_Create", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "replicationName": "myReplication", + "replication": { + "location": "eastus", + "tags": { + "key": "value" + }, + "properties": { + "regionEndpointEnabled": true, + "zoneRedundancy": "Enabled" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/replications/myReplication", + "name": "myReplication", + "type": "Microsoft.ContainerRegistry/registries/replications", + "location": "eastus", + "tags": { + "key": "value" + }, + "properties": { + "provisioningState": "Succeeded", + "status": { + "displayStatus": "Ready", + "message": "The replication is ready.", + "timestamp": "2017-03-01T23:15:37.0707808Z" + }, + "regionEndpointEnabled": true, + "zoneRedundancy": "Enabled" + } + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/replications/myReplication/operationStatuses/replications-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" + }, + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/replications/myReplication", + "name": "myReplication", + "type": "Microsoft.ContainerRegistry/registries/replications", + "location": "eastus", + "tags": { + "key": "value" + }, + "properties": { + "provisioningState": "Creating", + "status": { + "displayStatus": "Provisioning", + "message": "The replication is provisioning.", + "timestamp": "2017-03-01T23:15:37.0707808Z" + }, + "regionEndpointEnabled": true, + "zoneRedundancy": "Enabled" + } + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ReplicationDelete.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ReplicationDelete.json new file mode 100644 index 00000000000..44fc956e35d --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ReplicationDelete.json @@ -0,0 +1,20 @@ +{ + "title": "ReplicationDelete", + "operationId": "Replications_Delete", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "replicationName": "myReplication" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/replications/myReplication/operationStatuses/replications-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" + } + }, + "204": {} + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ReplicationGet.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ReplicationGet.json new file mode 100644 index 00000000000..67355487ce1 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ReplicationGet.json @@ -0,0 +1,34 @@ +{ + "title": "ReplicationGet", + "operationId": "Replications_Get", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "replicationName": "myReplication" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/replications/myReplication", + "name": "myReplication", + "type": "Microsoft.ContainerRegistry/registries/replications", + "location": "eastus", + "tags": { + "key": "value" + }, + "properties": { + "provisioningState": "Succeeded", + "status": { + "displayStatus": "Ready", + "message": "The replication is ready.", + "timestamp": "2017-03-01T23:15:37.0707808Z" + }, + "regionEndpointEnabled": true, + "zoneRedundancy": "Disabled" + } + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ReplicationList.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ReplicationList.json new file mode 100644 index 00000000000..3afcb569173 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ReplicationList.json @@ -0,0 +1,37 @@ +{ + "title": "ReplicationList", + "operationId": "Replications_List", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/replications/myReplication", + "name": "myReplication", + "type": "Microsoft.ContainerRegistry/registries/replications", + "location": "eastus", + "tags": { + "key": "value" + }, + "properties": { + "provisioningState": "Succeeded", + "status": { + "displayStatus": "Ready", + "message": "The replication is ready.", + "timestamp": "2017-03-01T23:15:37.0707808Z" + }, + "regionEndpointEnabled": true, + "zoneRedundancy": "Disabled" + } + } + ] + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ReplicationUpdate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ReplicationUpdate.json new file mode 100644 index 00000000000..2d3905400ff --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ReplicationUpdate.json @@ -0,0 +1,63 @@ +{ + "title": "ReplicationUpdate", + "operationId": "Replications_Update", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "replicationName": "myReplication", + "replicationUpdateParameters": { + "tags": { + "key": "value" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/replications/myReplication", + "name": "myReplication", + "type": "Microsoft.ContainerRegistry/registries/replications", + "location": "eastus", + "tags": { + "key": "value" + }, + "properties": { + "provisioningState": "Succeeded", + "status": { + "displayStatus": "Ready", + "message": "The replication is ready.", + "timestamp": "2017-03-01T23:15:37.0707808Z" + }, + "regionEndpointEnabled": true, + "zoneRedundancy": "Disabled" + } + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/replications/myReplication/operationStatuses/replications-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" + }, + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/replications/myReplication", + "name": "myReplication", + "type": "Microsoft.ContainerRegistry/registries/replications", + "location": "eastus", + "tags": { + "key": "value" + }, + "properties": { + "provisioningState": "Updating", + "status": { + "displayStatus": "Provisioning", + "message": "The replication is provisioning.", + "timestamp": "2017-03-01T23:15:37.0707808Z" + }, + "regionEndpointEnabled": true, + "zoneRedundancy": "Disabled" + } + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ScopeMapCreate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ScopeMapCreate.json new file mode 100644 index 00000000000..a4a87f50b24 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ScopeMapCreate.json @@ -0,0 +1,57 @@ +{ + "title": "ScopeMapCreate", + "operationId": "ScopeMaps_Create", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "scopeMapName": "myScopeMap", + "scopeMapCreateParameters": { + "properties": { + "description": "Developer Scopes", + "actions": [ + "repositories/myrepository/contentWrite", + "repositories/myrepository/delete" + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myScopeMap", + "name": "myScopeMap", + "type": "Microsoft.ContainerRegistry/registries/scopeMaps", + "properties": { + "creationDate": "2017-03-01T23:14:37.0707808Z", + "type": "IsUserDefined", + "actions": [ + "repositories/myrepository/contentWrite", + "repositories/myrepository/delete" + ], + "provisioningState": "Succeeded" + } + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myScopeMap/operationStatuses/scopemaps-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" + }, + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myScopeMap", + "name": "myScopeMap", + "type": "Microsoft.ContainerRegistry/registries/scopeMaps", + "properties": { + "creationDate": "2017-03-01T23:14:37.0707808Z", + "type": "IsUserDefined", + "actions": [ + "repositories/myrepository/contentWrite", + "repositories/myrepository/delete" + ], + "provisioningState": "Succeeded" + } + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ScopeMapDelete.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ScopeMapDelete.json new file mode 100644 index 00000000000..1130b71e7f6 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ScopeMapDelete.json @@ -0,0 +1,20 @@ +{ + "title": "ScopeMapDelete", + "operationId": "ScopeMaps_Delete", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "scopeMapName": "myScopeMap" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myScopeMap/operationStatuses/scopemaps-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" + } + }, + "204": {} + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ScopeMapGet.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ScopeMapGet.json new file mode 100644 index 00000000000..0e5797bd370 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ScopeMapGet.json @@ -0,0 +1,29 @@ +{ + "title": "ScopeMapGet", + "operationId": "ScopeMaps_Get", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "scopeMapName": "myScopeMap" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myScopeMap", + "name": "myScopeMap", + "type": "Microsoft.ContainerRegistry/registries/scopeMaps", + "properties": { + "creationDate": "2017-03-01T23:14:37.0707808Z", + "type": "IsUserDefined", + "actions": [ + "repositories/myrepository/contentWrite", + "repositories/myrepository/delete" + ], + "provisioningState": "Succeeded" + } + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ScopeMapList.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ScopeMapList.json new file mode 100644 index 00000000000..01df9b08cca --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ScopeMapList.json @@ -0,0 +1,32 @@ +{ + "title": "ScopeMapList", + "operationId": "ScopeMaps_List", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myScopeMap", + "name": "myScopeMap", + "type": "Microsoft.ContainerRegistry/registries/scopeMaps", + "properties": { + "creationDate": "2017-03-01T23:14:37.0707808Z", + "type": "IsUserDefined", + "actions": [ + "repositories/myrepository/contentWrite", + "repositories/myrepository/delete" + ], + "provisioningState": "Succeeded" + } + } + ] + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ScopeMapUpdate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ScopeMapUpdate.json new file mode 100644 index 00000000000..8a526af52eb --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ScopeMapUpdate.json @@ -0,0 +1,57 @@ +{ + "title": "ScopeMapUpdate", + "operationId": "ScopeMaps_Update", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "scopeMapName": "myScopeMap", + "scopeMapUpdateParameters": { + "properties": { + "description": "Developer Scopes", + "actions": [ + "repositories/myrepository/contentWrite", + "repositories/myrepository/contentRead" + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myScopeMap", + "name": "myScopeMap", + "type": "Microsoft.ContainerRegistry/registries/scopeMaps", + "properties": { + "creationDate": "2017-03-01T23:14:37.0707808Z", + "type": "IsUserDefined", + "actions": [ + "repositories/myrepository/contentWrite", + "repositories/myrepository/contentRead" + ], + "provisioningState": "Succeeded" + } + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myScopeMap/operationStatuses/scopemaps-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" + }, + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myScopeMap", + "name": "myScopeMap", + "type": "Microsoft.ContainerRegistry/registries/scopeMaps", + "properties": { + "creationDate": "2017-03-01T23:14:37.0707808Z", + "type": "IsUserDefined", + "actions": [ + "repositories/myrepository/contentWrite", + "repositories/myrepository/contentRead" + ], + "provisioningState": "Succeeded" + } + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/TokenCreate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/TokenCreate.json new file mode 100644 index 00000000000..2a8da522fa1 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/TokenCreate.json @@ -0,0 +1,74 @@ +{ + "title": "TokenCreate", + "operationId": "Tokens_Create", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "tokenName": "myToken", + "tokenCreateParameters": { + "properties": { + "scopeMapId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myScopeMap", + "status": "disabled", + "credentials": { + "certificates": [ + { + "name": "certificate1", + "encodedPemCertificate": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUc3akNDQk5hZ0F3SUJBZ0lURmdBQlR3UVpyZGdmdmhxdzBnQUFBQUZQQkRBTkJna3Foa2lHOXcwQkFRc0YKQURDQml6RUxNQWtHQTFVRUJoTUNWVk14RXpBUkJnTlZCQWdUQ2xkaGMyaHBibWQwYjI0eEVEQU9CZ05WQkFjVApCMUpsWkcxdmJtUXhIakFjQmdOVkJBb1RGVTFwWTNKdmMyOW1kQ0JEYjNKd2IzSmhkR2x2YmpFVk1CTUdBMVVFCkN4TU1UV2xqY205emIyWjBJRWxVTVI0d0hBWURWUVFERXhWTmFXTnliM052Wm5RZ1NWUWdWRXhUSUVOQklEUXcKSGhjTk1UZ3dOREV5TWpJek1qUTRXaGNOTWpBd05ERXlNakl6TWpRNFdqQTVNVGN3TlFZRFZRUURFeTV6WlhKMgphV05sWTJ4cFpXNTBZMlZ5ZEMxd1lYSjBibVZ5TG0xaGJtRm5aVzFsYm5RdVlYcDFjbVV1WTI5dE1JSUJJakFOCkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQTBSYjdJcHpxMmR4emhhbVpyS1ZDakMzeTQyYlYKUnNIY2pCUTFuSDBHZ1puUDhXeDZDSE1mWThybkVJQzRLeVRRYkJXVzhnNXlmc3NSQ0ZXbFpxYjR6SkRXS0pmTgpGSmNMUm9LNnhwTktZYVZVTkVlT25IdUxHYTM0ZlA0VjBFRjZybzdvbkRLME5zanhjY1dZVzRNVXVzc0xrQS94CkUrM2RwU1REdk1KcjJoWUpsVnFDcVR6blQvbmZaVUZzQUVEQnp5MUpOOHZiZDlIR2czc2Myd0x4dk95cFJOc0gKT1V3V2pmN2xzWWZleEVlcWkzY29EeHc2alpLVWEyVkdsUnBpTkowMjhBQitYSi9TU1FVNVBsd0JBbU9TT3ovRApGY0NKdGpPZlBqU1NKckFIQVV3SHU3RzlSV05JTFBwYU9zQ1J5eitETE5zNGpvNlEvUUg4d1lManJRSURBUUFCCm80SUNtakNDQXBZd0N3WURWUjBQQkFRREFnU3dNQjBHQTFVZEpRUVdNQlFHQ0NzR0FRVUZCd01DQmdnckJnRUYKQlFjREFUQWRCZ05WSFE0RUZnUVVlbEdkVVJrZzJoSFFOWEQ4WUc4L3drdjJVT0F3SHdZRFZSMGpCQmd3Rm9BVQplbnVNd2Mvbm9Nb2MxR3Y2KytFend3OGFvcDB3Z2F3R0ExVWRId1NCcERDQm9UQ0JucUNCbTZDQm1JWkxhSFIwCmNEb3ZMMjF6WTNKc0xtMXBZM0p2YzI5bWRDNWpiMjB2Y0d0cEwyMXpZMjl5Y0M5amNtd3ZUV2xqY205emIyWjAKSlRJd1NWUWxNakJVVEZNbE1qQkRRU1V5TURRdVkzSnNoa2xvZEhSd09pOHZZM0pzTG0xcFkzSnZjMjltZEM1agpiMjB2Y0d0cEwyMXpZMjl5Y0M5amNtd3ZUV2xqY205emIyWjBKVEl3U1ZRbE1qQlVURk1sTWpCRFFTVXlNRFF1ClkzSnNNSUdGQmdnckJnRUZCUWNCQVFSNU1IY3dVUVlJS3dZQkJRVUhNQUtHUldoMGRIQTZMeTkzZDNjdWJXbGoKY205emIyWjBMbU52YlM5d2Eya3ZiWE5qYjNKd0wwMXBZM0p2YzI5bWRDVXlNRWxVSlRJd1ZFeFRKVEl3UTBFbApNakEwTG1OeWREQWlCZ2dyQmdFRkJRY3dBWVlXYUhSMGNEb3ZMMjlqYzNBdWJYTnZZM053TG1OdmJUQStCZ2tyCkJnRUVBWUkzRlFjRU1UQXZCaWNyQmdFRUFZSTNGUWlIMm9aMWcrN1pBWUxKaFJ1QnRaNWhoZlRyWUlGZGhOTGYKUW9Mbmszb0NBV1FDQVIwd1RRWURWUjBnQkVZd1JEQkNCZ2tyQmdFRUFZSTNLZ0V3TlRBekJnZ3JCZ0VGQlFjQwpBUlluYUhSMGNEb3ZMM2QzZHk1dGFXTnliM052Wm5RdVkyOXRMM0JyYVM5dGMyTnZjbkF2WTNCek1DY0dDU3NHCkFRUUJnamNWQ2dRYU1CZ3dDZ1lJS3dZQkJRVUhBd0l3Q2dZSUt3WUJCUVVIQXdFd09RWURWUjBSQkRJd01JSXUKYzJWeWRtbGpaV05zYVdWdWRHTmxjblF0Y0dGeWRHNWxjaTV0WVc1aFoyVnRaVzUwTG1GNmRYSmxMbU52YlRBTgpCZ2txaGtpRzl3MEJBUXNGQUFPQ0FnRUFIVXIzbk1vdUI5WWdDUlRWYndUTllIS2RkWGJkSW1GUXNDYys4T1g1CjE5c0N6dFFSR05iSXEwVW1Ba01MbFVvWTIxckh4ZXdxU2hWczFhL2RwaFh5Tk1pcUdaU2QzU1BtYzZscitqUFQKNXVEREs0MUlWeXN0K2VUNlpyazFvcCtMVmdkeS9EU2lyNzVqcWZFY016bS82bU8rNnFNeWRLTWtVYmM5K3JHVwphUkpUcjRWUUdIRmEwNEIwZVZpNUd4MG9pL2RpZDNSaXg2aXJMMjFJSGEwYjN6c1hzZHpHU0R2K3hqL2Q2S0l4Ckdrd2FhYmZvU1NoQnFqaFNlQ0VyZXFlb1RpYjljdGw0MGRVdUp3THl4bjhHS2N6K3AvMEJUOEIxU3lYK01OQ2wKY0pkMjVtMjhLajY2TGUxOEVyeFlJYXZJVGVGa3Y2eGZjdkEvcHladDdPaU41QTlGQk1IUmpQK1kyZ2tvdjMrcQpISFRUZG4xNnlRajduNit3YlFHNGVleXc0YisyQkRLcUxNVFU2ZmlSQ3ZPM2FPZVBLSFVNN3R4b1FidWl6Z3NzCkNiMzl3QnJOTEZsMkJLQ1RkSCtkSU9oZVJiSkZvbmlwOGRPOUVFZWdSSG9lQW54ZUlYTFBrdXMzTzEvZjRhNkIKWHQ3RG5BUm8xSzJmeEp3VXRaU2MvR3dFSjU5NzlnRXlEa3pDZEVsLzdpWE9QZXVjTXhlM2xVM2pweUtsNERUaApjSkJqQytqNGpLWTFrK1U4b040aGdqYnJISUx6Vnd2eU15OU5KS290U3BMSjQxeHdPOHlGangxalFTT3Bxc0N1ClFhUFUvTjhSZ0hxWjBGTkFzS3dNUmZ6WmdXanRCNzRzYUVEdk5jVmNuNFhCQnFNSG0ydHo2Uzk3d3kxZGt0cTgKSE5BPQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==" + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/myToken", + "name": "myToken", + "type": "Microsoft.ContainerRegistry/registries/tokens", + "properties": { + "creationDate": "2017-03-01T23:14:37.0707808Z", + "scopeMapId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myScopeMap", + "provisioningState": "Succeeded", + "status": "disabled", + "credentials": { + "certificates": [ + { + "name": "certificate1", + "thumbprint": "feeb79a888bf1415f8e17c4965a2a5bb5c8a2ff7", + "expiry": "2020-12-04T15:32:48.0707808Z" + } + ] + } + } + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/myToken/operationStatuses/tokens-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" + }, + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/myToken", + "name": "myToken", + "type": "Microsoft.ContainerRegistry/registries/tokens", + "properties": { + "creationDate": "2017-03-01T23:14:37.0707808Z", + "scopeMapId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myScopeMap", + "provisioningState": "Succeeded", + "status": "disabled", + "credentials": { + "certificates": [ + { + "name": "certificate1", + "thumbprint": "feeb79a888bf1415f8e17c4965a2a5bb5c8a2ff7", + "expiry": "2020-12-04T15:32:48.0707808Z" + } + ] + } + } + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/TokenDelete.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/TokenDelete.json new file mode 100644 index 00000000000..f802e0609ba --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/TokenDelete.json @@ -0,0 +1,20 @@ +{ + "title": "TokenDelete", + "operationId": "Tokens_Delete", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "tokenName": "myToken" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/myToken/operationStatuses/tokens-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" + } + }, + "204": {} + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/TokenGet.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/TokenGet.json new file mode 100644 index 00000000000..8f99f9a5b8c --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/TokenGet.json @@ -0,0 +1,26 @@ +{ + "title": "TokenGet", + "operationId": "Tokens_Get", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "tokenName": "myToken" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/myToken", + "name": "myToken", + "type": "Microsoft.ContainerRegistry/registries/tokens", + "properties": { + "creationDate": "2017-03-01T23:14:37.0707808Z", + "scopeMapId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myScopeMap", + "provisioningState": "Succeeded", + "status": "enabled" + } + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/TokenList.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/TokenList.json new file mode 100644 index 00000000000..270bd908baf --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/TokenList.json @@ -0,0 +1,29 @@ +{ + "title": "TokenList", + "operationId": "Tokens_List", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/myToken", + "name": "myToken", + "type": "Microsoft.ContainerRegistry/registries/tokens", + "properties": { + "creationDate": "2017-03-01T23:14:37.0707808Z", + "scopeMapId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myScopeMap", + "provisioningState": "Succeeded", + "status": "enabled" + } + } + ] + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/TokenUpdate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/TokenUpdate.json new file mode 100644 index 00000000000..22c10b8bd45 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/TokenUpdate.json @@ -0,0 +1,71 @@ +{ + "title": "TokenUpdate", + "operationId": "Tokens_Update", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "tokenName": "myToken", + "tokenUpdateParameters": { + "properties": { + "scopeMapId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myNewScopeMap", + "credentials": { + "certificates": [ + { + "name": "certificate1", + "encodedPemCertificate": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUc3akNDQk5hZ0F3SUJBZ0lURmdBQlR3UVpyZGdmdmhxdzBnQUFBQUZQQkRBTkJna3Foa2lHOXcwQkFRc0YKQURDQml6RUxNQWtHQTFVRUJoTUNWVk14RXpBUkJnTlZCQWdUQ2xkaGMyaHBibWQwYjI0eEVEQU9CZ05WQkFjVApCMUpsWkcxdmJtUXhIakFjQmdOVkJBb1RGVTFwWTNKdmMyOW1kQ0JEYjNKd2IzSmhkR2x2YmpFVk1CTUdBMVVFCkN4TU1UV2xqY205emIyWjBJRWxVTVI0d0hBWURWUVFERXhWTmFXTnliM052Wm5RZ1NWUWdWRXhUSUVOQklEUXcKSGhjTk1UZ3dOREV5TWpJek1qUTRXaGNOTWpBd05ERXlNakl6TWpRNFdqQTVNVGN3TlFZRFZRUURFeTV6WlhKMgphV05sWTJ4cFpXNTBZMlZ5ZEMxd1lYSjBibVZ5TG0xaGJtRm5aVzFsYm5RdVlYcDFjbVV1WTI5dE1JSUJJakFOCkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQTBSYjdJcHpxMmR4emhhbVpyS1ZDakMzeTQyYlYKUnNIY2pCUTFuSDBHZ1puUDhXeDZDSE1mWThybkVJQzRLeVRRYkJXVzhnNXlmc3NSQ0ZXbFpxYjR6SkRXS0pmTgpGSmNMUm9LNnhwTktZYVZVTkVlT25IdUxHYTM0ZlA0VjBFRjZybzdvbkRLME5zanhjY1dZVzRNVXVzc0xrQS94CkUrM2RwU1REdk1KcjJoWUpsVnFDcVR6blQvbmZaVUZzQUVEQnp5MUpOOHZiZDlIR2czc2Myd0x4dk95cFJOc0gKT1V3V2pmN2xzWWZleEVlcWkzY29EeHc2alpLVWEyVkdsUnBpTkowMjhBQitYSi9TU1FVNVBsd0JBbU9TT3ovRApGY0NKdGpPZlBqU1NKckFIQVV3SHU3RzlSV05JTFBwYU9zQ1J5eitETE5zNGpvNlEvUUg4d1lManJRSURBUUFCCm80SUNtakNDQXBZd0N3WURWUjBQQkFRREFnU3dNQjBHQTFVZEpRUVdNQlFHQ0NzR0FRVUZCd01DQmdnckJnRUYKQlFjREFUQWRCZ05WSFE0RUZnUVVlbEdkVVJrZzJoSFFOWEQ4WUc4L3drdjJVT0F3SHdZRFZSMGpCQmd3Rm9BVQplbnVNd2Mvbm9Nb2MxR3Y2KytFend3OGFvcDB3Z2F3R0ExVWRId1NCcERDQm9UQ0JucUNCbTZDQm1JWkxhSFIwCmNEb3ZMMjF6WTNKc0xtMXBZM0p2YzI5bWRDNWpiMjB2Y0d0cEwyMXpZMjl5Y0M5amNtd3ZUV2xqY205emIyWjAKSlRJd1NWUWxNakJVVEZNbE1qQkRRU1V5TURRdVkzSnNoa2xvZEhSd09pOHZZM0pzTG0xcFkzSnZjMjltZEM1agpiMjB2Y0d0cEwyMXpZMjl5Y0M5amNtd3ZUV2xqY205emIyWjBKVEl3U1ZRbE1qQlVURk1sTWpCRFFTVXlNRFF1ClkzSnNNSUdGQmdnckJnRUZCUWNCQVFSNU1IY3dVUVlJS3dZQkJRVUhNQUtHUldoMGRIQTZMeTkzZDNjdWJXbGoKY205emIyWjBMbU52YlM5d2Eya3ZiWE5qYjNKd0wwMXBZM0p2YzI5bWRDVXlNRWxVSlRJd1ZFeFRKVEl3UTBFbApNakEwTG1OeWREQWlCZ2dyQmdFRkJRY3dBWVlXYUhSMGNEb3ZMMjlqYzNBdWJYTnZZM053TG1OdmJUQStCZ2tyCkJnRUVBWUkzRlFjRU1UQXZCaWNyQmdFRUFZSTNGUWlIMm9aMWcrN1pBWUxKaFJ1QnRaNWhoZlRyWUlGZGhOTGYKUW9Mbmszb0NBV1FDQVIwd1RRWURWUjBnQkVZd1JEQkNCZ2tyQmdFRUFZSTNLZ0V3TlRBekJnZ3JCZ0VGQlFjQwpBUlluYUhSMGNEb3ZMM2QzZHk1dGFXTnliM052Wm5RdVkyOXRMM0JyYVM5dGMyTnZjbkF2WTNCek1DY0dDU3NHCkFRUUJnamNWQ2dRYU1CZ3dDZ1lJS3dZQkJRVUhBd0l3Q2dZSUt3WUJCUVVIQXdFd09RWURWUjBSQkRJd01JSXUKYzJWeWRtbGpaV05zYVdWdWRHTmxjblF0Y0dGeWRHNWxjaTV0WVc1aFoyVnRaVzUwTG1GNmRYSmxMbU52YlRBTgpCZ2txaGtpRzl3MEJBUXNGQUFPQ0FnRUFIVXIzbk1vdUI5WWdDUlRWYndUTllIS2RkWGJkSW1GUXNDYys4T1g1CjE5c0N6dFFSR05iSXEwVW1Ba01MbFVvWTIxckh4ZXdxU2hWczFhL2RwaFh5Tk1pcUdaU2QzU1BtYzZscitqUFQKNXVEREs0MUlWeXN0K2VUNlpyazFvcCtMVmdkeS9EU2lyNzVqcWZFY016bS82bU8rNnFNeWRLTWtVYmM5K3JHVwphUkpUcjRWUUdIRmEwNEIwZVZpNUd4MG9pL2RpZDNSaXg2aXJMMjFJSGEwYjN6c1hzZHpHU0R2K3hqL2Q2S0l4Ckdrd2FhYmZvU1NoQnFqaFNlQ0VyZXFlb1RpYjljdGw0MGRVdUp3THl4bjhHS2N6K3AvMEJUOEIxU3lYK01OQ2wKY0pkMjVtMjhLajY2TGUxOEVyeFlJYXZJVGVGa3Y2eGZjdkEvcHladDdPaU41QTlGQk1IUmpQK1kyZ2tvdjMrcQpISFRUZG4xNnlRajduNit3YlFHNGVleXc0YisyQkRLcUxNVFU2ZmlSQ3ZPM2FPZVBLSFVNN3R4b1FidWl6Z3NzCkNiMzl3QnJOTEZsMkJLQ1RkSCtkSU9oZVJiSkZvbmlwOGRPOUVFZWdSSG9lQW54ZUlYTFBrdXMzTzEvZjRhNkIKWHQ3RG5BUm8xSzJmeEp3VXRaU2MvR3dFSjU5NzlnRXlEa3pDZEVsLzdpWE9QZXVjTXhlM2xVM2pweUtsNERUaApjSkJqQytqNGpLWTFrK1U4b040aGdqYnJISUx6Vnd2eU15OU5KS290U3BMSjQxeHdPOHlGangxalFTT3Bxc0N1ClFhUFUvTjhSZ0hxWjBGTkFzS3dNUmZ6WmdXanRCNzRzYUVEdk5jVmNuNFhCQnFNSG0ydHo2Uzk3d3kxZGt0cTgKSE5BPQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==" + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/myToken", + "name": "myToken", + "type": "Microsoft.ContainerRegistry/registries/tokens", + "properties": { + "creationDate": "2017-03-01T23:14:37.0707808Z", + "scopeMapId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myNewScopeMap", + "provisioningState": "Succeeded", + "status": "enabled", + "credentials": { + "certificates": [ + { + "name": "certificate1", + "encodedPemCertificate": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUc3akNDQk5hZ0F3SUJBZ0lURmdBQlR3UVpyZGdmdmhxdzBnQUFBQUZQQkRBTkJna3Foa2lHOXcwQkFRc0YKQURDQml6RUxNQWtHQTFVRUJoTUNWVk14RXpBUkJnTlZCQWdUQ2xkaGMyaHBibWQwYjI0eEVEQU9CZ05WQkFjVApCMUpsWkcxdmJtUXhIakFjQmdOVkJBb1RGVTFwWTNKdmMyOW1kQ0JEYjNKd2IzSmhkR2x2YmpFVk1CTUdBMVVFCkN4TU1UV2xqY205emIyWjBJRWxVTVI0d0hBWURWUVFERXhWTmFXTnliM052Wm5RZ1NWUWdWRXhUSUVOQklEUXcKSGhjTk1UZ3dOREV5TWpJek1qUTRXaGNOTWpBd05ERXlNakl6TWpRNFdqQTVNVGN3TlFZRFZRUURFeTV6WlhKMgphV05sWTJ4cFpXNTBZMlZ5ZEMxd1lYSjBibVZ5TG0xaGJtRm5aVzFsYm5RdVlYcDFjbVV1WTI5dE1JSUJJakFOCkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQTBSYjdJcHpxMmR4emhhbVpyS1ZDakMzeTQyYlYKUnNIY2pCUTFuSDBHZ1puUDhXeDZDSE1mWThybkVJQzRLeVRRYkJXVzhnNXlmc3NSQ0ZXbFpxYjR6SkRXS0pmTgpGSmNMUm9LNnhwTktZYVZVTkVlT25IdUxHYTM0ZlA0VjBFRjZybzdvbkRLME5zanhjY1dZVzRNVXVzc0xrQS94CkUrM2RwU1REdk1KcjJoWUpsVnFDcVR6blQvbmZaVUZzQUVEQnp5MUpOOHZiZDlIR2czc2Myd0x4dk95cFJOc0gKT1V3V2pmN2xzWWZleEVlcWkzY29EeHc2alpLVWEyVkdsUnBpTkowMjhBQitYSi9TU1FVNVBsd0JBbU9TT3ovRApGY0NKdGpPZlBqU1NKckFIQVV3SHU3RzlSV05JTFBwYU9zQ1J5eitETE5zNGpvNlEvUUg4d1lManJRSURBUUFCCm80SUNtakNDQXBZd0N3WURWUjBQQkFRREFnU3dNQjBHQTFVZEpRUVdNQlFHQ0NzR0FRVUZCd01DQmdnckJnRUYKQlFjREFUQWRCZ05WSFE0RUZnUVVlbEdkVVJrZzJoSFFOWEQ4WUc4L3drdjJVT0F3SHdZRFZSMGpCQmd3Rm9BVQplbnVNd2Mvbm9Nb2MxR3Y2KytFend3OGFvcDB3Z2F3R0ExVWRId1NCcERDQm9UQ0JucUNCbTZDQm1JWkxhSFIwCmNEb3ZMMjF6WTNKc0xtMXBZM0p2YzI5bWRDNWpiMjB2Y0d0cEwyMXpZMjl5Y0M5amNtd3ZUV2xqY205emIyWjAKSlRJd1NWUWxNakJVVEZNbE1qQkRRU1V5TURRdVkzSnNoa2xvZEhSd09pOHZZM0pzTG0xcFkzSnZjMjltZEM1agpiMjB2Y0d0cEwyMXpZMjl5Y0M5amNtd3ZUV2xqY205emIyWjBKVEl3U1ZRbE1qQlVURk1sTWpCRFFTVXlNRFF1ClkzSnNNSUdGQmdnckJnRUZCUWNCQVFSNU1IY3dVUVlJS3dZQkJRVUhNQUtHUldoMGRIQTZMeTkzZDNjdWJXbGoKY205emIyWjBMbU52YlM5d2Eya3ZiWE5qYjNKd0wwMXBZM0p2YzI5bWRDVXlNRWxVSlRJd1ZFeFRKVEl3UTBFbApNakEwTG1OeWREQWlCZ2dyQmdFRkJRY3dBWVlXYUhSMGNEb3ZMMjlqYzNBdWJYTnZZM053TG1OdmJUQStCZ2tyCkJnRUVBWUkzRlFjRU1UQXZCaWNyQmdFRUFZSTNGUWlIMm9aMWcrN1pBWUxKaFJ1QnRaNWhoZlRyWUlGZGhOTGYKUW9Mbmszb0NBV1FDQVIwd1RRWURWUjBnQkVZd1JEQkNCZ2tyQmdFRUFZSTNLZ0V3TlRBekJnZ3JCZ0VGQlFjQwpBUlluYUhSMGNEb3ZMM2QzZHk1dGFXTnliM052Wm5RdVkyOXRMM0JyYVM5dGMyTnZjbkF2WTNCek1DY0dDU3NHCkFRUUJnamNWQ2dRYU1CZ3dDZ1lJS3dZQkJRVUhBd0l3Q2dZSUt3WUJCUVVIQXdFd09RWURWUjBSQkRJd01JSXUKYzJWeWRtbGpaV05zYVdWdWRHTmxjblF0Y0dGeWRHNWxjaTV0WVc1aFoyVnRaVzUwTG1GNmRYSmxMbU52YlRBTgpCZ2txaGtpRzl3MEJBUXNGQUFPQ0FnRUFIVXIzbk1vdUI5WWdDUlRWYndUTllIS2RkWGJkSW1GUXNDYys4T1g1CjE5c0N6dFFSR05iSXEwVW1Ba01MbFVvWTIxckh4ZXdxU2hWczFhL2RwaFh5Tk1pcUdaU2QzU1BtYzZscitqUFQKNXVEREs0MUlWeXN0K2VUNlpyazFvcCtMVmdkeS9EU2lyNzVqcWZFY016bS82bU8rNnFNeWRLTWtVYmM5K3JHVwphUkpUcjRWUUdIRmEwNEIwZVZpNUd4MG9pL2RpZDNSaXg2aXJMMjFJSGEwYjN6c1hzZHpHU0R2K3hqL2Q2S0l4Ckdrd2FhYmZvU1NoQnFqaFNlQ0VyZXFlb1RpYjljdGw0MGRVdUp3THl4bjhHS2N6K3AvMEJUOEIxU3lYK01OQ2wKY0pkMjVtMjhLajY2TGUxOEVyeFlJYXZJVGVGa3Y2eGZjdkEvcHladDdPaU41QTlGQk1IUmpQK1kyZ2tvdjMrcQpISFRUZG4xNnlRajduNit3YlFHNGVleXc0YisyQkRLcUxNVFU2ZmlSQ3ZPM2FPZVBLSFVNN3R4b1FidWl6Z3NzCkNiMzl3QnJOTEZsMkJLQ1RkSCtkSU9oZVJiSkZvbmlwOGRPOUVFZWdSSG9lQW54ZUlYTFBrdXMzTzEvZjRhNkIKWHQ3RG5BUm8xSzJmeEp3VXRaU2MvR3dFSjU5NzlnRXlEa3pDZEVsLzdpWE9QZXVjTXhlM2xVM2pweUtsNERUaApjSkJqQytqNGpLWTFrK1U4b040aGdqYnJISUx6Vnd2eU15OU5KS290U3BMSjQxeHdPOHlGangxalFTT3Bxc0N1ClFhUFUvTjhSZ0hxWjBGTkFzS3dNUmZ6WmdXanRCNzRzYUVEdk5jVmNuNFhCQnFNSG0ydHo2Uzk3d3kxZGt0cTgKSE5BPQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==" + } + ] + } + } + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/myToken/operationStatuses/tokens-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" + }, + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/myToken", + "name": "myToken", + "type": "Microsoft.ContainerRegistry/registries/tokens", + "properties": { + "creationDate": "2017-03-01T23:14:37.0707808Z", + "scopeMapId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myNewScopeMap", + "provisioningState": "Succeeded", + "status": "enabled", + "credentials": { + "certificates": [ + { + "name": "certificate1", + "encodedPemCertificate": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUc3akNDQk5hZ0F3SUJBZ0lURmdBQlR3UVpyZGdmdmhxdzBnQUFBQUZQQkRBTkJna3Foa2lHOXcwQkFRc0YKQURDQml6RUxNQWtHQTFVRUJoTUNWVk14RXpBUkJnTlZCQWdUQ2xkaGMyaHBibWQwYjI0eEVEQU9CZ05WQkFjVApCMUpsWkcxdmJtUXhIakFjQmdOVkJBb1RGVTFwWTNKdmMyOW1kQ0JEYjNKd2IzSmhkR2x2YmpFVk1CTUdBMVVFCkN4TU1UV2xqY205emIyWjBJRWxVTVI0d0hBWURWUVFERXhWTmFXTnliM052Wm5RZ1NWUWdWRXhUSUVOQklEUXcKSGhjTk1UZ3dOREV5TWpJek1qUTRXaGNOTWpBd05ERXlNakl6TWpRNFdqQTVNVGN3TlFZRFZRUURFeTV6WlhKMgphV05sWTJ4cFpXNTBZMlZ5ZEMxd1lYSjBibVZ5TG0xaGJtRm5aVzFsYm5RdVlYcDFjbVV1WTI5dE1JSUJJakFOCkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQTBSYjdJcHpxMmR4emhhbVpyS1ZDakMzeTQyYlYKUnNIY2pCUTFuSDBHZ1puUDhXeDZDSE1mWThybkVJQzRLeVRRYkJXVzhnNXlmc3NSQ0ZXbFpxYjR6SkRXS0pmTgpGSmNMUm9LNnhwTktZYVZVTkVlT25IdUxHYTM0ZlA0VjBFRjZybzdvbkRLME5zanhjY1dZVzRNVXVzc0xrQS94CkUrM2RwU1REdk1KcjJoWUpsVnFDcVR6blQvbmZaVUZzQUVEQnp5MUpOOHZiZDlIR2czc2Myd0x4dk95cFJOc0gKT1V3V2pmN2xzWWZleEVlcWkzY29EeHc2alpLVWEyVkdsUnBpTkowMjhBQitYSi9TU1FVNVBsd0JBbU9TT3ovRApGY0NKdGpPZlBqU1NKckFIQVV3SHU3RzlSV05JTFBwYU9zQ1J5eitETE5zNGpvNlEvUUg4d1lManJRSURBUUFCCm80SUNtakNDQXBZd0N3WURWUjBQQkFRREFnU3dNQjBHQTFVZEpRUVdNQlFHQ0NzR0FRVUZCd01DQmdnckJnRUYKQlFjREFUQWRCZ05WSFE0RUZnUVVlbEdkVVJrZzJoSFFOWEQ4WUc4L3drdjJVT0F3SHdZRFZSMGpCQmd3Rm9BVQplbnVNd2Mvbm9Nb2MxR3Y2KytFend3OGFvcDB3Z2F3R0ExVWRId1NCcERDQm9UQ0JucUNCbTZDQm1JWkxhSFIwCmNEb3ZMMjF6WTNKc0xtMXBZM0p2YzI5bWRDNWpiMjB2Y0d0cEwyMXpZMjl5Y0M5amNtd3ZUV2xqY205emIyWjAKSlRJd1NWUWxNakJVVEZNbE1qQkRRU1V5TURRdVkzSnNoa2xvZEhSd09pOHZZM0pzTG0xcFkzSnZjMjltZEM1agpiMjB2Y0d0cEwyMXpZMjl5Y0M5amNtd3ZUV2xqY205emIyWjBKVEl3U1ZRbE1qQlVURk1sTWpCRFFTVXlNRFF1ClkzSnNNSUdGQmdnckJnRUZCUWNCQVFSNU1IY3dVUVlJS3dZQkJRVUhNQUtHUldoMGRIQTZMeTkzZDNjdWJXbGoKY205emIyWjBMbU52YlM5d2Eya3ZiWE5qYjNKd0wwMXBZM0p2YzI5bWRDVXlNRWxVSlRJd1ZFeFRKVEl3UTBFbApNakEwTG1OeWREQWlCZ2dyQmdFRkJRY3dBWVlXYUhSMGNEb3ZMMjlqYzNBdWJYTnZZM053TG1OdmJUQStCZ2tyCkJnRUVBWUkzRlFjRU1UQXZCaWNyQmdFRUFZSTNGUWlIMm9aMWcrN1pBWUxKaFJ1QnRaNWhoZlRyWUlGZGhOTGYKUW9Mbmszb0NBV1FDQVIwd1RRWURWUjBnQkVZd1JEQkNCZ2tyQmdFRUFZSTNLZ0V3TlRBekJnZ3JCZ0VGQlFjQwpBUlluYUhSMGNEb3ZMM2QzZHk1dGFXTnliM052Wm5RdVkyOXRMM0JyYVM5dGMyTnZjbkF2WTNCek1DY0dDU3NHCkFRUUJnamNWQ2dRYU1CZ3dDZ1lJS3dZQkJRVUhBd0l3Q2dZSUt3WUJCUVVIQXdFd09RWURWUjBSQkRJd01JSXUKYzJWeWRtbGpaV05zYVdWdWRHTmxjblF0Y0dGeWRHNWxjaTV0WVc1aFoyVnRaVzUwTG1GNmRYSmxMbU52YlRBTgpCZ2txaGtpRzl3MEJBUXNGQUFPQ0FnRUFIVXIzbk1vdUI5WWdDUlRWYndUTllIS2RkWGJkSW1GUXNDYys4T1g1CjE5c0N6dFFSR05iSXEwVW1Ba01MbFVvWTIxckh4ZXdxU2hWczFhL2RwaFh5Tk1pcUdaU2QzU1BtYzZscitqUFQKNXVEREs0MUlWeXN0K2VUNlpyazFvcCtMVmdkeS9EU2lyNzVqcWZFY016bS82bU8rNnFNeWRLTWtVYmM5K3JHVwphUkpUcjRWUUdIRmEwNEIwZVZpNUd4MG9pL2RpZDNSaXg2aXJMMjFJSGEwYjN6c1hzZHpHU0R2K3hqL2Q2S0l4Ckdrd2FhYmZvU1NoQnFqaFNlQ0VyZXFlb1RpYjljdGw0MGRVdUp3THl4bjhHS2N6K3AvMEJUOEIxU3lYK01OQ2wKY0pkMjVtMjhLajY2TGUxOEVyeFlJYXZJVGVGa3Y2eGZjdkEvcHladDdPaU41QTlGQk1IUmpQK1kyZ2tvdjMrcQpISFRUZG4xNnlRajduNit3YlFHNGVleXc0YisyQkRLcUxNVFU2ZmlSQ3ZPM2FPZVBLSFVNN3R4b1FidWl6Z3NzCkNiMzl3QnJOTEZsMkJLQ1RkSCtkSU9oZVJiSkZvbmlwOGRPOUVFZWdSSG9lQW54ZUlYTFBrdXMzTzEvZjRhNkIKWHQ3RG5BUm8xSzJmeEp3VXRaU2MvR3dFSjU5NzlnRXlEa3pDZEVsLzdpWE9QZXVjTXhlM2xVM2pweUtsNERUaApjSkJqQytqNGpLWTFrK1U4b040aGdqYnJISUx6Vnd2eU15OU5KS290U3BMSjQxeHdPOHlGangxalFTT3Bxc0N1ClFhUFUvTjhSZ0hxWjBGTkFzS3dNUmZ6WmdXanRCNzRzYUVEdk5jVmNuNFhCQnFNSG0ydHo2Uzk3d3kxZGt0cTgKSE5BPQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==" + } + ] + } + } + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/WebhookCreate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/WebhookCreate.json new file mode 100644 index 00000000000..17c13aa7480 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/WebhookCreate.json @@ -0,0 +1,71 @@ +{ + "title": "WebhookCreate", + "operationId": "Webhooks_Create", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "webhookName": "myWebhook", + "webhookCreateParameters": { + "location": "westus", + "tags": { + "key": "value" + }, + "properties": { + "serviceUri": "http://myservice.com", + "customHeaders": { + "Authorization": "******" + }, + "status": "enabled", + "scope": "myRepository", + "actions": [ + "push" + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/webhooks/myWebhook", + "name": "myWebhook", + "type": "Microsoft.ContainerRegistry/registries/webhooks", + "location": "westus", + "tags": { + "key": "value" + }, + "properties": { + "status": "enabled", + "scope": "myRepository", + "actions": [ + "push" + ], + "provisioningState": "Succeeded" + } + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/webhooks/myWebhook/operationStatuses/webhooks-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" + }, + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/webhooks/myWebhook", + "name": "myWebhook", + "type": "Microsoft.ContainerRegistry/registries/webhooks", + "location": "westus", + "tags": { + "key": "value" + }, + "properties": { + "status": "enabled", + "scope": "myRepository", + "actions": [ + "push" + ], + "provisioningState": "Creating" + } + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/WebhookDelete.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/WebhookDelete.json new file mode 100644 index 00000000000..988abc7bf34 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/WebhookDelete.json @@ -0,0 +1,20 @@ +{ + "title": "WebhookDelete", + "operationId": "Webhooks_Delete", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "webhookName": "myWebhook" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/webhooks/myWebhook/operationStatuses/webhooks-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" + } + }, + "204": {} + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/WebhookGet.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/WebhookGet.json new file mode 100644 index 00000000000..9bf5412092a --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/WebhookGet.json @@ -0,0 +1,32 @@ +{ + "title": "WebhookGet", + "operationId": "Webhooks_Get", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "webhookName": "myWebhook" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/webhooks/myWebhook", + "name": "myWebhook", + "type": "Microsoft.ContainerRegistry/registries/webhooks", + "location": "westus", + "tags": { + "key": "value" + }, + "properties": { + "status": "enabled", + "scope": "myRepository", + "actions": [ + "push" + ], + "provisioningState": "Succeeded" + } + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/WebhookGetCallbackConfig.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/WebhookGetCallbackConfig.json new file mode 100644 index 00000000000..608e056de88 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/WebhookGetCallbackConfig.json @@ -0,0 +1,21 @@ +{ + "title": "WebhookGetCallbackConfig", + "operationId": "Webhooks_GetCallbackConfig", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "webhookName": "myWebhook" + }, + "responses": { + "200": { + "body": { + "serviceUri": "http://myservice.com", + "customHeaders": { + "Authorization": "******" + } + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/WebhookList.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/WebhookList.json new file mode 100644 index 00000000000..88329bf73ed --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/WebhookList.json @@ -0,0 +1,35 @@ +{ + "title": "WebhookList", + "operationId": "Webhooks_List", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/webhooks/myWebhook", + "name": "myWebhook", + "type": "Microsoft.ContainerRegistry/registries/webhooks", + "location": "westus", + "tags": { + "key": "value" + }, + "properties": { + "status": "enabled", + "scope": "myRepository", + "actions": [ + "push" + ], + "provisioningState": "Succeeded" + } + } + ] + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/WebhookListEvents.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/WebhookListEvents.json new file mode 100644 index 00000000000..8c4d3b2aede --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/WebhookListEvents.json @@ -0,0 +1,65 @@ +{ + "title": "WebhookListEvents", + "operationId": "Webhooks_ListEvents", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "webhookName": "myWebhook" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "00000000-0000-0000-0000-000000000000", + "eventRequestMessage": { + "content": { + "id": "00000000-0000-0000-0000-000000000000", + "timestamp": "2017-03-01T23:14:37.0707808Z", + "action": "push", + "target": { + "mediaType": "application/vnd.docker.distribution.manifest.v2+json", + "size": 708, + "digest": "sha256:fea8895f450959fa676bcc1df0611ea93823a735a01205fd8622846041d0c7cf", + "length": 708, + "repository": "hello-world", + "url": "http://192.168.100.227:5000/v2/hello-world/manifests/sha256:fea8895f450959fa676bcc1df0611ea93823a735a01205fd8622846041d0c7cf", + "tag": "latest" + }, + "request": { + "id": "00000000-0000-0000-0000-000000000000", + "addr": "192.168.64.11:42961", + "host": "192.168.100.227:5000", + "method": "GET", + "useragent": "curl/7.38.0" + }, + "actor": {}, + "source": { + "addr": "xtal.local:5000", + "instanceID": "00000000-0000-0000-0000-000000000000" + } + }, + "headers": { + "Content-Type": "application/json", + "Content-Length": "719", + "Authorization": "******" + }, + "method": "POST", + "requestUri": "http://myservice.com", + "version": "1.1" + }, + "eventResponseMessage": { + "headers": { + "Content-Length": "0" + }, + "statusCode": "200", + "version": "1.1" + } + } + ] + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/WebhookPing.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/WebhookPing.json new file mode 100644 index 00000000000..2be74ab5d5c --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/WebhookPing.json @@ -0,0 +1,18 @@ +{ + "title": "WebhookPing", + "operationId": "Webhooks_Ping", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "webhookName": "myWebhook" + }, + "responses": { + "200": { + "body": { + "id": "00000000-0000-0000-0000-000000000000" + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/WebhookUpdate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/WebhookUpdate.json new file mode 100644 index 00000000000..a01344f26c2 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/WebhookUpdate.json @@ -0,0 +1,70 @@ +{ + "title": "WebhookUpdate", + "operationId": "Webhooks_Update", + "parameters": { + "api-version": "2026-01-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "webhookName": "myWebhook", + "webhookUpdateParameters": { + "tags": { + "key": "value" + }, + "properties": { + "serviceUri": "http://myservice.com", + "customHeaders": { + "Authorization": "******" + }, + "status": "enabled", + "scope": "myRepository", + "actions": [ + "push" + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/webhooks/myWebhook", + "name": "myWebhook", + "type": "Microsoft.ContainerRegistry/registries/webhooks", + "location": "westus", + "tags": { + "key": "value" + }, + "properties": { + "status": "enabled", + "scope": "myRepository", + "actions": [ + "push" + ], + "provisioningState": "Succeeded" + } + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/webhooks/myWebhook/operationStatuses/webhooks-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" + }, + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/webhooks/myWebhook", + "name": "myWebhook", + "type": "Microsoft.ContainerRegistry/registries/webhooks", + "location": "westus", + "tags": { + "key": "value" + }, + "properties": { + "status": "enabled", + "scope": "myRepository", + "actions": [ + "push" + ], + "provisioningState": "Updating" + } + } + } + } +} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/apiview-properties.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/apiview-properties.json new file mode 100644 index 00000000000..2eab22412c9 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/apiview-properties.json @@ -0,0 +1,345 @@ +{ + "CrossLanguagePackageId": null, + "CrossLanguageDefinitionId": { + "container_registry_management_client.models.ActivationProperties": null, + "container_registry_management_client.models.Actor": null, + "container_registry_management_client.models.Resource": null, + "container_registry_management_client.models.ProxyResource": null, + "container_registry_management_client.models.Archive": null, + "container_registry_management_client.models.ArchivePackageSourceProperties": null, + "container_registry_management_client.models.ArchiveProperties": null, + "container_registry_management_client.models.ArchiveUpdateParameters": null, + "container_registry_management_client.models.ArchiveUpdateProperties": null, + "container_registry_management_client.models.ArchiveVersion": null, + "container_registry_management_client.models.ArchiveVersionProperties": null, + "container_registry_management_client.models.AuthCredential": null, + "container_registry_management_client.models.AzureADAuthenticationAsArmPolicy": null, + "container_registry_management_client.models.CacheRule": null, + "container_registry_management_client.models.CacheRuleProperties": null, + "container_registry_management_client.models.CacheRuleUpdateParameters": null, + "container_registry_management_client.models.CacheRuleUpdateProperties": null, + "container_registry_management_client.models.CallbackConfig": null, + "container_registry_management_client.models.ConnectedRegistry": null, + "container_registry_management_client.models.ConnectedRegistryProperties": null, + "container_registry_management_client.models.ConnectedRegistryUpdateParameters": null, + "container_registry_management_client.models.ConnectedRegistryUpdateProperties": null, + "container_registry_management_client.models.CredentialHealth": null, + "container_registry_management_client.models.CredentialSet": null, + "container_registry_management_client.models.CredentialSetProperties": null, + "container_registry_management_client.models.CredentialSetUpdateParameters": null, + "container_registry_management_client.models.CredentialSetUpdateProperties": null, + "container_registry_management_client.models.DebianArchivePackageSourceProperties": null, + "container_registry_management_client.models.DebianArchiveProperties": null, + "container_registry_management_client.models.EncryptionProperty": null, + "container_registry_management_client.models.ErrorAdditionalInfo": null, + "container_registry_management_client.models.ErrorDetail": null, + "container_registry_management_client.models.ErrorResponse": null, + "container_registry_management_client.models.EventInfo": null, + "container_registry_management_client.models.Event": null, + "container_registry_management_client.models.EventContent": null, + "container_registry_management_client.models.EventRequestMessage": null, + "container_registry_management_client.models.EventResponseMessage": null, + "container_registry_management_client.models.ExportPipeline": null, + "container_registry_management_client.models.ExportPipelineProperties": null, + "container_registry_management_client.models.ExportPipelineTargetProperties": null, + "container_registry_management_client.models.ExportPolicy": null, + "container_registry_management_client.models.GarbageCollectionProperties": null, + "container_registry_management_client.models.GenerateCredentialsParameters": null, + "container_registry_management_client.models.GenerateCredentialsResult": null, + "container_registry_management_client.models.IdentityProperties": null, + "container_registry_management_client.models.ImportImageParameters": null, + "container_registry_management_client.models.ImportPipeline": null, + "container_registry_management_client.models.ImportPipelineProperties": null, + "container_registry_management_client.models.ImportPipelineSourceProperties": null, + "container_registry_management_client.models.ImportSource": null, + "container_registry_management_client.models.ImportSourceCredentials": null, + "container_registry_management_client.models.IPRule": null, + "container_registry_management_client.models.KeyVaultProperties": null, + "container_registry_management_client.models.LoggingProperties": null, + "container_registry_management_client.models.LoginServerProperties": null, + "container_registry_management_client.models.NetworkRuleSet": null, + "container_registry_management_client.models.OperationDefinition": null, + "container_registry_management_client.models.OperationDisplayDefinition": null, + "container_registry_management_client.models.OperationLogSpecificationDefinition": null, + "container_registry_management_client.models.OperationMetricSpecificationDefinition": null, + "container_registry_management_client.models.OperationPropertiesDefinition": null, + "container_registry_management_client.models.OperationServiceSpecificationDefinition": null, + "container_registry_management_client.models.ParentProperties": null, + "container_registry_management_client.models.PipelineRun": null, + "container_registry_management_client.models.PipelineRunProperties": null, + "container_registry_management_client.models.PipelineRunRequest": null, + "container_registry_management_client.models.PipelineRunResponse": null, + "container_registry_management_client.models.PipelineRunSourceProperties": null, + "container_registry_management_client.models.PipelineRunTargetProperties": null, + "container_registry_management_client.models.PipelineSourceTriggerDescriptor": null, + "container_registry_management_client.models.PipelineSourceTriggerProperties": null, + "container_registry_management_client.models.PipelineTriggerDescriptor": null, + "container_registry_management_client.models.PipelineTriggerProperties": null, + "container_registry_management_client.models.Policies": null, + "container_registry_management_client.models.PrivateEndpoint": null, + "container_registry_management_client.models.PrivateEndpointConnection": null, + "container_registry_management_client.models.PrivateEndpointConnectionProperties": null, + "container_registry_management_client.models.PrivateLinkResource": null, + "container_registry_management_client.models.PrivateLinkResourceProperties": null, + "container_registry_management_client.models.PrivateLinkServiceConnectionState": null, + "container_registry_management_client.models.ProgressProperties": null, + "container_registry_management_client.models.QuarantinePolicy": null, + "container_registry_management_client.models.RegenerateCredentialParameters": null, + "container_registry_management_client.models.TrackedResource": null, + "container_registry_management_client.models.Registry": null, + "container_registry_management_client.models.RegistryListCredentialsResult": null, + "container_registry_management_client.models.RegistryNameCheckRequest": null, + "container_registry_management_client.models.RegistryNameStatus": null, + "container_registry_management_client.models.RegistryPassword": null, + "container_registry_management_client.models.RegistryProperties": null, + "container_registry_management_client.models.RegistryPropertiesUpdateParameters": null, + "container_registry_management_client.models.RegistrySyncResult": null, + "container_registry_management_client.models.RegistryUpdateParameters": null, + "container_registry_management_client.models.RegistryUsage": null, + "container_registry_management_client.models.RegistryUsageListResult": null, + "container_registry_management_client.models.Replication": null, + "container_registry_management_client.models.ReplicationProperties": null, + "container_registry_management_client.models.ReplicationUpdateParameters": null, + "container_registry_management_client.models.ReplicationUpdateParametersProperties": null, + "container_registry_management_client.models.Request": null, + "container_registry_management_client.models.RetentionPolicy": null, + "container_registry_management_client.models.ScopeMap": null, + "container_registry_management_client.models.ScopeMapProperties": null, + "container_registry_management_client.models.ScopeMapPropertiesUpdateParameters": null, + "container_registry_management_client.models.ScopeMapUpdateParameters": null, + "container_registry_management_client.models.Sku": null, + "container_registry_management_client.models.SoftDeletePolicy": null, + "container_registry_management_client.models.Source": null, + "container_registry_management_client.models.Status": null, + "container_registry_management_client.models.StatusDetailProperties": null, + "container_registry_management_client.models.SyncProperties": null, + "container_registry_management_client.models.SyncUpdateProperties": null, + "container_registry_management_client.models.SystemData": null, + "container_registry_management_client.models.Target": null, + "container_registry_management_client.models.TlsCertificateProperties": null, + "container_registry_management_client.models.TlsProperties": null, + "container_registry_management_client.models.Token": null, + "container_registry_management_client.models.TokenCertificate": null, + "container_registry_management_client.models.TokenCredentialsProperties": null, + "container_registry_management_client.models.TokenPassword": null, + "container_registry_management_client.models.TokenProperties": null, + "container_registry_management_client.models.TokenUpdateParameters": null, + "container_registry_management_client.models.TokenUpdateProperties": null, + "container_registry_management_client.models.TrustPolicy": null, + "container_registry_management_client.models.UserIdentityProperties": null, + "container_registry_management_client.models.Webhook": null, + "container_registry_management_client.models.WebhookCreateParameters": null, + "container_registry_management_client.models.WebhookProperties": null, + "container_registry_management_client.models.WebhookPropertiesCreateParameters": null, + "container_registry_management_client.models.WebhookPropertiesUpdateParameters": null, + "container_registry_management_client.models.WebhookUpdateParameters": null, + "container_registry_management_client.models.Action": null, + "container_registry_management_client.models.CreatedByType": null, + "container_registry_management_client.models.ConnectionStatus": null, + "container_registry_management_client.models.ActionsRequired": null, + "container_registry_management_client.models.ProvisioningState": null, + "container_registry_management_client.models.DefaultAction": null, + "container_registry_management_client.models.PolicyStatus": null, + "container_registry_management_client.models.TrustPolicyType": null, + "container_registry_management_client.models.ExportPolicyStatus": null, + "container_registry_management_client.models.AzureADAuthenticationAsArmPolicyStatus": null, + "container_registry_management_client.models.EncryptionStatus": null, + "container_registry_management_client.models.RegionalEndpoints": null, + "container_registry_management_client.models.EndpointProtocol": null, + "container_registry_management_client.models.PublicNetworkAccess": null, + "container_registry_management_client.models.NetworkRuleBypassOptions": null, + "container_registry_management_client.models.ZoneRedundancy": null, + "container_registry_management_client.models.MetadataSearch": null, + "container_registry_management_client.models.AutoGeneratedDomainNameLabelScope": null, + "container_registry_management_client.models.RoleAssignmentMode": null, + "container_registry_management_client.models.SkuName": null, + "container_registry_management_client.models.SkuTier": null, + "container_registry_management_client.models.ResourceIdentityType": null, + "container_registry_management_client.models.ConnectedRegistryMode": null, + "container_registry_management_client.models.ConnectionState": null, + "container_registry_management_client.models.ActivationStatus": null, + "container_registry_management_client.models.TlsStatus": null, + "container_registry_management_client.models.CertificateType": null, + "container_registry_management_client.models.LogLevel": null, + "container_registry_management_client.models.AuditLogStatus": null, + "container_registry_management_client.models.SyncTrigger": null, + "container_registry_management_client.models.SyncState": null, + "container_registry_management_client.models.CredentialName": null, + "container_registry_management_client.models.CredentialHealthStatus": null, + "container_registry_management_client.models.PipelineOptions": null, + "container_registry_management_client.models.StorageAccessMode": null, + "container_registry_management_client.models.TokenPasswordName": null, + "container_registry_management_client.models.PipelineSourceType": null, + "container_registry_management_client.models.TriggerStatus": null, + "container_registry_management_client.models.PasswordName": null, + "container_registry_management_client.models.RegistryUsageUnit": null, + "container_registry_management_client.models.PackageSourceType": null, + "container_registry_management_client.models.PipelineRunSourceType": null, + "container_registry_management_client.models.PipelineRunTargetType": null, + "container_registry_management_client.models.TokenCertificateName": null, + "container_registry_management_client.models.TokenStatus": null, + "container_registry_management_client.models.WebhookAction": null, + "container_registry_management_client.models.WebhookStatus": null, + "container_registry_management_client.models.ImportMode": null, + "container_registry_management_client.operations.Operations.list": null, + "container_registry_management_client.aio.operations.Operations.list": null, + "container_registry_management_client.operations.RegistriesOperations.check_name_availability": null, + "container_registry_management_client.aio.operations.RegistriesOperations.check_name_availability": null, + "container_registry_management_client.operations.RegistriesOperations.list": null, + "container_registry_management_client.aio.operations.RegistriesOperations.list": null, + "container_registry_management_client.operations.RegistriesOperations.list_by_resource_group": null, + "container_registry_management_client.aio.operations.RegistriesOperations.list_by_resource_group": null, + "container_registry_management_client.operations.RegistriesOperations.get": null, + "container_registry_management_client.aio.operations.RegistriesOperations.get": null, + "container_registry_management_client.operations.RegistriesOperations.begin_create": null, + "container_registry_management_client.aio.operations.RegistriesOperations.begin_create": null, + "container_registry_management_client.operations.RegistriesOperations.begin_update": null, + "container_registry_management_client.aio.operations.RegistriesOperations.begin_update": null, + "container_registry_management_client.operations.RegistriesOperations.begin_delete": null, + "container_registry_management_client.aio.operations.RegistriesOperations.begin_delete": null, + "container_registry_management_client.operations.RegistriesOperations.begin_generate_credentials": null, + "container_registry_management_client.aio.operations.RegistriesOperations.begin_generate_credentials": null, + "container_registry_management_client.operations.RegistriesOperations.begin_import_image": null, + "container_registry_management_client.aio.operations.RegistriesOperations.begin_import_image": null, + "container_registry_management_client.operations.RegistriesOperations.list_credentials": null, + "container_registry_management_client.aio.operations.RegistriesOperations.list_credentials": null, + "container_registry_management_client.operations.RegistriesOperations.list_usages": null, + "container_registry_management_client.aio.operations.RegistriesOperations.list_usages": null, + "container_registry_management_client.operations.RegistriesOperations.list_private_link_resources": null, + "container_registry_management_client.aio.operations.RegistriesOperations.list_private_link_resources": null, + "container_registry_management_client.operations.RegistriesOperations.get_private_link_resource": null, + "container_registry_management_client.aio.operations.RegistriesOperations.get_private_link_resource": null, + "container_registry_management_client.operations.RegistriesOperations.regenerate_credential": null, + "container_registry_management_client.aio.operations.RegistriesOperations.regenerate_credential": null, + "container_registry_management_client.operations.CacheRulesOperations.list": null, + "container_registry_management_client.aio.operations.CacheRulesOperations.list": null, + "container_registry_management_client.operations.CacheRulesOperations.get": null, + "container_registry_management_client.aio.operations.CacheRulesOperations.get": null, + "container_registry_management_client.operations.CacheRulesOperations.begin_create": null, + "container_registry_management_client.aio.operations.CacheRulesOperations.begin_create": null, + "container_registry_management_client.operations.CacheRulesOperations.begin_update": null, + "container_registry_management_client.aio.operations.CacheRulesOperations.begin_update": null, + "container_registry_management_client.operations.CacheRulesOperations.begin_delete": null, + "container_registry_management_client.aio.operations.CacheRulesOperations.begin_delete": null, + "container_registry_management_client.operations.ConnectedRegistriesOperations.list": null, + "container_registry_management_client.aio.operations.ConnectedRegistriesOperations.list": null, + "container_registry_management_client.operations.ConnectedRegistriesOperations.get": null, + "container_registry_management_client.aio.operations.ConnectedRegistriesOperations.get": null, + "container_registry_management_client.operations.ConnectedRegistriesOperations.begin_create": null, + "container_registry_management_client.aio.operations.ConnectedRegistriesOperations.begin_create": null, + "container_registry_management_client.operations.ConnectedRegistriesOperations.begin_update": null, + "container_registry_management_client.aio.operations.ConnectedRegistriesOperations.begin_update": null, + "container_registry_management_client.operations.ConnectedRegistriesOperations.begin_delete": null, + "container_registry_management_client.aio.operations.ConnectedRegistriesOperations.begin_delete": null, + "container_registry_management_client.operations.ConnectedRegistriesOperations.begin_deactivate": null, + "container_registry_management_client.aio.operations.ConnectedRegistriesOperations.begin_deactivate": null, + "container_registry_management_client.operations.ConnectedRegistriesOperations.resync": null, + "container_registry_management_client.aio.operations.ConnectedRegistriesOperations.resync": null, + "container_registry_management_client.operations.CredentialSetsOperations.list": null, + "container_registry_management_client.aio.operations.CredentialSetsOperations.list": null, + "container_registry_management_client.operations.CredentialSetsOperations.get": null, + "container_registry_management_client.aio.operations.CredentialSetsOperations.get": null, + "container_registry_management_client.operations.CredentialSetsOperations.begin_create": null, + "container_registry_management_client.aio.operations.CredentialSetsOperations.begin_create": null, + "container_registry_management_client.operations.CredentialSetsOperations.begin_update": null, + "container_registry_management_client.aio.operations.CredentialSetsOperations.begin_update": null, + "container_registry_management_client.operations.CredentialSetsOperations.begin_delete": null, + "container_registry_management_client.aio.operations.CredentialSetsOperations.begin_delete": null, + "container_registry_management_client.operations.ExportPipelinesOperations.list": null, + "container_registry_management_client.aio.operations.ExportPipelinesOperations.list": null, + "container_registry_management_client.operations.ExportPipelinesOperations.get": null, + "container_registry_management_client.aio.operations.ExportPipelinesOperations.get": null, + "container_registry_management_client.operations.ExportPipelinesOperations.begin_create": null, + "container_registry_management_client.aio.operations.ExportPipelinesOperations.begin_create": null, + "container_registry_management_client.operations.ExportPipelinesOperations.begin_delete": null, + "container_registry_management_client.aio.operations.ExportPipelinesOperations.begin_delete": null, + "container_registry_management_client.operations.ImportPipelinesOperations.list": null, + "container_registry_management_client.aio.operations.ImportPipelinesOperations.list": null, + "container_registry_management_client.operations.ImportPipelinesOperations.get": null, + "container_registry_management_client.aio.operations.ImportPipelinesOperations.get": null, + "container_registry_management_client.operations.ImportPipelinesOperations.begin_create": null, + "container_registry_management_client.aio.operations.ImportPipelinesOperations.begin_create": null, + "container_registry_management_client.operations.ImportPipelinesOperations.begin_delete": null, + "container_registry_management_client.aio.operations.ImportPipelinesOperations.begin_delete": null, + "container_registry_management_client.operations.ArchivesOperations.list": null, + "container_registry_management_client.aio.operations.ArchivesOperations.list": null, + "container_registry_management_client.operations.ArchivesOperations.get": null, + "container_registry_management_client.aio.operations.ArchivesOperations.get": null, + "container_registry_management_client.operations.ArchivesOperations.begin_create": null, + "container_registry_management_client.aio.operations.ArchivesOperations.begin_create": null, + "container_registry_management_client.operations.ArchivesOperations.update": null, + "container_registry_management_client.aio.operations.ArchivesOperations.update": null, + "container_registry_management_client.operations.ArchivesOperations.begin_delete": null, + "container_registry_management_client.aio.operations.ArchivesOperations.begin_delete": null, + "container_registry_management_client.operations.ArchiveVersionsOperations.list": null, + "container_registry_management_client.aio.operations.ArchiveVersionsOperations.list": null, + "container_registry_management_client.operations.ArchiveVersionsOperations.get": null, + "container_registry_management_client.aio.operations.ArchiveVersionsOperations.get": null, + "container_registry_management_client.operations.ArchiveVersionsOperations.begin_create": null, + "container_registry_management_client.aio.operations.ArchiveVersionsOperations.begin_create": null, + "container_registry_management_client.operations.ArchiveVersionsOperations.begin_delete": null, + "container_registry_management_client.aio.operations.ArchiveVersionsOperations.begin_delete": null, + "container_registry_management_client.operations.PipelineRunsOperations.list": null, + "container_registry_management_client.aio.operations.PipelineRunsOperations.list": null, + "container_registry_management_client.operations.PipelineRunsOperations.get": null, + "container_registry_management_client.aio.operations.PipelineRunsOperations.get": null, + "container_registry_management_client.operations.PipelineRunsOperations.begin_create": null, + "container_registry_management_client.aio.operations.PipelineRunsOperations.begin_create": null, + "container_registry_management_client.operations.PipelineRunsOperations.begin_delete": null, + "container_registry_management_client.aio.operations.PipelineRunsOperations.begin_delete": null, + "container_registry_management_client.operations.PrivateEndpointConnectionsOperations.list": null, + "container_registry_management_client.aio.operations.PrivateEndpointConnectionsOperations.list": null, + "container_registry_management_client.operations.PrivateEndpointConnectionsOperations.get": null, + "container_registry_management_client.aio.operations.PrivateEndpointConnectionsOperations.get": null, + "container_registry_management_client.operations.PrivateEndpointConnectionsOperations.begin_create_or_update": null, + "container_registry_management_client.aio.operations.PrivateEndpointConnectionsOperations.begin_create_or_update": null, + "container_registry_management_client.operations.PrivateEndpointConnectionsOperations.begin_delete": null, + "container_registry_management_client.aio.operations.PrivateEndpointConnectionsOperations.begin_delete": null, + "container_registry_management_client.operations.ReplicationsOperations.list": null, + "container_registry_management_client.aio.operations.ReplicationsOperations.list": null, + "container_registry_management_client.operations.ReplicationsOperations.get": null, + "container_registry_management_client.aio.operations.ReplicationsOperations.get": null, + "container_registry_management_client.operations.ReplicationsOperations.begin_create": null, + "container_registry_management_client.aio.operations.ReplicationsOperations.begin_create": null, + "container_registry_management_client.operations.ReplicationsOperations.begin_update": null, + "container_registry_management_client.aio.operations.ReplicationsOperations.begin_update": null, + "container_registry_management_client.operations.ReplicationsOperations.begin_delete": null, + "container_registry_management_client.aio.operations.ReplicationsOperations.begin_delete": null, + "container_registry_management_client.operations.ScopeMapsOperations.list": null, + "container_registry_management_client.aio.operations.ScopeMapsOperations.list": null, + "container_registry_management_client.operations.ScopeMapsOperations.get": null, + "container_registry_management_client.aio.operations.ScopeMapsOperations.get": null, + "container_registry_management_client.operations.ScopeMapsOperations.begin_create": null, + "container_registry_management_client.aio.operations.ScopeMapsOperations.begin_create": null, + "container_registry_management_client.operations.ScopeMapsOperations.begin_update": null, + "container_registry_management_client.aio.operations.ScopeMapsOperations.begin_update": null, + "container_registry_management_client.operations.ScopeMapsOperations.begin_delete": null, + "container_registry_management_client.aio.operations.ScopeMapsOperations.begin_delete": null, + "container_registry_management_client.operations.TokensOperations.list": null, + "container_registry_management_client.aio.operations.TokensOperations.list": null, + "container_registry_management_client.operations.TokensOperations.get": null, + "container_registry_management_client.aio.operations.TokensOperations.get": null, + "container_registry_management_client.operations.TokensOperations.begin_create": null, + "container_registry_management_client.aio.operations.TokensOperations.begin_create": null, + "container_registry_management_client.operations.TokensOperations.begin_update": null, + "container_registry_management_client.aio.operations.TokensOperations.begin_update": null, + "container_registry_management_client.operations.TokensOperations.begin_delete": null, + "container_registry_management_client.aio.operations.TokensOperations.begin_delete": null, + "container_registry_management_client.operations.WebhooksOperations.list": null, + "container_registry_management_client.aio.operations.WebhooksOperations.list": null, + "container_registry_management_client.operations.WebhooksOperations.get": null, + "container_registry_management_client.aio.operations.WebhooksOperations.get": null, + "container_registry_management_client.operations.WebhooksOperations.begin_create": null, + "container_registry_management_client.aio.operations.WebhooksOperations.begin_create": null, + "container_registry_management_client.operations.WebhooksOperations.begin_update": null, + "container_registry_management_client.aio.operations.WebhooksOperations.begin_update": null, + "container_registry_management_client.operations.WebhooksOperations.begin_delete": null, + "container_registry_management_client.aio.operations.WebhooksOperations.begin_delete": null, + "container_registry_management_client.operations.WebhooksOperations.get_callback_config": null, + "container_registry_management_client.aio.operations.WebhooksOperations.get_callback_config": null, + "container_registry_management_client.operations.WebhooksOperations.list_events": null, + "container_registry_management_client.aio.operations.WebhooksOperations.list_events": null, + "container_registry_management_client.operations.WebhooksOperations.ping": null, + "container_registry_management_client.aio.operations.WebhooksOperations.ping": null + } +} \ No newline at end of file diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/__init__.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/__init__.py new file mode 100644 index 00000000000..42a0aa5c247 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/__init__.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.8, generator: @autorest/python@6.49.1) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position + +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._client import ContainerRegistryManagementClient # type: ignore + +try: + from ._patch import __all__ as _patch_all + from ._patch import * +except ImportError: + _patch_all = [] +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "ContainerRegistryManagementClient", +] +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore + +_patch_sdk() diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/_client.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/_client.py new file mode 100644 index 00000000000..09461f61a99 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/_client.py @@ -0,0 +1,186 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.8, generator: @autorest/python@6.49.1) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from copy import deepcopy +from typing import Any, TYPE_CHECKING +from typing_extensions import Self + +from azure.core import PipelineClient +from azure.core.pipeline import policies +from azure.core.rest import HttpRequest, HttpResponse + +from . import models as _models +from ._configuration import ContainerRegistryManagementClientConfiguration +from ._utils.serialization import Deserializer, Serializer +from .operations import ( + ArchiveVersionsOperations, + ArchivesOperations, + CacheRulesOperations, + ConnectedRegistriesOperations, + CredentialSetsOperations, + ExportPipelinesOperations, + ImportPipelinesOperations, + Operations, + PipelineRunsOperations, + PrivateEndpointConnectionsOperations, + RegistriesOperations, + ReplicationsOperations, + ScopeMapsOperations, + TokensOperations, + WebhooksOperations, +) + +if TYPE_CHECKING: + from azure.core.credentials import TokenCredential + + +class ContainerRegistryManagementClient: # pylint: disable=too-many-instance-attributes + """The Microsoft Azure Container Registry management API provides create, read, update, and delete + functionality for Azure Container Registry resources including registries, replications, + webhooks, tasks, runs, and other registry components. + + :ivar operations: Operations operations + :vartype operations: container_registry_management_client.operations.Operations + :ivar registries: RegistriesOperations operations + :vartype registries: container_registry_management_client.operations.RegistriesOperations + :ivar cache_rules: CacheRulesOperations operations + :vartype cache_rules: container_registry_management_client.operations.CacheRulesOperations + :ivar connected_registries: ConnectedRegistriesOperations operations + :vartype connected_registries: + container_registry_management_client.operations.ConnectedRegistriesOperations + :ivar credential_sets: CredentialSetsOperations operations + :vartype credential_sets: + container_registry_management_client.operations.CredentialSetsOperations + :ivar export_pipelines: ExportPipelinesOperations operations + :vartype export_pipelines: + container_registry_management_client.operations.ExportPipelinesOperations + :ivar import_pipelines: ImportPipelinesOperations operations + :vartype import_pipelines: + container_registry_management_client.operations.ImportPipelinesOperations + :ivar archives: ArchivesOperations operations + :vartype archives: container_registry_management_client.operations.ArchivesOperations + :ivar archive_versions: ArchiveVersionsOperations operations + :vartype archive_versions: + container_registry_management_client.operations.ArchiveVersionsOperations + :ivar pipeline_runs: PipelineRunsOperations operations + :vartype pipeline_runs: container_registry_management_client.operations.PipelineRunsOperations + :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations + :vartype private_endpoint_connections: + container_registry_management_client.operations.PrivateEndpointConnectionsOperations + :ivar replications: ReplicationsOperations operations + :vartype replications: container_registry_management_client.operations.ReplicationsOperations + :ivar scope_maps: ScopeMapsOperations operations + :vartype scope_maps: container_registry_management_client.operations.ScopeMapsOperations + :ivar tokens: TokensOperations operations + :vartype tokens: container_registry_management_client.operations.TokensOperations + :ivar webhooks: WebhooksOperations operations + :vartype webhooks: container_registry_management_client.operations.WebhooksOperations + :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. + :type subscription_id: str + :param credential: Credential needed for the client to connect to Azure. Required. + :type credential: ~azure.core.credentials.TokenCredential + :keyword endpoint: Service URL. Default value is "https://management.azure.com". + :paramtype endpoint: str + :keyword api_version: Api Version. Default value is "2026-01-01-preview". Note that overriding + this default value may result in unsupported behavior. + :paramtype api_version: str + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + """ + + def __init__( + self, + subscription_id: str, + credential: "TokenCredential", + *, + endpoint: str = "https://management.azure.com", + **kwargs: Any + ) -> None: + self._config = ContainerRegistryManagementClientConfiguration( + subscription_id=subscription_id, credential=credential, **kwargs + ) + + _policies = kwargs.pop("policies", None) + if _policies is None: + _policies = [ + policies.RequestIdPolicy(**kwargs), + self._config.headers_policy, + self._config.user_agent_policy, + self._config.proxy_policy, + policies.ContentDecodePolicy(**kwargs), + self._config.redirect_policy, + self._config.retry_policy, + self._config.authentication_policy, + self._config.custom_hook_policy, + self._config.logging_policy, + policies.DistributedTracingPolicy(**kwargs), + policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, + self._config.http_logging_policy, + ] + self._client: PipelineClient = PipelineClient(base_url=endpoint, policies=_policies, **kwargs) + + client_models = {k: v for k, v in _models._models.__dict__.items() if isinstance(v, type)} + client_models |= {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + self._serialize.client_side_validation = False + self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) + self.registries = RegistriesOperations(self._client, self._config, self._serialize, self._deserialize) + self.cache_rules = CacheRulesOperations(self._client, self._config, self._serialize, self._deserialize) + self.connected_registries = ConnectedRegistriesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.credential_sets = CredentialSetsOperations(self._client, self._config, self._serialize, self._deserialize) + self.export_pipelines = ExportPipelinesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.import_pipelines = ImportPipelinesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.archives = ArchivesOperations(self._client, self._config, self._serialize, self._deserialize) + self.archive_versions = ArchiveVersionsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.pipeline_runs = PipelineRunsOperations(self._client, self._config, self._serialize, self._deserialize) + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.replications = ReplicationsOperations(self._client, self._config, self._serialize, self._deserialize) + self.scope_maps = ScopeMapsOperations(self._client, self._config, self._serialize, self._deserialize) + self.tokens = TokensOperations(self._client, self._config, self._serialize, self._deserialize) + self.webhooks = WebhooksOperations(self._client, self._config, self._serialize, self._deserialize) + + def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = client.send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.HttpResponse + """ + + request_copy = deepcopy(request) + request_copy.url = self._client.format_url(request_copy.url) + return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore + + def close(self) -> None: + self._client.close() + + def __enter__(self) -> Self: + self._client.__enter__() + return self + + def __exit__(self, *exc_details: Any) -> None: + self._client.__exit__(*exc_details) diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/_configuration.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/_configuration.py new file mode 100644 index 00000000000..c3ad3409b69 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/_configuration.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.8, generator: @autorest/python@6.49.1) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core.pipeline import policies + +if TYPE_CHECKING: + from azure.core.credentials import TokenCredential + +VERSION = "unknown" + + +class ContainerRegistryManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long + """Configuration for ContainerRegistryManagementClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. + :type subscription_id: str + :param credential: Credential needed for the client to connect to Azure. Required. + :type credential: ~azure.core.credentials.TokenCredential + :keyword api_version: Api Version. Default value is "2026-01-01-preview". Note that overriding + this default value may result in unsupported behavior. + :paramtype api_version: str + """ + + def __init__(self, subscription_id: str, credential: "TokenCredential", **kwargs: Any) -> None: + api_version: str = kwargs.pop("api_version", "2026-01-01-preview") + + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + + self.subscription_id = subscription_id + self.credential = credential + self.api_version = api_version + self.credential_scopes = kwargs.pop("credential_scopes", ["user_impersonation"]) + kwargs.setdefault("sdk_moniker", "containerregistrymanagementclient/{}".format(VERSION)) + self.polling_interval = kwargs.get("polling_interval", 30) + self._configure(**kwargs) + + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.BearerTokenCredentialPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/_patch.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/_patch.py new file mode 100644 index 00000000000..87676c65a8f --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/_patch.py @@ -0,0 +1,21 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" + + +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/_utils/__init__.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/_utils/__init__.py new file mode 100644 index 00000000000..2566f510b64 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/_utils/__init__.py @@ -0,0 +1,4 @@ +# -------------------------------------------------------------------------- +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.8, generator: @autorest/python@6.49.1) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/_utils/serialization.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/_utils/serialization.py new file mode 100644 index 00000000000..74d041d57ca --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/_utils/serialization.py @@ -0,0 +1,2039 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.8, generator: @autorest/python@6.49.1) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +# pyright: reportUnnecessaryTypeIgnoreComment=false + +from base64 import b64decode, b64encode +import calendar +import datetime +import decimal +import email +from enum import Enum +import json +import logging +import re +import sys +import codecs +from typing import ( + Any, + cast, + Optional, + Union, + AnyStr, + IO, + Mapping, + Callable, + MutableMapping, +) + +try: + from urllib import quote # type: ignore +except ImportError: + from urllib.parse import quote +import xml.etree.ElementTree as ET + +import isodate # type: ignore +from typing_extensions import Self + +from azure.core.exceptions import DeserializationError, SerializationError +from azure.core.serialization import NULL as CoreNull + +_BOM = codecs.BOM_UTF8.decode(encoding="utf-8") + +JSON = MutableMapping[str, Any] + + +class RawDeserializer: + + # Accept "text" because we're open minded people... + JSON_REGEXP = re.compile(r"^(application|text)/([a-z+.]+\+)?json$") + + # Name used in context + CONTEXT_NAME = "deserialized_data" + + @classmethod + def deserialize_from_text(cls, data: Optional[Union[AnyStr, IO]], content_type: Optional[str] = None) -> Any: + """Decode data according to content-type. + + Accept a stream of data as well, but will be load at once in memory for now. + + If no content-type, will return the string version (not bytes, not stream) + + :param data: Input, could be bytes or stream (will be decoded with UTF8) or text + :type data: str or bytes or IO + :param str content_type: The content type. + :return: The deserialized data. + :rtype: object + """ + if hasattr(data, "read"): + # Assume a stream + data = cast(IO, data).read() + + if isinstance(data, bytes): + data_as_str = data.decode(encoding="utf-8-sig") + else: + # Explain to mypy the correct type. + data_as_str = cast(str, data) + + # Remove Byte Order Mark if present in string + data_as_str = data_as_str.lstrip(_BOM) + + if content_type is None: + return data + + if cls.JSON_REGEXP.match(content_type): + try: + return json.loads(data_as_str) + except ValueError as err: + raise DeserializationError("JSON is invalid: {}".format(err), err) from err + elif "xml" in (content_type or []): + try: + + try: + if isinstance(data, unicode): # type: ignore + # If I'm Python 2.7 and unicode XML will scream if I try a "fromstring" on unicode string + data_as_str = data_as_str.encode(encoding="utf-8") # type: ignore + except NameError: + pass + + return ET.fromstring(data_as_str) # nosec + except ET.ParseError as err: + # It might be because the server has an issue, and returned JSON with + # content-type XML.... + # So let's try a JSON load, and if it's still broken + # let's flow the initial exception + def _json_attemp(data): + try: + return True, json.loads(data) + except ValueError: + return False, None # Don't care about this one + + success, json_result = _json_attemp(data) + if success: + return json_result + # If i'm here, it's not JSON, it's not XML, let's scream + # and raise the last context in this block (the XML exception) + # The function hack is because Py2.7 messes up with exception + # context otherwise. + _LOGGER.critical("Wasn't XML not JSON, failing") + raise DeserializationError("XML is invalid") from err + elif content_type.startswith("text/"): + return data_as_str + raise DeserializationError("Cannot deserialize content-type: {}".format(content_type)) + + @classmethod + def deserialize_from_http_generics(cls, body_bytes: Optional[Union[AnyStr, IO]], headers: Mapping) -> Any: + """Deserialize from HTTP response. + + Use bytes and headers to NOT use any requests/aiohttp or whatever + specific implementation. + Headers will tested for "content-type" + + :param bytes body_bytes: The body of the response. + :param dict headers: The headers of the response. + :returns: The deserialized data. + :rtype: object + """ + # Try to use content-type from headers if available + content_type = None + if "content-type" in headers: + content_type = headers["content-type"].split(";")[0].strip().lower() + # Ouch, this server did not declare what it sent... + # Let's guess it's JSON... + # Also, since Autorest was considering that an empty body was a valid JSON, + # need that test as well.... + else: + content_type = "application/json" + + if body_bytes: + return cls.deserialize_from_text(body_bytes, content_type) + return None + + +_LOGGER = logging.getLogger(__name__) + +try: + _long_type = long # type: ignore +except NameError: + _long_type = int + +TZ_UTC = datetime.timezone.utc + +_FLATTEN = re.compile(r"(? None: + self.additional_properties: Optional[dict[str, Any]] = {} + for k in kwargs: # pylint: disable=consider-using-dict-items + if k not in self._attribute_map: + _LOGGER.warning("%s is not a known attribute of class %s and will be ignored", k, self.__class__) + elif k in self._validation and self._validation[k].get("readonly", False): + _LOGGER.warning("Readonly attribute %s will be ignored in class %s", k, self.__class__) + else: + setattr(self, k, kwargs[k]) + + def __eq__(self, other: Any) -> bool: + """Compare objects by comparing all attributes. + + :param object other: The object to compare + :returns: True if objects are equal + :rtype: bool + """ + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + return False + + def __ne__(self, other: Any) -> bool: + """Compare objects by comparing all attributes. + + :param object other: The object to compare + :returns: True if objects are not equal + :rtype: bool + """ + return not self.__eq__(other) + + def __str__(self) -> str: + return str(self.__dict__) + + @classmethod + def enable_additional_properties_sending(cls) -> None: + cls._attribute_map["additional_properties"] = {"key": "", "type": "{object}"} + + @classmethod + def is_xml_model(cls) -> bool: + try: + cls._xml_map # type: ignore + except AttributeError: + return False + return True + + @classmethod + def _create_xml_node(cls): + """Create XML node. + + :returns: The XML node + :rtype: xml.etree.ElementTree.Element + """ + try: + xml_map = cls._xml_map # type: ignore + except AttributeError: + xml_map = {} + + return _create_xml_node(xml_map.get("name", cls.__name__), xml_map.get("prefix", None), xml_map.get("ns", None)) + + def serialize(self, keep_readonly: bool = False, **kwargs: Any) -> JSON: + """Return the JSON that would be sent to server from this model. + + This is an alias to `as_dict(full_restapi_key_transformer, keep_readonly=False)`. + + If you want XML serialization, you can pass the kwargs is_xml=True. + + :param bool keep_readonly: If you want to serialize the readonly attributes + :returns: A dict JSON compatible object + :rtype: dict + """ + serializer = Serializer(self._infer_class_models()) + return serializer._serialize( # type: ignore # pylint: disable=protected-access + self, keep_readonly=keep_readonly, **kwargs + ) + + def as_dict( + self, + keep_readonly: bool = True, + key_transformer: Callable[[str, dict[str, Any], Any], Any] = attribute_transformer, + **kwargs: Any + ) -> JSON: + """Return a dict that can be serialized using json.dump. + + Advanced usage might optionally use a callback as parameter: + + .. code::python + + def my_key_transformer(key, attr_desc, value): + return key + + Key is the attribute name used in Python. Attr_desc + is a dict of metadata. Currently contains 'type' with the + msrest type and 'key' with the RestAPI encoded key. + Value is the current value in this object. + + The string returned will be used to serialize the key. + If the return type is a list, this is considered hierarchical + result dict. + + See the three examples in this file: + + - attribute_transformer + - full_restapi_key_transformer + - last_restapi_key_transformer + + If you want XML serialization, you can pass the kwargs is_xml=True. + + :param bool keep_readonly: If you want to serialize the readonly attributes + :param function key_transformer: A key transformer function. + :returns: A dict JSON compatible object + :rtype: dict + """ + serializer = Serializer(self._infer_class_models()) + return serializer._serialize( # type: ignore # pylint: disable=protected-access + self, key_transformer=key_transformer, keep_readonly=keep_readonly, **kwargs + ) + + @classmethod + def _infer_class_models(cls): + try: + str_models = cls.__module__.rsplit(".", 1)[0] + models = sys.modules[str_models] + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + if cls.__name__ not in client_models: + raise ValueError("Not Autorest generated code") + except Exception: # pylint: disable=broad-exception-caught + # Assume it's not Autorest generated (tests?). Add ourselves as dependencies. + client_models = {cls.__name__: cls} + return client_models + + @classmethod + def deserialize(cls, data: Any, content_type: Optional[str] = None) -> Self: + """Parse a str using the RestAPI syntax and return a model. + + :param str data: A str using RestAPI structure. JSON by default. + :param str content_type: JSON by default, set application/xml if XML. + :returns: An instance of this model + :raises DeserializationError: if something went wrong + :rtype: Self + """ + deserializer = Deserializer(cls._infer_class_models()) + return deserializer(cls.__name__, data, content_type=content_type) # type: ignore + + @classmethod + def from_dict( + cls, + data: Any, + key_extractors: Optional[Callable[[str, dict[str, Any], Any], Any]] = None, + content_type: Optional[str] = None, + ) -> Self: + """Parse a dict using given key extractor return a model. + + By default consider key + extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor + and last_rest_key_case_insensitive_extractor) + + :param dict data: A dict using RestAPI structure + :param function key_extractors: A key extractor function. + :param str content_type: JSON by default, set application/xml if XML. + :returns: An instance of this model + :raises DeserializationError: if something went wrong + :rtype: Self + """ + deserializer = Deserializer(cls._infer_class_models()) + deserializer.key_extractors = ( # type: ignore + [ # type: ignore + attribute_key_case_insensitive_extractor, + rest_key_case_insensitive_extractor, + last_rest_key_case_insensitive_extractor, + ] + if key_extractors is None + else key_extractors + ) + return deserializer(cls.__name__, data, content_type=content_type) # type: ignore + + @classmethod + def _flatten_subtype(cls, key, objects): + if "_subtype_map" not in cls.__dict__: + return {} + result = dict(cls._subtype_map[key]) + for valuetype in cls._subtype_map[key].values(): + result |= objects[valuetype]._flatten_subtype(key, objects) # pylint: disable=protected-access + return result + + @classmethod + def _classify(cls, response, objects): + """Check the class _subtype_map for any child classes. + We want to ignore any inherited _subtype_maps. + + :param dict response: The initial data + :param dict objects: The class objects + :returns: The class to be used + :rtype: class + """ + for subtype_key in cls.__dict__.get("_subtype_map", {}).keys(): + subtype_value = None + + if not isinstance(response, ET.Element): + rest_api_response_key = cls._get_rest_key_parts(subtype_key)[-1] + subtype_value = response.get(rest_api_response_key, None) or response.get(subtype_key, None) + else: + subtype_value = xml_key_extractor(subtype_key, cls._attribute_map[subtype_key], response) + if subtype_value: + # Try to match base class. Can be class name only + # (bug to fix in Autorest to support x-ms-discriminator-name) + if cls.__name__ == subtype_value: + return cls + flatten_mapping_type = cls._flatten_subtype(subtype_key, objects) + try: + return objects[flatten_mapping_type[subtype_value]] # type: ignore + except KeyError: + _LOGGER.warning( + "Subtype value %s has no mapping, use base class %s.", + subtype_value, + cls.__name__, + ) + break + else: + _LOGGER.warning("Discriminator %s is absent or null, use base class %s.", subtype_key, cls.__name__) + break + return cls + + @classmethod + def _get_rest_key_parts(cls, attr_key): + """Get the RestAPI key of this attr, split it and decode part + :param str attr_key: Attribute key must be in attribute_map. + :returns: A list of RestAPI part + :rtype: list + """ + rest_split_key = _FLATTEN.split(cls._attribute_map[attr_key]["key"]) + return [_decode_attribute_map_key(key_part) for key_part in rest_split_key] + + +def _decode_attribute_map_key(key): + """This decode a key in an _attribute_map to the actual key we want to look at + inside the received data. + + :param str key: A key string from the generated code + :returns: The decoded key + :rtype: str + """ + return key.replace("\\.", ".") + + +class Serializer: # pylint: disable=too-many-public-methods + """Request object model serializer.""" + + basic_types = {str: "str", int: "int", bool: "bool", float: "float"} + + _xml_basic_types_serializers = {"bool": lambda x: str(x).lower()} + days = {0: "Mon", 1: "Tue", 2: "Wed", 3: "Thu", 4: "Fri", 5: "Sat", 6: "Sun"} + months = { + 1: "Jan", + 2: "Feb", + 3: "Mar", + 4: "Apr", + 5: "May", + 6: "Jun", + 7: "Jul", + 8: "Aug", + 9: "Sep", + 10: "Oct", + 11: "Nov", + 12: "Dec", + } + validation = { + "min_length": lambda x, y: len(x) < y, + "max_length": lambda x, y: len(x) > y, + "minimum": lambda x, y: x < y, + "maximum": lambda x, y: x > y, + "minimum_ex": lambda x, y: x <= y, + "maximum_ex": lambda x, y: x >= y, + "min_items": lambda x, y: len(x) < y, + "max_items": lambda x, y: len(x) > y, + "pattern": lambda x, y: not re.match(y, x, re.UNICODE), + "unique": lambda x, y: len(x) != len(set(x)), + "multiple": lambda x, y: x % y != 0, + } + + def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: + self.serialize_type = { + "iso-8601": Serializer.serialize_iso, + "rfc-1123": Serializer.serialize_rfc, + "unix-time": Serializer.serialize_unix, + "duration": Serializer.serialize_duration, + "date": Serializer.serialize_date, + "time": Serializer.serialize_time, + "decimal": Serializer.serialize_decimal, + "long": Serializer.serialize_long, + "bytearray": Serializer.serialize_bytearray, + "base64": Serializer.serialize_base64, + "object": self.serialize_object, + "[]": self.serialize_iter, + "{}": self.serialize_dict, + } + self.dependencies: dict[str, type] = dict(classes) if classes else {} + self.key_transformer = full_restapi_key_transformer + self.client_side_validation = True + + def _serialize( # pylint: disable=too-many-nested-blocks, too-many-branches, too-many-statements, too-many-locals + self, target_obj, data_type=None, **kwargs + ): + """Serialize data into a string according to type. + + :param object target_obj: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str, dict + :raises SerializationError: if serialization fails. + :returns: The serialized data. + """ + key_transformer = kwargs.get("key_transformer", self.key_transformer) + keep_readonly = kwargs.get("keep_readonly", False) + if target_obj is None: + return None + + attr_name = None + class_name = target_obj.__class__.__name__ + + if data_type: + return self.serialize_data(target_obj, data_type, **kwargs) + + if not hasattr(target_obj, "_attribute_map"): + data_type = type(target_obj).__name__ + if data_type in self.basic_types.values(): + return self.serialize_data(target_obj, data_type, **kwargs) + + # Force "is_xml" kwargs if we detect a XML model + try: + is_xml_model_serialization = kwargs["is_xml"] + except KeyError: + is_xml_model_serialization = kwargs.setdefault("is_xml", target_obj.is_xml_model()) + + serialized = {} + if is_xml_model_serialization: + serialized = target_obj._create_xml_node() # pylint: disable=protected-access + try: + attributes = target_obj._attribute_map # pylint: disable=protected-access + for attr, attr_desc in attributes.items(): + attr_name = attr + if not keep_readonly and target_obj._validation.get( # pylint: disable=protected-access + attr_name, {} + ).get("readonly", False): + continue + + if attr_name == "additional_properties" and attr_desc["key"] == "": + if target_obj.additional_properties is not None: + serialized |= target_obj.additional_properties + continue + try: + + orig_attr = getattr(target_obj, attr) + if is_xml_model_serialization: + pass # Don't provide "transformer" for XML for now. Keep "orig_attr" + else: # JSON + keys, orig_attr = key_transformer(attr, attr_desc.copy(), orig_attr) + keys = keys if isinstance(keys, list) else [keys] + + kwargs["serialization_ctxt"] = attr_desc + new_attr = self.serialize_data(orig_attr, attr_desc["type"], **kwargs) + + if is_xml_model_serialization: + xml_desc = attr_desc.get("xml", {}) + xml_name = xml_desc.get("name", attr_desc["key"]) + xml_prefix = xml_desc.get("prefix", None) + xml_ns = xml_desc.get("ns", None) + if xml_desc.get("attr", False): + if xml_ns: + ET.register_namespace(xml_prefix, xml_ns) + xml_name = "{{{}}}{}".format(xml_ns, xml_name) + serialized.set(xml_name, new_attr) # type: ignore + continue + if xml_desc.get("text", False): + serialized.text = new_attr # type: ignore + continue + if isinstance(new_attr, list): + serialized.extend(new_attr) # type: ignore + elif isinstance(new_attr, ET.Element): + # If the down XML has no XML/Name, + # we MUST replace the tag with the local tag. But keeping the namespaces. + if "name" not in getattr(orig_attr, "_xml_map", {}): + splitted_tag = new_attr.tag.split("}") + if len(splitted_tag) == 2: # Namespace + new_attr.tag = "}".join([splitted_tag[0], xml_name]) + else: + new_attr.tag = xml_name + serialized.append(new_attr) # type: ignore + else: # That's a basic type + # Integrate namespace if necessary + local_node = _create_xml_node(xml_name, xml_prefix, xml_ns) + local_node.text = str(new_attr) + serialized.append(local_node) # type: ignore + else: # JSON + for k in reversed(keys): # type: ignore + new_attr = {k: new_attr} + + _new_attr = new_attr + _serialized = serialized + for k in keys: # type: ignore + if k not in _serialized: + _serialized.update(_new_attr) # type: ignore + _new_attr = _new_attr[k] # type: ignore + _serialized = _serialized[k] + except ValueError as err: + if isinstance(err, SerializationError): + raise + + except (AttributeError, KeyError, TypeError) as err: + msg = "Attribute {} in object {} cannot be serialized.\n{}".format(attr_name, class_name, str(target_obj)) + raise SerializationError(msg) from err + return serialized + + def body(self, data, data_type, **kwargs): + """Serialize data intended for a request body. + + :param object data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: dict + :raises SerializationError: if serialization fails. + :raises ValueError: if data is None + :returns: The serialized request body + """ + + # Just in case this is a dict + internal_data_type_str = data_type.strip("[]{}") + internal_data_type = self.dependencies.get(internal_data_type_str, None) + try: + is_xml_model_serialization = kwargs["is_xml"] + except KeyError: + if internal_data_type and issubclass(internal_data_type, Model): + is_xml_model_serialization = kwargs.setdefault("is_xml", internal_data_type.is_xml_model()) + else: + is_xml_model_serialization = False + if internal_data_type and not isinstance(internal_data_type, Enum): + try: + deserializer = Deserializer(self.dependencies) + # Since it's on serialization, it's almost sure that format is not JSON REST + # We're not able to deal with additional properties for now. + deserializer.additional_properties_detection = False + if is_xml_model_serialization: + deserializer.key_extractors = [ # type: ignore + attribute_key_case_insensitive_extractor, + ] + else: + deserializer.key_extractors = [ + rest_key_case_insensitive_extractor, + attribute_key_case_insensitive_extractor, + last_rest_key_case_insensitive_extractor, + ] + data = deserializer._deserialize(data_type, data) # pylint: disable=protected-access + except DeserializationError as err: + raise SerializationError("Unable to build a model: " + str(err)) from err + + return self._serialize(data, data_type, **kwargs) + + def url(self, name, data, data_type, **kwargs): + """Serialize data intended for a URL path. + + :param str name: The name of the URL path parameter. + :param object data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str + :returns: The serialized URL path + :raises TypeError: if serialization fails. + :raises ValueError: if data is None + """ + try: + output = self.serialize_data(data, data_type, **kwargs) + if data_type == "bool": + output = json.dumps(output) + + if kwargs.get("skip_quote") is True: + output = str(output) + output = output.replace("{", quote("{")).replace("}", quote("}")) + else: + output = quote(str(output), safe="") + except SerializationError as exc: + raise TypeError("{} must be type {}.".format(name, data_type)) from exc + return output + + def query(self, name, data, data_type, **kwargs): + """Serialize data intended for a URL query. + + :param str name: The name of the query parameter. + :param object data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str, list + :raises TypeError: if serialization fails. + :raises ValueError: if data is None + :returns: The serialized query parameter + """ + try: + # Treat the list aside, since we don't want to encode the div separator + if data_type.startswith("["): + internal_data_type = data_type[1:-1] + do_quote = not kwargs.get("skip_quote", False) + return self.serialize_iter(data, internal_data_type, do_quote=do_quote, **kwargs) + + # Not a list, regular serialization + output = self.serialize_data(data, data_type, **kwargs) + if data_type == "bool": + output = json.dumps(output) + if kwargs.get("skip_quote") is True: + output = str(output) + else: + output = quote(str(output), safe="") + except SerializationError as exc: + raise TypeError("{} must be type {}.".format(name, data_type)) from exc + return str(output) + + def header(self, name, data, data_type, **kwargs): + """Serialize data intended for a request header. + + :param str name: The name of the header. + :param object data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str + :raises TypeError: if serialization fails. + :raises ValueError: if data is None + :returns: The serialized header + """ + try: + if data_type in ["[str]"]: + data = ["" if d is None else d for d in data] + + output = self.serialize_data(data, data_type, **kwargs) + if data_type == "bool": + output = json.dumps(output) + except SerializationError as exc: + raise TypeError("{} must be type {}.".format(name, data_type)) from exc + return str(output) + + def serialize_data(self, data, data_type, **kwargs): + """Serialize generic data according to supplied data type. + + :param object data: The data to be serialized. + :param str data_type: The type to be serialized from. + :raises AttributeError: if required data is None. + :raises ValueError: if data is None + :raises SerializationError: if serialization fails. + :returns: The serialized data. + :rtype: str, int, float, bool, dict, list + """ + if data is None: + raise ValueError("No value for given attribute") + + try: + if data is CoreNull: + return None + if data_type in self.basic_types.values(): + return self.serialize_basic(data, data_type, **kwargs) + + if data_type in self.serialize_type: + return self.serialize_type[data_type](data, **kwargs) + + # If dependencies is empty, try with current data class + # It has to be a subclass of Enum anyway + enum_type = self.dependencies.get(data_type, cast(type, data.__class__)) + if issubclass(enum_type, Enum): + return Serializer.serialize_enum(data, enum_obj=enum_type) + + iter_type = data_type[0] + data_type[-1] + if iter_type in self.serialize_type: + return self.serialize_type[iter_type](data, data_type[1:-1], **kwargs) + + except (ValueError, TypeError) as err: + msg = "Unable to serialize value: {!r} as type: {!r}." + raise SerializationError(msg.format(data, data_type)) from err + return self._serialize(data, **kwargs) + + @classmethod + def _get_custom_serializers(cls, data_type, **kwargs): # pylint: disable=inconsistent-return-statements + custom_serializer = kwargs.get("basic_types_serializers", {}).get(data_type) + if custom_serializer: + return custom_serializer + if kwargs.get("is_xml", False): + return cls._xml_basic_types_serializers.get(data_type) + + @classmethod + def serialize_basic(cls, data, data_type, **kwargs): + """Serialize basic builting data type. + Serializes objects to str, int, float or bool. + + Possible kwargs: + - basic_types_serializers dict[str, callable] : If set, use the callable as serializer + - is_xml bool : If set, use xml_basic_types_serializers + + :param obj data: Object to be serialized. + :param str data_type: Type of object in the iterable. + :rtype: str, int, float, bool + :return: serialized object + :raises TypeError: raise if data_type is not one of str, int, float, bool. + """ + custom_serializer = cls._get_custom_serializers(data_type, **kwargs) + if custom_serializer: + return custom_serializer(data) + if data_type == "str": + return cls.serialize_unicode(data) + if data_type == "int": + return int(data) + if data_type == "float": + return float(data) + if data_type == "bool": + return bool(data) + raise TypeError("Unknown basic data type: {}".format(data_type)) + + @classmethod + def serialize_unicode(cls, data): + """Special handling for serializing unicode strings in Py2. + Encode to UTF-8 if unicode, otherwise handle as a str. + + :param str data: Object to be serialized. + :rtype: str + :return: serialized object + """ + try: # If I received an enum, return its value + return data.value + except AttributeError: + pass + + try: + if isinstance(data, unicode): # type: ignore + # Don't change it, JSON and XML ElementTree are totally able + # to serialize correctly u'' strings + return data + except NameError: + return str(data) + return str(data) + + def serialize_iter(self, data, iter_type, div=None, **kwargs): + """Serialize iterable. + + Supported kwargs: + - serialization_ctxt dict : The current entry of _attribute_map, or same format. + serialization_ctxt['type'] should be same as data_type. + - is_xml bool : If set, serialize as XML + + :param list data: Object to be serialized. + :param str iter_type: Type of object in the iterable. + :param str div: If set, this str will be used to combine the elements + in the iterable into a combined string. Default is 'None'. + Defaults to False. + :rtype: list, str + :return: serialized iterable + """ + if isinstance(data, str): + raise SerializationError("Refuse str type as a valid iter type.") + + serialization_ctxt = kwargs.get("serialization_ctxt", {}) + is_xml = kwargs.get("is_xml", False) + + serialized = [] + for d in data: + try: + serialized.append(self.serialize_data(d, iter_type, **kwargs)) + except ValueError as err: + if isinstance(err, SerializationError): + raise + serialized.append(None) + + if kwargs.get("do_quote", False): + serialized = ["" if s is None else quote(str(s), safe="") for s in serialized] + + if div: + serialized = ["" if s is None else str(s) for s in serialized] + serialized = div.join(serialized) + + if "xml" in serialization_ctxt or is_xml: + # XML serialization is more complicated + xml_desc = serialization_ctxt.get("xml", {}) + xml_name = xml_desc.get("name") + if not xml_name: + xml_name = serialization_ctxt["key"] + + # Create a wrap node if necessary (use the fact that Element and list have "append") + is_wrapped = xml_desc.get("wrapped", False) + node_name = xml_desc.get("itemsName", xml_name) + if is_wrapped: + final_result = _create_xml_node(xml_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) + else: + final_result = [] + # All list elements to "local_node" + for el in serialized: + if isinstance(el, ET.Element): + el_node = el + else: + el_node = _create_xml_node(node_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) + if el is not None: # Otherwise it writes "None" :-p + el_node.text = str(el) + final_result.append(el_node) + return final_result + return serialized + + def serialize_dict(self, attr, dict_type, **kwargs): + """Serialize a dictionary of objects. + + :param dict attr: Object to be serialized. + :param str dict_type: Type of object in the dictionary. + :rtype: dict + :return: serialized dictionary + """ + serialization_ctxt = kwargs.get("serialization_ctxt", {}) + serialized = {} + for key, value in attr.items(): + try: + serialized[self.serialize_unicode(key)] = self.serialize_data(value, dict_type, **kwargs) + except ValueError as err: + if isinstance(err, SerializationError): + raise + serialized[self.serialize_unicode(key)] = None + + if "xml" in serialization_ctxt: + # XML serialization is more complicated + xml_desc = serialization_ctxt["xml"] + xml_name = xml_desc["name"] + + final_result = _create_xml_node(xml_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) + for key, value in serialized.items(): + ET.SubElement(final_result, key).text = value + return final_result + + return serialized + + def serialize_object(self, attr, **kwargs): # pylint: disable=too-many-return-statements + """Serialize a generic object. + This will be handled as a dictionary. If object passed in is not + a basic type (str, int, float, dict, list) it will simply be + cast to str. + + :param dict attr: Object to be serialized. + :rtype: dict or str + :return: serialized object + """ + if attr is None: + return None + if isinstance(attr, ET.Element): + return attr + obj_type = type(attr) + if obj_type in self.basic_types: + return self.serialize_basic(attr, self.basic_types[obj_type], **kwargs) + if obj_type is _long_type: + return self.serialize_long(attr) + if obj_type is str: + return self.serialize_unicode(attr) + if obj_type is datetime.datetime: + return self.serialize_iso(attr) + if obj_type is datetime.date: + return self.serialize_date(attr) + if obj_type is datetime.time: + return self.serialize_time(attr) + if obj_type is datetime.timedelta: + return self.serialize_duration(attr) + if obj_type is decimal.Decimal: + return self.serialize_decimal(attr) + + # If it's a model or I know this dependency, serialize as a Model + if obj_type in self.dependencies.values() or isinstance(attr, Model): + return self._serialize(attr) + + if obj_type == dict: + serialized = {} + for key, value in attr.items(): + try: + serialized[self.serialize_unicode(key)] = self.serialize_object(value, **kwargs) + except ValueError: + serialized[self.serialize_unicode(key)] = None + return serialized + + if obj_type == list: + serialized = [] + for obj in attr: + try: + serialized.append(self.serialize_object(obj, **kwargs)) + except ValueError: + pass + return serialized + return str(attr) + + @staticmethod + def serialize_enum(attr, enum_obj=None): + try: + result = attr.value + except AttributeError: + result = attr + try: + enum_obj(result) # type: ignore + return result + except ValueError as exc: + for enum_value in enum_obj: # type: ignore + if enum_value.value.lower() == str(attr).lower(): + return enum_value.value + error = "{!r} is not valid value for enum {!r}" + raise SerializationError(error.format(attr, enum_obj)) from exc + + @staticmethod + def serialize_bytearray(attr, **kwargs): # pylint: disable=unused-argument + """Serialize bytearray into base-64 string. + + :param str attr: Object to be serialized. + :rtype: str + :return: serialized base64 + """ + return b64encode(attr).decode() + + @staticmethod + def serialize_base64(attr, **kwargs): # pylint: disable=unused-argument + """Serialize str into base-64 string. + + :param str attr: Object to be serialized. + :rtype: str + :return: serialized base64 + """ + encoded = b64encode(attr).decode("ascii") + return encoded.strip("=").replace("+", "-").replace("/", "_") + + @staticmethod + def serialize_decimal(attr, **kwargs): # pylint: disable=unused-argument + """Serialize Decimal object to float. + + :param decimal attr: Object to be serialized. + :rtype: float + :return: serialized decimal + """ + return float(attr) + + @staticmethod + def serialize_long(attr, **kwargs): # pylint: disable=unused-argument + """Serialize long (Py2) or int (Py3). + + :param int attr: Object to be serialized. + :rtype: int/long + :return: serialized long + """ + return _long_type(attr) + + @staticmethod + def serialize_date(attr, **kwargs): # pylint: disable=unused-argument + """Serialize Date object into ISO-8601 formatted string. + + :param Date attr: Object to be serialized. + :rtype: str + :return: serialized date + """ + if isinstance(attr, str): + attr = isodate.parse_date(attr) + t = "{:04}-{:02}-{:02}".format(attr.year, attr.month, attr.day) + return t + + @staticmethod + def serialize_time(attr, **kwargs): # pylint: disable=unused-argument + """Serialize Time object into ISO-8601 formatted string. + + :param datetime.time attr: Object to be serialized. + :rtype: str + :return: serialized time + """ + if isinstance(attr, str): + attr = isodate.parse_time(attr) + t = "{:02}:{:02}:{:02}".format(attr.hour, attr.minute, attr.second) + if attr.microsecond: + t += ".{:02}".format(attr.microsecond) + return t + + @staticmethod + def serialize_duration(attr, **kwargs): # pylint: disable=unused-argument + """Serialize TimeDelta object into ISO-8601 formatted string. + + :param TimeDelta attr: Object to be serialized. + :rtype: str + :return: serialized duration + """ + if isinstance(attr, str): + attr = isodate.parse_duration(attr) + return isodate.duration_isoformat(attr) + + @staticmethod + def serialize_rfc(attr, **kwargs): # pylint: disable=unused-argument + """Serialize Datetime object into RFC-1123 formatted string. + + :param Datetime attr: Object to be serialized. + :rtype: str + :raises TypeError: if format invalid. + :return: serialized rfc + """ + try: + if not attr.tzinfo: + _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") + utc = attr.utctimetuple() + except AttributeError as exc: + raise TypeError("RFC1123 object must be valid Datetime object.") from exc + + return "{}, {:02} {} {:04} {:02}:{:02}:{:02} GMT".format( + Serializer.days[utc.tm_wday], + utc.tm_mday, + Serializer.months[utc.tm_mon], + utc.tm_year, + utc.tm_hour, + utc.tm_min, + utc.tm_sec, + ) + + @staticmethod + def serialize_iso(attr, **kwargs): # pylint: disable=unused-argument + """Serialize Datetime object into ISO-8601 formatted string. + + :param Datetime attr: Object to be serialized. + :rtype: str + :raises SerializationError: if format invalid. + :return: serialized iso + """ + if isinstance(attr, str): + attr = isodate.parse_datetime(attr) + try: + if not attr.tzinfo: + _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") + utc = attr.utctimetuple() + if utc.tm_year > 9999 or utc.tm_year < 1: + raise OverflowError("Hit max or min date") + + microseconds = str(attr.microsecond).rjust(6, "0").rstrip("0").ljust(3, "0") + if microseconds: + microseconds = "." + microseconds + date = "{:04}-{:02}-{:02}T{:02}:{:02}:{:02}".format( + utc.tm_year, utc.tm_mon, utc.tm_mday, utc.tm_hour, utc.tm_min, utc.tm_sec + ) + return date + microseconds + "Z" + except (ValueError, OverflowError) as err: + msg = "Unable to serialize datetime object." + raise SerializationError(msg) from err + except AttributeError as err: + msg = "ISO-8601 object must be valid Datetime object." + raise TypeError(msg) from err + + @staticmethod + def serialize_unix(attr, **kwargs): # pylint: disable=unused-argument + """Serialize Datetime object into IntTime format. + This is represented as seconds. + + :param Datetime attr: Object to be serialized. + :rtype: int + :raises SerializationError: if format invalid + :return: serialied unix + """ + if isinstance(attr, int): + return attr + try: + if not attr.tzinfo: + _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") + return int(calendar.timegm(attr.utctimetuple())) + except AttributeError as exc: + raise TypeError("Unix time object must be valid Datetime object.") from exc + + +def rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument + key = attr_desc["key"] + working_data = data + + while "." in key: + # Need the cast, as for some reasons "split" is typed as list[str | Any] + dict_keys = cast(list[str], _FLATTEN.split(key)) + if len(dict_keys) == 1: + key = _decode_attribute_map_key(dict_keys[0]) + break + working_key = _decode_attribute_map_key(dict_keys[0]) + working_data = working_data.get(working_key, data) + if working_data is None: + # If at any point while following flatten JSON path see None, it means + # that all properties under are None as well + return None + key = ".".join(dict_keys[1:]) + + return working_data.get(key) + + +def rest_key_case_insensitive_extractor( # pylint: disable=unused-argument, inconsistent-return-statements + attr, attr_desc, data +): + key = attr_desc["key"] + working_data = data + + while "." in key: + dict_keys = _FLATTEN.split(key) + if len(dict_keys) == 1: + key = _decode_attribute_map_key(dict_keys[0]) + break + working_key = _decode_attribute_map_key(dict_keys[0]) + working_data = attribute_key_case_insensitive_extractor(working_key, None, working_data) + if working_data is None: + # If at any point while following flatten JSON path see None, it means + # that all properties under are None as well + return None + key = ".".join(dict_keys[1:]) + + if working_data: + return attribute_key_case_insensitive_extractor(key, None, working_data) + + +def last_rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument + """Extract the attribute in "data" based on the last part of the JSON path key. + + :param str attr: The attribute to extract + :param dict attr_desc: The attribute description + :param dict data: The data to extract from + :rtype: object + :returns: The extracted attribute + """ + key = attr_desc["key"] + dict_keys = _FLATTEN.split(key) + return attribute_key_extractor(dict_keys[-1], None, data) + + +def last_rest_key_case_insensitive_extractor(attr, attr_desc, data): # pylint: disable=unused-argument + """Extract the attribute in "data" based on the last part of the JSON path key. + + This is the case insensitive version of "last_rest_key_extractor" + :param str attr: The attribute to extract + :param dict attr_desc: The attribute description + :param dict data: The data to extract from + :rtype: object + :returns: The extracted attribute + """ + key = attr_desc["key"] + dict_keys = _FLATTEN.split(key) + return attribute_key_case_insensitive_extractor(dict_keys[-1], None, data) + + +def attribute_key_extractor(attr, _, data): + return data.get(attr) + + +def attribute_key_case_insensitive_extractor(attr, _, data): + found_key = None + lower_attr = attr.lower() + for key in data: + if lower_attr == key.lower(): + found_key = key + break + + return data.get(found_key) + + +def _extract_name_from_internal_type(internal_type): + """Given an internal type XML description, extract correct XML name with namespace. + + :param dict internal_type: An model type + :rtype: tuple + :returns: A tuple XML name + namespace dict + """ + internal_type_xml_map = getattr(internal_type, "_xml_map", {}) + xml_name = internal_type_xml_map.get("name", internal_type.__name__) + xml_ns = internal_type_xml_map.get("ns", None) + if xml_ns: + xml_name = "{{{}}}{}".format(xml_ns, xml_name) + return xml_name + + +def xml_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument,too-many-return-statements + if isinstance(data, dict): + return None + + # Test if this model is XML ready first + if not isinstance(data, ET.Element): + return None + + xml_desc = attr_desc.get("xml", {}) + xml_name = xml_desc.get("name", attr_desc["key"]) + + # Look for a children + is_iter_type = attr_desc["type"].startswith("[") + is_wrapped = xml_desc.get("wrapped", False) + internal_type = attr_desc.get("internalType", None) + internal_type_xml_map = getattr(internal_type, "_xml_map", {}) + + # Integrate namespace if necessary + xml_ns = xml_desc.get("ns", internal_type_xml_map.get("ns", None)) + if xml_ns: + xml_name = "{{{}}}{}".format(xml_ns, xml_name) + + # If it's an attribute, that's simple + if xml_desc.get("attr", False): + return data.get(xml_name) + + # If it's x-ms-text, that's simple too + if xml_desc.get("text", False): + return data.text + + # Scenario where I take the local name: + # - Wrapped node + # - Internal type is an enum (considered basic types) + # - Internal type has no XML/Name node + if is_wrapped or (internal_type and (issubclass(internal_type, Enum) or "name" not in internal_type_xml_map)): + children = data.findall(xml_name) + # If internal type has a local name and it's not a list, I use that name + elif not is_iter_type and internal_type and "name" in internal_type_xml_map: + xml_name = _extract_name_from_internal_type(internal_type) + children = data.findall(xml_name) + # That's an array + else: + if internal_type: # Complex type, ignore itemsName and use the complex type name + items_name = _extract_name_from_internal_type(internal_type) + else: + items_name = xml_desc.get("itemsName", xml_name) + children = data.findall(items_name) + + if len(children) == 0: + if is_iter_type: + if is_wrapped: + return None # is_wrapped no node, we want None + return [] # not wrapped, assume empty list + return None # Assume it's not there, maybe an optional node. + + # If is_iter_type and not wrapped, return all found children + if is_iter_type: + if not is_wrapped: + return children + # Iter and wrapped, should have found one node only (the wrap one) + if len(children) != 1: + raise DeserializationError( + "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( + xml_name + ) + ) + return list(children[0]) # Might be empty list and that's ok. + + # Here it's not a itertype, we should have found one element only or empty + if len(children) > 1: + raise DeserializationError("Find several XML '{}' where it was not expected".format(xml_name)) + return children[0] + + +class Deserializer: + """Response object model deserializer. + + :param dict classes: Class type dictionary for deserializing complex types. + :ivar list key_extractors: Ordered list of extractors to be used by this deserializer. + """ + + basic_types = {str: "str", int: "int", bool: "bool", float: "float"} + + valid_date = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") + + def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: + self.deserialize_type = { + "iso-8601": Deserializer.deserialize_iso, + "rfc-1123": Deserializer.deserialize_rfc, + "unix-time": Deserializer.deserialize_unix, + "duration": Deserializer.deserialize_duration, + "date": Deserializer.deserialize_date, + "time": Deserializer.deserialize_time, + "decimal": Deserializer.deserialize_decimal, + "long": Deserializer.deserialize_long, + "bytearray": Deserializer.deserialize_bytearray, + "base64": Deserializer.deserialize_base64, + "object": self.deserialize_object, + "[]": self.deserialize_iter, + "{}": self.deserialize_dict, + } + self.deserialize_expected_types = { + "duration": (isodate.Duration, datetime.timedelta), + "iso-8601": (datetime.datetime), + } + self.dependencies: dict[str, type] = dict(classes) if classes else {} + self.key_extractors = [rest_key_extractor, xml_key_extractor] + # Additional properties only works if the "rest_key_extractor" is used to + # extract the keys. Making it to work whatever the key extractor is too much + # complicated, with no real scenario for now. + # So adding a flag to disable additional properties detection. This flag should be + # used if your expect the deserialization to NOT come from a JSON REST syntax. + # Otherwise, result are unexpected + self.additional_properties_detection = True + + def __call__(self, target_obj, response_data, content_type=None): + """Call the deserializer to process a REST response. + + :param str target_obj: Target data type to deserialize to. + :param requests.Response response_data: REST response object. + :param str content_type: Swagger "produces" if available. + :raises DeserializationError: if deserialization fails. + :return: Deserialized object. + :rtype: object + """ + data = self._unpack_content(response_data, content_type) + return self._deserialize(target_obj, data) + + def _deserialize(self, target_obj, data): # pylint: disable=inconsistent-return-statements + """Call the deserializer on a model. + + Data needs to be already deserialized as JSON or XML ElementTree + + :param str target_obj: Target data type to deserialize to. + :param object data: Object to deserialize. + :raises DeserializationError: if deserialization fails. + :return: Deserialized object. + :rtype: object + """ + # This is already a model, go recursive just in case + if hasattr(data, "_attribute_map"): + constants = [name for name, config in getattr(data, "_validation", {}).items() if config.get("constant")] + try: + for attr, mapconfig in data._attribute_map.items(): # pylint: disable=protected-access + if attr in constants: + continue + value = getattr(data, attr) + if value is None: + continue + local_type = mapconfig["type"] + internal_data_type = local_type.strip("[]{}") + if internal_data_type not in self.dependencies or isinstance(internal_data_type, Enum): + continue + setattr(data, attr, self._deserialize(local_type, value)) + return data + except AttributeError: + return + + response, class_name = self._classify_target(target_obj, data) + + if isinstance(response, str): + return self.deserialize_data(data, response) + if isinstance(response, type) and issubclass(response, Enum): + return self.deserialize_enum(data, response) + + if data is None or data is CoreNull: + return data + try: + attributes = response._attribute_map # type: ignore # pylint: disable=protected-access + d_attrs = {} + for attr, attr_desc in attributes.items(): + # Check empty string. If it's not empty, someone has a real "additionalProperties"... + if attr == "additional_properties" and attr_desc["key"] == "": + continue + raw_value = None + # Enhance attr_desc with some dynamic data + attr_desc = attr_desc.copy() # Do a copy, do not change the real one + internal_data_type = attr_desc["type"].strip("[]{}") + if internal_data_type in self.dependencies: + attr_desc["internalType"] = self.dependencies[internal_data_type] + + for key_extractor in self.key_extractors: + found_value = key_extractor(attr, attr_desc, data) + if found_value is not None: + if raw_value is not None and raw_value != found_value: + msg = ( + "Ignoring extracted value '%s' from %s for key '%s'" + " (duplicate extraction, follow extractors order)" + ) + _LOGGER.warning(msg, found_value, key_extractor, attr) + continue + raw_value = found_value + + value = self.deserialize_data(raw_value, attr_desc["type"]) + d_attrs[attr] = value + except (AttributeError, TypeError, KeyError) as err: + msg = "Unable to deserialize to object: " + class_name # type: ignore + raise DeserializationError(msg) from err + additional_properties = self._build_additional_properties(attributes, data) + return self._instantiate_model(response, d_attrs, additional_properties) + + def _build_additional_properties(self, attribute_map, data): + if not self.additional_properties_detection: + return None + if "additional_properties" in attribute_map and attribute_map.get("additional_properties", {}).get("key") != "": + # Check empty string. If it's not empty, someone has a real "additionalProperties" + return None + if isinstance(data, ET.Element): + data = {el.tag: el.text for el in data} + + known_keys = { + _decode_attribute_map_key(_FLATTEN.split(desc["key"])[0]) + for desc in attribute_map.values() + if desc["key"] != "" + } + present_keys = set(data.keys()) + missing_keys = present_keys - known_keys + return {key: data[key] for key in missing_keys} + + def _classify_target(self, target, data): + """Check to see whether the deserialization target object can + be classified into a subclass. + Once classification has been determined, initialize object. + + :param str target: The target object type to deserialize to. + :param str/dict data: The response data to deserialize. + :return: The classified target object and its class name. + :rtype: tuple + """ + if target is None: + return None, None + + if isinstance(target, str): + try: + target = self.dependencies[target] + except KeyError: + return target, target + + try: + target = target._classify(data, self.dependencies) # type: ignore # pylint: disable=protected-access + except AttributeError: + pass # Target is not a Model, no classify + return target, target.__class__.__name__ # type: ignore + + def failsafe_deserialize(self, target_obj, data, content_type=None): + """Ignores any errors encountered in deserialization, + and falls back to not deserializing the object. Recommended + for use in error deserialization, as we want to return the + HttpResponseError to users, and not have them deal with + a deserialization error. + + :param str target_obj: The target object type to deserialize to. + :param str/dict data: The response data to deserialize. + :param str content_type: Swagger "produces" if available. + :return: Deserialized object. + :rtype: object + """ + try: + return self(target_obj, data, content_type=content_type) + except: # pylint: disable=bare-except + _LOGGER.debug( + "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True + ) + return None + + @staticmethod + def _unpack_content(raw_data, content_type=None): + """Extract the correct structure for deserialization. + + If raw_data is a PipelineResponse, try to extract the result of RawDeserializer. + if we can't, raise. Your Pipeline should have a RawDeserializer. + + If not a pipeline response and raw_data is bytes or string, use content-type + to decode it. If no content-type, try JSON. + + If raw_data is something else, bypass all logic and return it directly. + + :param obj raw_data: Data to be processed. + :param str content_type: How to parse if raw_data is a string/bytes. + :raises JSONDecodeError: If JSON is requested and parsing is impossible. + :raises UnicodeDecodeError: If bytes is not UTF8 + :rtype: object + :return: Unpacked content. + """ + # Assume this is enough to detect a Pipeline Response without importing it + context = getattr(raw_data, "context", {}) + if context: + if RawDeserializer.CONTEXT_NAME in context: + return context[RawDeserializer.CONTEXT_NAME] + raise ValueError("This pipeline didn't have the RawDeserializer policy; can't deserialize") + + # Assume this is enough to recognize universal_http.ClientResponse without importing it + if hasattr(raw_data, "body"): + return RawDeserializer.deserialize_from_http_generics(raw_data.text(), raw_data.headers) + + # Assume this enough to recognize requests.Response without importing it. + if hasattr(raw_data, "_content_consumed"): + return RawDeserializer.deserialize_from_http_generics(raw_data.text, raw_data.headers) + + if isinstance(raw_data, (str, bytes)) or hasattr(raw_data, "read"): + return RawDeserializer.deserialize_from_text(raw_data, content_type) # type: ignore + return raw_data + + def _instantiate_model(self, response, attrs, additional_properties=None): + """Instantiate a response model passing in deserialized args. + + :param Response response: The response model class. + :param dict attrs: The deserialized response attributes. + :param dict additional_properties: Additional properties to be set. + :rtype: Response + :return: The instantiated response model. + """ + if callable(response): + subtype = getattr(response, "_subtype_map", {}) + try: + readonly = [ + k + for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore + if v.get("readonly") + ] + const = [ + k + for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore + if v.get("constant") + ] + kwargs = {k: v for k, v in attrs.items() if k not in subtype and k not in readonly + const} + response_obj = response(**kwargs) + for attr in readonly: + setattr(response_obj, attr, attrs.get(attr)) + if additional_properties: + response_obj.additional_properties = additional_properties # type: ignore + return response_obj + except TypeError as err: + msg = "Unable to deserialize {} into model {}. ".format(kwargs, response) # type: ignore + raise DeserializationError(msg + str(err)) from err + else: + try: + for attr, value in attrs.items(): + setattr(response, attr, value) + return response + except Exception as exp: + msg = "Unable to populate response model. " + msg += "Type: {}, Error: {}".format(type(response), exp) + raise DeserializationError(msg) from exp + + def deserialize_data(self, data, data_type): # pylint: disable=too-many-return-statements + """Process data for deserialization according to data type. + + :param str data: The response string to be deserialized. + :param str data_type: The type to deserialize to. + :raises DeserializationError: if deserialization fails. + :return: Deserialized object. + :rtype: object + """ + if data is None: + return data + + try: + if not data_type: + return data + if data_type in self.basic_types.values(): + return self.deserialize_basic(data, data_type) + if data_type in self.deserialize_type: + if isinstance(data, self.deserialize_expected_types.get(data_type, tuple())): + return data + + is_a_text_parsing_type = lambda x: x not in [ # pylint: disable=unnecessary-lambda-assignment + "object", + "[]", + r"{}", + ] + if isinstance(data, ET.Element) and is_a_text_parsing_type(data_type) and not data.text: + return None + data_val = self.deserialize_type[data_type](data) + return data_val + + iter_type = data_type[0] + data_type[-1] + if iter_type in self.deserialize_type: + return self.deserialize_type[iter_type](data, data_type[1:-1]) + + obj_type = self.dependencies[data_type] + if issubclass(obj_type, Enum): + if isinstance(data, ET.Element): + data = data.text + return self.deserialize_enum(data, obj_type) + + except (ValueError, TypeError, AttributeError) as err: + msg = "Unable to deserialize response data." + msg += " Data: {}, {}".format(data, data_type) + raise DeserializationError(msg) from err + return self._deserialize(obj_type, data) + + def deserialize_iter(self, attr, iter_type): + """Deserialize an iterable. + + :param list attr: Iterable to be deserialized. + :param str iter_type: The type of object in the iterable. + :return: Deserialized iterable. + :rtype: list + """ + if attr is None: + return None + if isinstance(attr, ET.Element): # If I receive an element here, get the children + attr = list(attr) + if not isinstance(attr, (list, set)): + raise DeserializationError("Cannot deserialize as [{}] an object of type {}".format(iter_type, type(attr))) + return [self.deserialize_data(a, iter_type) for a in attr] + + def deserialize_dict(self, attr, dict_type): + """Deserialize a dictionary. + + :param dict/list attr: Dictionary to be deserialized. Also accepts + a list of key, value pairs. + :param str dict_type: The object type of the items in the dictionary. + :return: Deserialized dictionary. + :rtype: dict + """ + if isinstance(attr, list): + return {x["key"]: self.deserialize_data(x["value"], dict_type) for x in attr} + + if isinstance(attr, ET.Element): + # Transform value into {"Key": "value"} + attr = {el.tag: el.text for el in attr} + return {k: self.deserialize_data(v, dict_type) for k, v in attr.items()} + + def deserialize_object(self, attr, **kwargs): # pylint: disable=too-many-return-statements + """Deserialize a generic object. + This will be handled as a dictionary. + + :param dict attr: Dictionary to be deserialized. + :return: Deserialized object. + :rtype: dict + :raises TypeError: if non-builtin datatype encountered. + """ + if attr is None: + return None + if isinstance(attr, ET.Element): + # Do no recurse on XML, just return the tree as-is + return attr + if isinstance(attr, str): + return self.deserialize_basic(attr, "str") + obj_type = type(attr) + if obj_type in self.basic_types: + return self.deserialize_basic(attr, self.basic_types[obj_type]) + if obj_type is _long_type: + return self.deserialize_long(attr) + + if obj_type == dict: + deserialized = {} + for key, value in attr.items(): + try: + deserialized[key] = self.deserialize_object(value, **kwargs) + except ValueError: + deserialized[key] = None + return deserialized + + if obj_type == list: + deserialized = [] + for obj in attr: + try: + deserialized.append(self.deserialize_object(obj, **kwargs)) + except ValueError: + pass + return deserialized + + error = "Cannot deserialize generic object with type: " + raise TypeError(error + str(obj_type)) + + def deserialize_basic(self, attr, data_type): # pylint: disable=too-many-return-statements + """Deserialize basic builtin data type from string. + Will attempt to convert to str, int, float and bool. + This function will also accept '1', '0', 'true' and 'false' as + valid bool values. + + :param str attr: response string to be deserialized. + :param str data_type: deserialization data type. + :return: Deserialized basic type. + :rtype: str, int, float or bool + :raises TypeError: if string format is not valid or data_type is not one of str, int, float, bool. + """ + # If we're here, data is supposed to be a basic type. + # If it's still an XML node, take the text + if isinstance(attr, ET.Element): + attr = attr.text + if not attr: + if data_type == "str": + # None or '', node is empty string. + return "" + # None or '', node with a strong type is None. + # Don't try to model "empty bool" or "empty int" + return None + + if data_type == "bool": + if attr in [True, False, 1, 0]: + return bool(attr) + if isinstance(attr, str): + if attr.lower() in ["true", "1"]: + return True + if attr.lower() in ["false", "0"]: + return False + raise TypeError("Invalid boolean value: {}".format(attr)) + + if data_type == "str": + return self.deserialize_unicode(attr) + if data_type == "int": + return int(attr) + if data_type == "float": + return float(attr) + raise TypeError("Unknown basic data type: {}".format(data_type)) + + @staticmethod + def deserialize_unicode(data): + """Preserve unicode objects in Python 2, otherwise return data + as a string. + + :param str data: response string to be deserialized. + :return: Deserialized string. + :rtype: str or unicode + """ + # We might be here because we have an enum modeled as string, + # and we try to deserialize a partial dict with enum inside + if isinstance(data, Enum): + return data + + # Consider this is real string + try: + if isinstance(data, unicode): # type: ignore + return data + except NameError: + return str(data) + return str(data) + + @staticmethod + def deserialize_enum(data, enum_obj): + """Deserialize string into enum object. + + If the string is not a valid enum value it will be returned as-is + and a warning will be logged. + + :param str data: Response string to be deserialized. If this value is + None or invalid it will be returned as-is. + :param Enum enum_obj: Enum object to deserialize to. + :return: Deserialized enum object. + :rtype: Enum + """ + if isinstance(data, enum_obj) or data is None: + return data + if isinstance(data, Enum): + data = data.value + if isinstance(data, int): + # Workaround. We might consider remove it in the future. + try: + return list(enum_obj.__members__.values())[data] + except IndexError as exc: + error = "{!r} is not a valid index for enum {!r}" + raise DeserializationError(error.format(data, enum_obj)) from exc + try: + return enum_obj(str(data)) + except ValueError: + for enum_value in enum_obj: + if enum_value.value.lower() == str(data).lower(): + return enum_value + # We don't fail anymore for unknown value, we deserialize as a string + _LOGGER.warning("Deserializer is not able to find %s as valid enum in %s", data, enum_obj) + return Deserializer.deserialize_unicode(data) + + @staticmethod + def deserialize_bytearray(attr): + """Deserialize string into bytearray. + + :param str attr: response string to be deserialized. + :return: Deserialized bytearray + :rtype: bytearray + :raises TypeError: if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + return bytearray(b64decode(attr)) # type: ignore + + @staticmethod + def deserialize_base64(attr): + """Deserialize base64 encoded string into string. + + :param str attr: response string to be deserialized. + :return: Deserialized base64 string + :rtype: bytearray + :raises TypeError: if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + padding = "=" * (3 - (len(attr) + 3) % 4) # type: ignore + attr = attr + padding # type: ignore + encoded = attr.replace("-", "+").replace("_", "/") + return b64decode(encoded) + + @staticmethod + def deserialize_decimal(attr): + """Deserialize string into Decimal object. + + :param str attr: response string to be deserialized. + :return: Deserialized decimal + :raises DeserializationError: if string format invalid. + :rtype: decimal + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + return decimal.Decimal(str(attr)) # type: ignore + except decimal.DecimalException as err: + msg = "Invalid decimal {}".format(attr) + raise DeserializationError(msg) from err + + @staticmethod + def deserialize_long(attr): + """Deserialize string into long (Py2) or int (Py3). + + :param str attr: response string to be deserialized. + :return: Deserialized int + :rtype: long or int + :raises ValueError: if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + return _long_type(attr) # type: ignore + + @staticmethod + def deserialize_duration(attr): + """Deserialize ISO-8601 formatted string into TimeDelta object. + + :param str attr: response string to be deserialized. + :return: Deserialized duration + :rtype: TimeDelta + :raises DeserializationError: if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + duration = isodate.parse_duration(attr) + except (ValueError, OverflowError, AttributeError) as err: + msg = "Cannot deserialize duration object." + raise DeserializationError(msg) from err + return duration + + @staticmethod + def deserialize_date(attr): + """Deserialize ISO-8601 formatted string into Date object. + + :param str attr: response string to be deserialized. + :return: Deserialized date + :rtype: Date + :raises DeserializationError: if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + if re.search(r"[^\W\d_]", attr, re.I + re.U): # type: ignore + raise DeserializationError("Date must have only digits and -. Received: %s" % attr) + # This must NOT use defaultmonth/defaultday. Using None ensure this raises an exception. + return isodate.parse_date(attr, defaultmonth=0, defaultday=0) + + @staticmethod + def deserialize_time(attr): + """Deserialize ISO-8601 formatted string into time object. + + :param str attr: response string to be deserialized. + :return: Deserialized time + :rtype: datetime.time + :raises DeserializationError: if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + if re.search(r"[^\W\d_]", attr, re.I + re.U): # type: ignore + raise DeserializationError("Date must have only digits and -. Received: %s" % attr) + return isodate.parse_time(attr) + + @staticmethod + def deserialize_rfc(attr): + """Deserialize RFC-1123 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :return: Deserialized RFC datetime + :rtype: Datetime + :raises DeserializationError: if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + parsed_date = email.utils.parsedate_tz(attr) # type: ignore + date_obj = datetime.datetime( + *parsed_date[:6], tzinfo=datetime.timezone(datetime.timedelta(minutes=(parsed_date[9] or 0) / 60)) + ) + if not date_obj.tzinfo: + date_obj = date_obj.astimezone(tz=TZ_UTC) + except ValueError as err: + msg = "Cannot deserialize to rfc datetime object." + raise DeserializationError(msg) from err + return date_obj + + @staticmethod + def deserialize_iso(attr): + """Deserialize ISO-8601 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :return: Deserialized ISO datetime + :rtype: Datetime + :raises DeserializationError: if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + attr = attr.upper() # type: ignore + match = Deserializer.valid_date.match(attr) + if not match: + raise ValueError("Invalid datetime string: " + attr) + + check_decimal = attr.split(".") + if len(check_decimal) > 1: + decimal_str = "" + for digit in check_decimal[1]: + if digit.isdigit(): + decimal_str += digit + else: + break + if len(decimal_str) > 6: + attr = attr.replace(decimal_str, decimal_str[0:6]) + + date_obj = isodate.parse_datetime(attr) + test_utc = date_obj.utctimetuple() + if test_utc.tm_year > 9999 or test_utc.tm_year < 1: + raise OverflowError("Hit max or min date") + except (ValueError, OverflowError, AttributeError) as err: + msg = "Cannot deserialize datetime object." + raise DeserializationError(msg) from err + return date_obj + + @staticmethod + def deserialize_unix(attr): + """Serialize Datetime object into IntTime format. + This is represented as seconds. + + :param int attr: Object to be serialized. + :return: Deserialized datetime + :rtype: Datetime + :raises DeserializationError: if format invalid + """ + if isinstance(attr, ET.Element): + attr = int(attr.text) # type: ignore + try: + attr = int(attr) + date_obj = datetime.datetime.fromtimestamp(attr, TZ_UTC) + except ValueError as err: + msg = "Cannot deserialize to unix datetime object." + raise DeserializationError(msg) from err + return date_obj diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/aio/__init__.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/aio/__init__.py new file mode 100644 index 00000000000..42a0aa5c247 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/aio/__init__.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.8, generator: @autorest/python@6.49.1) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position + +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._client import ContainerRegistryManagementClient # type: ignore + +try: + from ._patch import __all__ as _patch_all + from ._patch import * +except ImportError: + _patch_all = [] +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "ContainerRegistryManagementClient", +] +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore + +_patch_sdk() diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/aio/_client.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/aio/_client.py new file mode 100644 index 00000000000..2ac593f503f --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/aio/_client.py @@ -0,0 +1,190 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.8, generator: @autorest/python@6.49.1) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from copy import deepcopy +from typing import Any, Awaitable, TYPE_CHECKING +from typing_extensions import Self + +from azure.core import AsyncPipelineClient +from azure.core.pipeline import policies +from azure.core.rest import AsyncHttpResponse, HttpRequest + +from .. import models as _models +from .._utils.serialization import Deserializer, Serializer +from ._configuration import ContainerRegistryManagementClientConfiguration +from .operations import ( + ArchiveVersionsOperations, + ArchivesOperations, + CacheRulesOperations, + ConnectedRegistriesOperations, + CredentialSetsOperations, + ExportPipelinesOperations, + ImportPipelinesOperations, + Operations, + PipelineRunsOperations, + PrivateEndpointConnectionsOperations, + RegistriesOperations, + ReplicationsOperations, + ScopeMapsOperations, + TokensOperations, + WebhooksOperations, +) + +if TYPE_CHECKING: + from azure.core.credentials_async import AsyncTokenCredential + + +class ContainerRegistryManagementClient: # pylint: disable=too-many-instance-attributes + """The Microsoft Azure Container Registry management API provides create, read, update, and delete + functionality for Azure Container Registry resources including registries, replications, + webhooks, tasks, runs, and other registry components. + + :ivar operations: Operations operations + :vartype operations: container_registry_management_client.aio.operations.Operations + :ivar registries: RegistriesOperations operations + :vartype registries: container_registry_management_client.aio.operations.RegistriesOperations + :ivar cache_rules: CacheRulesOperations operations + :vartype cache_rules: container_registry_management_client.aio.operations.CacheRulesOperations + :ivar connected_registries: ConnectedRegistriesOperations operations + :vartype connected_registries: + container_registry_management_client.aio.operations.ConnectedRegistriesOperations + :ivar credential_sets: CredentialSetsOperations operations + :vartype credential_sets: + container_registry_management_client.aio.operations.CredentialSetsOperations + :ivar export_pipelines: ExportPipelinesOperations operations + :vartype export_pipelines: + container_registry_management_client.aio.operations.ExportPipelinesOperations + :ivar import_pipelines: ImportPipelinesOperations operations + :vartype import_pipelines: + container_registry_management_client.aio.operations.ImportPipelinesOperations + :ivar archives: ArchivesOperations operations + :vartype archives: container_registry_management_client.aio.operations.ArchivesOperations + :ivar archive_versions: ArchiveVersionsOperations operations + :vartype archive_versions: + container_registry_management_client.aio.operations.ArchiveVersionsOperations + :ivar pipeline_runs: PipelineRunsOperations operations + :vartype pipeline_runs: + container_registry_management_client.aio.operations.PipelineRunsOperations + :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations + :vartype private_endpoint_connections: + container_registry_management_client.aio.operations.PrivateEndpointConnectionsOperations + :ivar replications: ReplicationsOperations operations + :vartype replications: + container_registry_management_client.aio.operations.ReplicationsOperations + :ivar scope_maps: ScopeMapsOperations operations + :vartype scope_maps: container_registry_management_client.aio.operations.ScopeMapsOperations + :ivar tokens: TokensOperations operations + :vartype tokens: container_registry_management_client.aio.operations.TokensOperations + :ivar webhooks: WebhooksOperations operations + :vartype webhooks: container_registry_management_client.aio.operations.WebhooksOperations + :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. + :type subscription_id: str + :param credential: Credential needed for the client to connect to Azure. Required. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :keyword endpoint: Service URL. Default value is "https://management.azure.com". + :paramtype endpoint: str + :keyword api_version: Api Version. Default value is "2026-01-01-preview". Note that overriding + this default value may result in unsupported behavior. + :paramtype api_version: str + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + """ + + def __init__( + self, + subscription_id: str, + credential: "AsyncTokenCredential", + *, + endpoint: str = "https://management.azure.com", + **kwargs: Any + ) -> None: + self._config = ContainerRegistryManagementClientConfiguration( + subscription_id=subscription_id, credential=credential, **kwargs + ) + + _policies = kwargs.pop("policies", None) + if _policies is None: + _policies = [ + policies.RequestIdPolicy(**kwargs), + self._config.headers_policy, + self._config.user_agent_policy, + self._config.proxy_policy, + policies.ContentDecodePolicy(**kwargs), + self._config.redirect_policy, + self._config.retry_policy, + self._config.authentication_policy, + self._config.custom_hook_policy, + self._config.logging_policy, + policies.DistributedTracingPolicy(**kwargs), + policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, + self._config.http_logging_policy, + ] + self._client: AsyncPipelineClient = AsyncPipelineClient(base_url=endpoint, policies=_policies, **kwargs) + + client_models = {k: v for k, v in _models._models.__dict__.items() if isinstance(v, type)} + client_models |= {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + self._serialize.client_side_validation = False + self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) + self.registries = RegistriesOperations(self._client, self._config, self._serialize, self._deserialize) + self.cache_rules = CacheRulesOperations(self._client, self._config, self._serialize, self._deserialize) + self.connected_registries = ConnectedRegistriesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.credential_sets = CredentialSetsOperations(self._client, self._config, self._serialize, self._deserialize) + self.export_pipelines = ExportPipelinesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.import_pipelines = ImportPipelinesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.archives = ArchivesOperations(self._client, self._config, self._serialize, self._deserialize) + self.archive_versions = ArchiveVersionsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.pipeline_runs = PipelineRunsOperations(self._client, self._config, self._serialize, self._deserialize) + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.replications = ReplicationsOperations(self._client, self._config, self._serialize, self._deserialize) + self.scope_maps = ScopeMapsOperations(self._client, self._config, self._serialize, self._deserialize) + self.tokens = TokensOperations(self._client, self._config, self._serialize, self._deserialize) + self.webhooks = WebhooksOperations(self._client, self._config, self._serialize, self._deserialize) + + def send_request( + self, request: HttpRequest, *, stream: bool = False, **kwargs: Any + ) -> Awaitable[AsyncHttpResponse]: + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = await client.send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.AsyncHttpResponse + """ + + request_copy = deepcopy(request) + request_copy.url = self._client.format_url(request_copy.url) + return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> Self: + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details: Any) -> None: + await self._client.__aexit__(*exc_details) diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/aio/_configuration.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/aio/_configuration.py new file mode 100644 index 00000000000..29164b10190 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/aio/_configuration.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.8, generator: @autorest/python@6.49.1) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core.pipeline import policies + +if TYPE_CHECKING: + from azure.core.credentials_async import AsyncTokenCredential + +VERSION = "unknown" + + +class ContainerRegistryManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long + """Configuration for ContainerRegistryManagementClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. + :type subscription_id: str + :param credential: Credential needed for the client to connect to Azure. Required. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :keyword api_version: Api Version. Default value is "2026-01-01-preview". Note that overriding + this default value may result in unsupported behavior. + :paramtype api_version: str + """ + + def __init__(self, subscription_id: str, credential: "AsyncTokenCredential", **kwargs: Any) -> None: + api_version: str = kwargs.pop("api_version", "2026-01-01-preview") + + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + + self.subscription_id = subscription_id + self.credential = credential + self.api_version = api_version + self.credential_scopes = kwargs.pop("credential_scopes", ["user_impersonation"]) + kwargs.setdefault("sdk_moniker", "containerregistrymanagementclient/{}".format(VERSION)) + self.polling_interval = kwargs.get("polling_interval", 30) + self._configure(**kwargs) + + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/aio/_patch.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/aio/_patch.py new file mode 100644 index 00000000000..87676c65a8f --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/aio/_patch.py @@ -0,0 +1,21 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" + + +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/aio/operations/__init__.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/aio/operations/__init__.py new file mode 100644 index 00000000000..de865704f5c --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/aio/operations/__init__.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.8, generator: @autorest/python@6.49.1) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position + +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import Operations # type: ignore +from ._operations import RegistriesOperations # type: ignore +from ._operations import CacheRulesOperations # type: ignore +from ._operations import ConnectedRegistriesOperations # type: ignore +from ._operations import CredentialSetsOperations # type: ignore +from ._operations import ExportPipelinesOperations # type: ignore +from ._operations import ImportPipelinesOperations # type: ignore +from ._operations import ArchivesOperations # type: ignore +from ._operations import ArchiveVersionsOperations # type: ignore +from ._operations import PipelineRunsOperations # type: ignore +from ._operations import PrivateEndpointConnectionsOperations # type: ignore +from ._operations import ReplicationsOperations # type: ignore +from ._operations import ScopeMapsOperations # type: ignore +from ._operations import TokensOperations # type: ignore +from ._operations import WebhooksOperations # type: ignore + +from ._patch import __all__ as _patch_all +from ._patch import * +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "Operations", + "RegistriesOperations", + "CacheRulesOperations", + "ConnectedRegistriesOperations", + "CredentialSetsOperations", + "ExportPipelinesOperations", + "ImportPipelinesOperations", + "ArchivesOperations", + "ArchiveVersionsOperations", + "PipelineRunsOperations", + "PrivateEndpointConnectionsOperations", + "ReplicationsOperations", + "ScopeMapsOperations", + "TokensOperations", + "WebhooksOperations", +] +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore +_patch_sdk() diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/aio/operations/_operations.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/aio/operations/_operations.py new file mode 100644 index 00000000000..35e6619ba8d --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/aio/operations/_operations.py @@ -0,0 +1,10536 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.8, generator: @autorest/python@6.49.1) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from collections.abc import MutableMapping +from io import IOBase +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload +import urllib.parse + +from azure.core import AsyncPipelineClient +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.polling.async_base_polling import AsyncLROBasePolling +from azure.core.rest import AsyncHttpResponse, HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict + +from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer +from ...operations._operations import ( + build_archive_versions_create_request, + build_archive_versions_delete_request, + build_archive_versions_get_request, + build_archive_versions_list_request, + build_archives_create_request, + build_archives_delete_request, + build_archives_get_request, + build_archives_list_request, + build_archives_update_request, + build_cache_rules_create_request, + build_cache_rules_delete_request, + build_cache_rules_get_request, + build_cache_rules_list_request, + build_cache_rules_update_request, + build_connected_registries_create_request, + build_connected_registries_deactivate_request, + build_connected_registries_delete_request, + build_connected_registries_get_request, + build_connected_registries_list_request, + build_connected_registries_resync_request, + build_connected_registries_update_request, + build_credential_sets_create_request, + build_credential_sets_delete_request, + build_credential_sets_get_request, + build_credential_sets_list_request, + build_credential_sets_update_request, + build_export_pipelines_create_request, + build_export_pipelines_delete_request, + build_export_pipelines_get_request, + build_export_pipelines_list_request, + build_import_pipelines_create_request, + build_import_pipelines_delete_request, + build_import_pipelines_get_request, + build_import_pipelines_list_request, + build_operations_list_request, + build_pipeline_runs_create_request, + build_pipeline_runs_delete_request, + build_pipeline_runs_get_request, + build_pipeline_runs_list_request, + build_private_endpoint_connections_create_or_update_request, + build_private_endpoint_connections_delete_request, + build_private_endpoint_connections_get_request, + build_private_endpoint_connections_list_request, + build_registries_check_name_availability_request, + build_registries_create_request, + build_registries_delete_request, + build_registries_generate_credentials_request, + build_registries_get_private_link_resource_request, + build_registries_get_request, + build_registries_import_image_request, + build_registries_list_by_resource_group_request, + build_registries_list_credentials_request, + build_registries_list_private_link_resources_request, + build_registries_list_request, + build_registries_list_usages_request, + build_registries_regenerate_credential_request, + build_registries_update_request, + build_replications_create_request, + build_replications_delete_request, + build_replications_get_request, + build_replications_list_request, + build_replications_update_request, + build_scope_maps_create_request, + build_scope_maps_delete_request, + build_scope_maps_get_request, + build_scope_maps_list_request, + build_scope_maps_update_request, + build_tokens_create_request, + build_tokens_delete_request, + build_tokens_get_request, + build_tokens_list_request, + build_tokens_update_request, + build_webhooks_create_request, + build_webhooks_delete_request, + build_webhooks_get_callback_config_request, + build_webhooks_get_request, + build_webhooks_list_events_request, + build_webhooks_list_request, + build_webhooks_ping_request, + build_webhooks_update_request, +) +from .._configuration import ContainerRegistryManagementClientConfiguration + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list + + +class Operations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~container_registry_management_client.aio.ContainerRegistryManagementClient`'s + :attr:`operations` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerRegistryManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, **kwargs: Any) -> AsyncItemPaged["_models.OperationDefinition"]: + """List the operations for the provider. + + :return: An iterator like instance of OperationDefinition + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~container_registry_management_client.models.OperationDefinition] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models._models.OperationListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_operations_list_request( + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + + return _request + + async def extract_data(pipeline_response): + deserialized = self._deserialize( + _models._models.OperationListResult, pipeline_response # pylint: disable=protected-access + ) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class RegistriesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~container_registry_management_client.aio.ContainerRegistryManagementClient`'s + :attr:`registries` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerRegistryManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @overload + async def check_name_availability( + self, + registry_name_check_request: _models.RegistryNameCheckRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.RegistryNameStatus: + """Checks whether the container registry name is available for use. The name must contain only + alphanumeric characters, be globally unique, and between 5 and 50 characters in length. + + :param registry_name_check_request: The request body. Required. + :type registry_name_check_request: + ~container_registry_management_client.models.RegistryNameCheckRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: RegistryNameStatus + :rtype: ~container_registry_management_client.models.RegistryNameStatus + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def check_name_availability( + self, registry_name_check_request: IO[bytes], *, content_type: str = "application/json", **kwargs: Any + ) -> _models.RegistryNameStatus: + """Checks whether the container registry name is available for use. The name must contain only + alphanumeric characters, be globally unique, and between 5 and 50 characters in length. + + :param registry_name_check_request: The request body. Required. + :type registry_name_check_request: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: RegistryNameStatus + :rtype: ~container_registry_management_client.models.RegistryNameStatus + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def check_name_availability( + self, registry_name_check_request: Union[_models.RegistryNameCheckRequest, IO[bytes]], **kwargs: Any + ) -> _models.RegistryNameStatus: + """Checks whether the container registry name is available for use. The name must contain only + alphanumeric characters, be globally unique, and between 5 and 50 characters in length. + + :param registry_name_check_request: The request body. Is either a RegistryNameCheckRequest type + or a IO[bytes] type. Required. + :type registry_name_check_request: + ~container_registry_management_client.models.RegistryNameCheckRequest or IO[bytes] + :return: RegistryNameStatus + :rtype: ~container_registry_management_client.models.RegistryNameStatus + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.RegistryNameStatus] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(registry_name_check_request, (IOBase, bytes)): + _content = registry_name_check_request + else: + _json = self._serialize.body(registry_name_check_request, "RegistryNameCheckRequest") + + _request = build_registries_check_name_availability_request( + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("RegistryNameStatus", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list(self, **kwargs: Any) -> AsyncItemPaged["_models.Registry"]: + """Lists all the container registries under the specified subscription. + + :return: An iterator like instance of Registry + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~container_registry_management_client.models.Registry] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models._models.RegistryListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_registries_list_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + + return _request + + async def extract_data(pipeline_response): + deserialized = self._deserialize( + _models._models.RegistryListResult, pipeline_response # pylint: disable=protected-access + ) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> AsyncItemPaged["_models.Registry"]: + """Lists all the container registries under the specified resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of Registry + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~container_registry_management_client.models.Registry] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models._models.RegistryListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_registries_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + + return _request + + async def extract_data(pipeline_response): + deserialized = self._deserialize( + _models._models.RegistryListResult, pipeline_response # pylint: disable=protected-access + ) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def get(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> _models.Registry: + """Gets the properties of the specified container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :return: Registry + :rtype: ~container_registry_management_client.models.Registry + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Registry] = kwargs.pop("cls", None) + + _request = build_registries_get_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("Registry", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_initial( + self, resource_group_name: str, registry_name: str, registry: Union[_models.Registry, IO[bytes]], **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(registry, (IOBase, bytes)): + _content = registry + else: + _json = self._serialize.body(registry, "Registry") + + _request = build_registries_create_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + registry_name: str, + registry: _models.Registry, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Registry]: + """Creates a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param registry: The parameters for creating a container registry. Required. + :type registry: ~container_registry_management_client.models.Registry + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Registry + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Registry] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + registry_name: str, + registry: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Registry]: + """Creates a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param registry: The parameters for creating a container registry. Required. + :type registry: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Registry + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Registry] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create( + self, resource_group_name: str, registry_name: str, registry: Union[_models.Registry, IO[bytes]], **kwargs: Any + ) -> AsyncLROPoller[_models.Registry]: + """Creates a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param registry: The parameters for creating a container registry. Is either a Registry type or + a IO[bytes] type. Required. + :type registry: ~container_registry_management_client.models.Registry or IO[bytes] + :return: An instance of AsyncLROPoller that returns Registry + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Registry] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Registry] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + registry=registry, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("Registry", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.Registry].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.Registry]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + registry_name: str, + registry_update_parameters: Union[_models.RegistryUpdateParameters, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(registry_update_parameters, (IOBase, bytes)): + _content = registry_update_parameters + else: + _json = self._serialize.body(registry_update_parameters, "RegistryUpdateParameters") + + _request = build_registries_update_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + registry_name: str, + registry_update_parameters: _models.RegistryUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Registry]: + """Updates a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param registry_update_parameters: The parameters for updating a container registry. Required. + :type registry_update_parameters: + ~container_registry_management_client.models.RegistryUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Registry + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Registry] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + registry_name: str, + registry_update_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Registry]: + """Updates a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param registry_update_parameters: The parameters for updating a container registry. Required. + :type registry_update_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Registry + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Registry] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + registry_name: str, + registry_update_parameters: Union[_models.RegistryUpdateParameters, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.Registry]: + """Updates a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param registry_update_parameters: The parameters for updating a container registry. Is either + a RegistryUpdateParameters type or a IO[bytes] type. Required. + :type registry_update_parameters: + ~container_registry_management_client.models.RegistryUpdateParameters or IO[bytes] + :return: An instance of AsyncLROPoller that returns Registry + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Registry] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Registry] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + registry_update_parameters=registry_update_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("Registry", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.Registry].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.Registry]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, registry_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_registries_delete_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> AsyncLROPoller[None]: + """Deletes a container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + async def _generate_credentials_initial( + self, + resource_group_name: str, + registry_name: str, + generate_credentials_parameters: Union[_models.GenerateCredentialsParameters, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(generate_credentials_parameters, (IOBase, bytes)): + _content = generate_credentials_parameters + else: + _json = self._serialize.body(generate_credentials_parameters, "GenerateCredentialsParameters") + + _request = build_registries_generate_credentials_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_generate_credentials( + self, + resource_group_name: str, + registry_name: str, + generate_credentials_parameters: _models.GenerateCredentialsParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.GenerateCredentialsResult]: + """Generate keys for a token of a specified container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param generate_credentials_parameters: The parameters for generating credentials. Required. + :type generate_credentials_parameters: + ~container_registry_management_client.models.GenerateCredentialsParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns GenerateCredentialsResult + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.GenerateCredentialsResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_generate_credentials( + self, + resource_group_name: str, + registry_name: str, + generate_credentials_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.GenerateCredentialsResult]: + """Generate keys for a token of a specified container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param generate_credentials_parameters: The parameters for generating credentials. Required. + :type generate_credentials_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns GenerateCredentialsResult + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.GenerateCredentialsResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_generate_credentials( + self, + resource_group_name: str, + registry_name: str, + generate_credentials_parameters: Union[_models.GenerateCredentialsParameters, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.GenerateCredentialsResult]: + """Generate keys for a token of a specified container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param generate_credentials_parameters: The parameters for generating credentials. Is either a + GenerateCredentialsParameters type or a IO[bytes] type. Required. + :type generate_credentials_parameters: + ~container_registry_management_client.models.GenerateCredentialsParameters or IO[bytes] + :return: An instance of AsyncLROPoller that returns GenerateCredentialsResult + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.GenerateCredentialsResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.GenerateCredentialsResult] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._generate_credentials_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + generate_credentials_parameters=generate_credentials_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("GenerateCredentialsResult", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.GenerateCredentialsResult].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.GenerateCredentialsResult]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _import_image_initial( + self, + resource_group_name: str, + registry_name: str, + parameters: Union[_models.ImportImageParameters, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "ImportImageParameters") + + _request = build_registries_import_image_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_import_image( + self, + resource_group_name: str, + registry_name: str, + parameters: _models.ImportImageParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Copies an image to this container registry from the specified container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param parameters: The parameters specifying the image to copy and the source container + registry. Required. + :type parameters: ~container_registry_management_client.models.ImportImageParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_import_image( + self, + resource_group_name: str, + registry_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Copies an image to this container registry from the specified container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param parameters: The parameters specifying the image to copy and the source container + registry. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_import_image( + self, + resource_group_name: str, + registry_name: str, + parameters: Union[_models.ImportImageParameters, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Copies an image to this container registry from the specified container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param parameters: The parameters specifying the image to copy and the source container + registry. Is either a ImportImageParameters type or a IO[bytes] type. Required. + :type parameters: ~container_registry_management_client.models.ImportImageParameters or + IO[bytes] + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._import_image_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace_async + async def list_credentials( + self, resource_group_name: str, registry_name: str, **kwargs: Any + ) -> _models.RegistryListCredentialsResult: + """Lists the login credentials for the specified container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :return: RegistryListCredentialsResult + :rtype: ~container_registry_management_client.models.RegistryListCredentialsResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.RegistryListCredentialsResult] = kwargs.pop("cls", None) + + _request = build_registries_list_credentials_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("RegistryListCredentialsResult", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def list_usages( + self, resource_group_name: str, registry_name: str, **kwargs: Any + ) -> _models.RegistryUsageListResult: + """Gets the quota usages for the specified container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :return: RegistryUsageListResult + :rtype: ~container_registry_management_client.models.RegistryUsageListResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.RegistryUsageListResult] = kwargs.pop("cls", None) + + _request = build_registries_list_usages_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("RegistryUsageListResult", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_private_link_resources( + self, resource_group_name: str, registry_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.PrivateLinkResource"]: + """Lists the private link resources for a container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :return: An iterator like instance of PrivateLinkResource + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~container_registry_management_client.models.PrivateLinkResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models._models.PrivateLinkResourceListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_registries_list_private_link_resources_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + + return _request + + async def extract_data(pipeline_response): + deserialized = self._deserialize( + _models._models.PrivateLinkResourceListResult, pipeline_response # pylint: disable=protected-access + ) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def get_private_link_resource( + self, resource_group_name: str, registry_name: str, group_name: str, **kwargs: Any + ) -> _models.PrivateLinkResource: + """Gets a private link resource by a specified group name for a container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param group_name: The name of the private link associated with the Azure resource. Required. + :type group_name: str + :return: PrivateLinkResource + :rtype: ~container_registry_management_client.models.PrivateLinkResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PrivateLinkResource] = kwargs.pop("cls", None) + + _request = build_registries_get_private_link_resource_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + group_name=group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("PrivateLinkResource", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def regenerate_credential( + self, + resource_group_name: str, + registry_name: str, + regenerate_credential_parameters: _models.RegenerateCredentialParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.RegistryListCredentialsResult: + """Regenerates one of the login credentials for the specified container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param regenerate_credential_parameters: Specifies name of the password which should be + regenerated -- password or password2. Required. + :type regenerate_credential_parameters: + ~container_registry_management_client.models.RegenerateCredentialParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: RegistryListCredentialsResult + :rtype: ~container_registry_management_client.models.RegistryListCredentialsResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def regenerate_credential( + self, + resource_group_name: str, + registry_name: str, + regenerate_credential_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.RegistryListCredentialsResult: + """Regenerates one of the login credentials for the specified container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param regenerate_credential_parameters: Specifies name of the password which should be + regenerated -- password or password2. Required. + :type regenerate_credential_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: RegistryListCredentialsResult + :rtype: ~container_registry_management_client.models.RegistryListCredentialsResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def regenerate_credential( + self, + resource_group_name: str, + registry_name: str, + regenerate_credential_parameters: Union[_models.RegenerateCredentialParameters, IO[bytes]], + **kwargs: Any + ) -> _models.RegistryListCredentialsResult: + """Regenerates one of the login credentials for the specified container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param regenerate_credential_parameters: Specifies name of the password which should be + regenerated -- password or password2. Is either a RegenerateCredentialParameters type or a + IO[bytes] type. Required. + :type regenerate_credential_parameters: + ~container_registry_management_client.models.RegenerateCredentialParameters or IO[bytes] + :return: RegistryListCredentialsResult + :rtype: ~container_registry_management_client.models.RegistryListCredentialsResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.RegistryListCredentialsResult] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(regenerate_credential_parameters, (IOBase, bytes)): + _content = regenerate_credential_parameters + else: + _json = self._serialize.body(regenerate_credential_parameters, "RegenerateCredentialParameters") + + _request = build_registries_regenerate_credential_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("RegistryListCredentialsResult", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class CacheRulesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~container_registry_management_client.aio.ContainerRegistryManagementClient`'s + :attr:`cache_rules` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerRegistryManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> AsyncItemPaged["_models.CacheRule"]: + """Lists all cache rule resources for the specified container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :return: An iterator like instance of CacheRule + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~container_registry_management_client.models.CacheRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models._models.CacheRulesListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_cache_rules_list_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + + return _request + + async def extract_data(pipeline_response): + deserialized = self._deserialize( + _models._models.CacheRulesListResult, pipeline_response # pylint: disable=protected-access + ) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def get( + self, resource_group_name: str, registry_name: str, cache_rule_name: str, **kwargs: Any + ) -> _models.CacheRule: + """Gets the properties of the specified cache rule resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param cache_rule_name: The name of the cache rule. Required. + :type cache_rule_name: str + :return: CacheRule + :rtype: ~container_registry_management_client.models.CacheRule + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.CacheRule] = kwargs.pop("cls", None) + + _request = build_cache_rules_get_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + cache_rule_name=cache_rule_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("CacheRule", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + registry_name: str, + cache_rule_name: str, + cache_rule_create_parameters: Union[_models.CacheRule, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(cache_rule_create_parameters, (IOBase, bytes)): + _content = cache_rule_create_parameters + else: + _json = self._serialize.body(cache_rule_create_parameters, "CacheRule") + + _request = build_cache_rules_create_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + cache_rule_name=cache_rule_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + registry_name: str, + cache_rule_name: str, + cache_rule_create_parameters: _models.CacheRule, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CacheRule]: + """Creates a cache rule for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param cache_rule_name: The name of the cache rule. Required. + :type cache_rule_name: str + :param cache_rule_create_parameters: The parameters for creating a cache rule. Required. + :type cache_rule_create_parameters: ~container_registry_management_client.models.CacheRule + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns CacheRule + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.CacheRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + registry_name: str, + cache_rule_name: str, + cache_rule_create_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CacheRule]: + """Creates a cache rule for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param cache_rule_name: The name of the cache rule. Required. + :type cache_rule_name: str + :param cache_rule_create_parameters: The parameters for creating a cache rule. Required. + :type cache_rule_create_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns CacheRule + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.CacheRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create( + self, + resource_group_name: str, + registry_name: str, + cache_rule_name: str, + cache_rule_create_parameters: Union[_models.CacheRule, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.CacheRule]: + """Creates a cache rule for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param cache_rule_name: The name of the cache rule. Required. + :type cache_rule_name: str + :param cache_rule_create_parameters: The parameters for creating a cache rule. Is either a + CacheRule type or a IO[bytes] type. Required. + :type cache_rule_create_parameters: ~container_registry_management_client.models.CacheRule or + IO[bytes] + :return: An instance of AsyncLROPoller that returns CacheRule + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.CacheRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CacheRule] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + cache_rule_name=cache_rule_name, + cache_rule_create_parameters=cache_rule_create_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("CacheRule", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.CacheRule].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.CacheRule]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + registry_name: str, + cache_rule_name: str, + cache_rule_update_parameters: Union[_models.CacheRuleUpdateParameters, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(cache_rule_update_parameters, (IOBase, bytes)): + _content = cache_rule_update_parameters + else: + _json = self._serialize.body(cache_rule_update_parameters, "CacheRuleUpdateParameters") + + _request = build_cache_rules_update_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + cache_rule_name=cache_rule_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + registry_name: str, + cache_rule_name: str, + cache_rule_update_parameters: _models.CacheRuleUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CacheRule]: + """Updates a cache rule for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param cache_rule_name: The name of the cache rule. Required. + :type cache_rule_name: str + :param cache_rule_update_parameters: The parameters for updating a cache rule. Required. + :type cache_rule_update_parameters: + ~container_registry_management_client.models.CacheRuleUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns CacheRule + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.CacheRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + registry_name: str, + cache_rule_name: str, + cache_rule_update_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CacheRule]: + """Updates a cache rule for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param cache_rule_name: The name of the cache rule. Required. + :type cache_rule_name: str + :param cache_rule_update_parameters: The parameters for updating a cache rule. Required. + :type cache_rule_update_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns CacheRule + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.CacheRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + registry_name: str, + cache_rule_name: str, + cache_rule_update_parameters: Union[_models.CacheRuleUpdateParameters, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.CacheRule]: + """Updates a cache rule for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param cache_rule_name: The name of the cache rule. Required. + :type cache_rule_name: str + :param cache_rule_update_parameters: The parameters for updating a cache rule. Is either a + CacheRuleUpdateParameters type or a IO[bytes] type. Required. + :type cache_rule_update_parameters: + ~container_registry_management_client.models.CacheRuleUpdateParameters or IO[bytes] + :return: An instance of AsyncLROPoller that returns CacheRule + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.CacheRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CacheRule] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + cache_rule_name=cache_rule_name, + cache_rule_update_parameters=cache_rule_update_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("CacheRule", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.CacheRule].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.CacheRule]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, registry_name: str, cache_rule_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_cache_rules_delete_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + cache_rule_name=cache_rule_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, registry_name: str, cache_rule_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a cache rule resource from a container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param cache_rule_name: The name of the cache rule. Required. + :type cache_rule_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + cache_rule_name=cache_rule_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + +class ConnectedRegistriesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~container_registry_management_client.aio.ContainerRegistryManagementClient`'s + :attr:`connected_registries` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerRegistryManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, resource_group_name: str, registry_name: str, *, filter: Optional[str] = None, **kwargs: Any + ) -> AsyncItemPaged["_models.ConnectedRegistry"]: + """Lists all connected registries for the specified container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :keyword filter: An OData filter expression that describes a subset of connectedRegistries to + return. The parameters that can be filtered are parent.id (the resource id of the + connectedRegistry parent), mode, and connectionState. The supported operator is eq. Default + value is None. + :paramtype filter: str + :return: An iterator like instance of ConnectedRegistry + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~container_registry_management_client.models.ConnectedRegistry] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models._models.ConnectedRegistryListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_connected_registries_list_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + subscription_id=self._config.subscription_id, + filter=filter, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + + return _request + + async def extract_data(pipeline_response): + deserialized = self._deserialize( + _models._models.ConnectedRegistryListResult, pipeline_response # pylint: disable=protected-access + ) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def get( + self, resource_group_name: str, registry_name: str, connected_registry_name: str, **kwargs: Any + ) -> _models.ConnectedRegistry: + """Gets the properties of the connected registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param connected_registry_name: The name of the connected registry. Required. + :type connected_registry_name: str + :return: ConnectedRegistry + :rtype: ~container_registry_management_client.models.ConnectedRegistry + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ConnectedRegistry] = kwargs.pop("cls", None) + + _request = build_connected_registries_get_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + connected_registry_name=connected_registry_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("ConnectedRegistry", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + registry_name: str, + connected_registry_name: str, + connected_registry_create_parameters: Union[_models.ConnectedRegistry, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(connected_registry_create_parameters, (IOBase, bytes)): + _content = connected_registry_create_parameters + else: + _json = self._serialize.body(connected_registry_create_parameters, "ConnectedRegistry") + + _request = build_connected_registries_create_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + connected_registry_name=connected_registry_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + registry_name: str, + connected_registry_name: str, + connected_registry_create_parameters: _models.ConnectedRegistry, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ConnectedRegistry]: + """Creates a connected registry for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param connected_registry_name: The name of the connected registry. Required. + :type connected_registry_name: str + :param connected_registry_create_parameters: The parameters for creating a connectedRegistry. + Required. + :type connected_registry_create_parameters: + ~container_registry_management_client.models.ConnectedRegistry + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ConnectedRegistry + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.ConnectedRegistry] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + registry_name: str, + connected_registry_name: str, + connected_registry_create_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ConnectedRegistry]: + """Creates a connected registry for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param connected_registry_name: The name of the connected registry. Required. + :type connected_registry_name: str + :param connected_registry_create_parameters: The parameters for creating a connectedRegistry. + Required. + :type connected_registry_create_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ConnectedRegistry + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.ConnectedRegistry] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create( + self, + resource_group_name: str, + registry_name: str, + connected_registry_name: str, + connected_registry_create_parameters: Union[_models.ConnectedRegistry, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.ConnectedRegistry]: + """Creates a connected registry for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param connected_registry_name: The name of the connected registry. Required. + :type connected_registry_name: str + :param connected_registry_create_parameters: The parameters for creating a connectedRegistry. + Is either a ConnectedRegistry type or a IO[bytes] type. Required. + :type connected_registry_create_parameters: + ~container_registry_management_client.models.ConnectedRegistry or IO[bytes] + :return: An instance of AsyncLROPoller that returns ConnectedRegistry + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.ConnectedRegistry] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ConnectedRegistry] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + connected_registry_name=connected_registry_name, + connected_registry_create_parameters=connected_registry_create_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("ConnectedRegistry", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.ConnectedRegistry].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ConnectedRegistry]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + registry_name: str, + connected_registry_name: str, + connected_registry_update_parameters: Union[_models.ConnectedRegistryUpdateParameters, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(connected_registry_update_parameters, (IOBase, bytes)): + _content = connected_registry_update_parameters + else: + _json = self._serialize.body(connected_registry_update_parameters, "ConnectedRegistryUpdateParameters") + + _request = build_connected_registries_update_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + connected_registry_name=connected_registry_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + registry_name: str, + connected_registry_name: str, + connected_registry_update_parameters: _models.ConnectedRegistryUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ConnectedRegistry]: + """Updates a connected registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param connected_registry_name: The name of the connected registry. Required. + :type connected_registry_name: str + :param connected_registry_update_parameters: The parameters for updating a connectedRegistry. + Required. + :type connected_registry_update_parameters: + ~container_registry_management_client.models.ConnectedRegistryUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ConnectedRegistry + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.ConnectedRegistry] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + registry_name: str, + connected_registry_name: str, + connected_registry_update_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ConnectedRegistry]: + """Updates a connected registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param connected_registry_name: The name of the connected registry. Required. + :type connected_registry_name: str + :param connected_registry_update_parameters: The parameters for updating a connectedRegistry. + Required. + :type connected_registry_update_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ConnectedRegistry + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.ConnectedRegistry] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + registry_name: str, + connected_registry_name: str, + connected_registry_update_parameters: Union[_models.ConnectedRegistryUpdateParameters, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.ConnectedRegistry]: + """Updates a connected registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param connected_registry_name: The name of the connected registry. Required. + :type connected_registry_name: str + :param connected_registry_update_parameters: The parameters for updating a connectedRegistry. + Is either a ConnectedRegistryUpdateParameters type or a IO[bytes] type. Required. + :type connected_registry_update_parameters: + ~container_registry_management_client.models.ConnectedRegistryUpdateParameters or IO[bytes] + :return: An instance of AsyncLROPoller that returns ConnectedRegistry + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.ConnectedRegistry] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ConnectedRegistry] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + connected_registry_name=connected_registry_name, + connected_registry_update_parameters=connected_registry_update_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("ConnectedRegistry", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.ConnectedRegistry].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ConnectedRegistry]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, registry_name: str, connected_registry_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_connected_registries_delete_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + connected_registry_name=connected_registry_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, registry_name: str, connected_registry_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a connected registry from a container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param connected_registry_name: The name of the connected registry. Required. + :type connected_registry_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + connected_registry_name=connected_registry_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + async def _deactivate_initial( + self, resource_group_name: str, registry_name: str, connected_registry_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_connected_registries_deactivate_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + connected_registry_name=connected_registry_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_deactivate( + self, resource_group_name: str, registry_name: str, connected_registry_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deactivates the connected registry instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param connected_registry_name: The name of the connected registry. Required. + :type connected_registry_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._deactivate_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + connected_registry_name=connected_registry_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace_async + async def resync( + self, resource_group_name: str, registry_name: str, connected_registry_name: str, **kwargs: Any + ) -> _models.ConnectedRegistry: + """Resync the connected registry instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param connected_registry_name: The name of the connected registry. Required. + :type connected_registry_name: str + :return: ConnectedRegistry + :rtype: ~container_registry_management_client.models.ConnectedRegistry + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ConnectedRegistry] = kwargs.pop("cls", None) + + _request = build_connected_registries_resync_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + connected_registry_name=connected_registry_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("ConnectedRegistry", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class CredentialSetsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~container_registry_management_client.aio.ContainerRegistryManagementClient`'s + :attr:`credential_sets` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerRegistryManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, resource_group_name: str, registry_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.CredentialSet"]: + """Lists all credential set resources for the specified container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :return: An iterator like instance of CredentialSet + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~container_registry_management_client.models.CredentialSet] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models._models.CredentialSetListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_credential_sets_list_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + + return _request + + async def extract_data(pipeline_response): + deserialized = self._deserialize( + _models._models.CredentialSetListResult, pipeline_response # pylint: disable=protected-access + ) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def get( + self, resource_group_name: str, registry_name: str, credential_set_name: str, **kwargs: Any + ) -> _models.CredentialSet: + """Gets the properties of the specified credential set resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param credential_set_name: The name of the credential set. Required. + :type credential_set_name: str + :return: CredentialSet + :rtype: ~container_registry_management_client.models.CredentialSet + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.CredentialSet] = kwargs.pop("cls", None) + + _request = build_credential_sets_get_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + credential_set_name=credential_set_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("CredentialSet", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + registry_name: str, + credential_set_name: str, + credential_set_create_parameters: Union[_models.CredentialSet, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(credential_set_create_parameters, (IOBase, bytes)): + _content = credential_set_create_parameters + else: + _json = self._serialize.body(credential_set_create_parameters, "CredentialSet") + + _request = build_credential_sets_create_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + credential_set_name=credential_set_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + registry_name: str, + credential_set_name: str, + credential_set_create_parameters: _models.CredentialSet, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CredentialSet]: + """Creates a credential set for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param credential_set_name: The name of the credential set. Required. + :type credential_set_name: str + :param credential_set_create_parameters: The parameters for creating a credential set. + Required. + :type credential_set_create_parameters: + ~container_registry_management_client.models.CredentialSet + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns CredentialSet + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.CredentialSet] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + registry_name: str, + credential_set_name: str, + credential_set_create_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CredentialSet]: + """Creates a credential set for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param credential_set_name: The name of the credential set. Required. + :type credential_set_name: str + :param credential_set_create_parameters: The parameters for creating a credential set. + Required. + :type credential_set_create_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns CredentialSet + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.CredentialSet] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create( + self, + resource_group_name: str, + registry_name: str, + credential_set_name: str, + credential_set_create_parameters: Union[_models.CredentialSet, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.CredentialSet]: + """Creates a credential set for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param credential_set_name: The name of the credential set. Required. + :type credential_set_name: str + :param credential_set_create_parameters: The parameters for creating a credential set. Is + either a CredentialSet type or a IO[bytes] type. Required. + :type credential_set_create_parameters: + ~container_registry_management_client.models.CredentialSet or IO[bytes] + :return: An instance of AsyncLROPoller that returns CredentialSet + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.CredentialSet] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CredentialSet] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + credential_set_name=credential_set_name, + credential_set_create_parameters=credential_set_create_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("CredentialSet", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.CredentialSet].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.CredentialSet]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + registry_name: str, + credential_set_name: str, + credential_set_update_parameters: Union[_models.CredentialSetUpdateParameters, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(credential_set_update_parameters, (IOBase, bytes)): + _content = credential_set_update_parameters + else: + _json = self._serialize.body(credential_set_update_parameters, "CredentialSetUpdateParameters") + + _request = build_credential_sets_update_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + credential_set_name=credential_set_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + registry_name: str, + credential_set_name: str, + credential_set_update_parameters: _models.CredentialSetUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CredentialSet]: + """Updates a credential set for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param credential_set_name: The name of the credential set. Required. + :type credential_set_name: str + :param credential_set_update_parameters: The parameters for updating a credential set. + Required. + :type credential_set_update_parameters: + ~container_registry_management_client.models.CredentialSetUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns CredentialSet + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.CredentialSet] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + registry_name: str, + credential_set_name: str, + credential_set_update_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CredentialSet]: + """Updates a credential set for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param credential_set_name: The name of the credential set. Required. + :type credential_set_name: str + :param credential_set_update_parameters: The parameters for updating a credential set. + Required. + :type credential_set_update_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns CredentialSet + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.CredentialSet] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + registry_name: str, + credential_set_name: str, + credential_set_update_parameters: Union[_models.CredentialSetUpdateParameters, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.CredentialSet]: + """Updates a credential set for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param credential_set_name: The name of the credential set. Required. + :type credential_set_name: str + :param credential_set_update_parameters: The parameters for updating a credential set. Is + either a CredentialSetUpdateParameters type or a IO[bytes] type. Required. + :type credential_set_update_parameters: + ~container_registry_management_client.models.CredentialSetUpdateParameters or IO[bytes] + :return: An instance of AsyncLROPoller that returns CredentialSet + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.CredentialSet] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CredentialSet] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + credential_set_name=credential_set_name, + credential_set_update_parameters=credential_set_update_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("CredentialSet", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.CredentialSet].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.CredentialSet]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, registry_name: str, credential_set_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_credential_sets_delete_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + credential_set_name=credential_set_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, registry_name: str, credential_set_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a credential set from a container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param credential_set_name: The name of the credential set. Required. + :type credential_set_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + credential_set_name=credential_set_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + +class ExportPipelinesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~container_registry_management_client.aio.ContainerRegistryManagementClient`'s + :attr:`export_pipelines` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerRegistryManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, resource_group_name: str, registry_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.ExportPipeline"]: + """Lists all export pipelines for the specified container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :return: An iterator like instance of ExportPipeline + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~container_registry_management_client.models.ExportPipeline] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models._models.ExportPipelineListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_export_pipelines_list_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + + return _request + + async def extract_data(pipeline_response): + deserialized = self._deserialize( + _models._models.ExportPipelineListResult, pipeline_response # pylint: disable=protected-access + ) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def get( + self, resource_group_name: str, registry_name: str, export_pipeline_name: str, **kwargs: Any + ) -> _models.ExportPipeline: + """Gets the properties of the export pipeline. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param export_pipeline_name: The name of the export pipeline. Required. + :type export_pipeline_name: str + :return: ExportPipeline + :rtype: ~container_registry_management_client.models.ExportPipeline + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ExportPipeline] = kwargs.pop("cls", None) + + _request = build_export_pipelines_get_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + export_pipeline_name=export_pipeline_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("ExportPipeline", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + registry_name: str, + export_pipeline_name: str, + export_pipeline_create_parameters: Union[_models.ExportPipeline, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(export_pipeline_create_parameters, (IOBase, bytes)): + _content = export_pipeline_create_parameters + else: + _json = self._serialize.body(export_pipeline_create_parameters, "ExportPipeline") + + _request = build_export_pipelines_create_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + export_pipeline_name=export_pipeline_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + registry_name: str, + export_pipeline_name: str, + export_pipeline_create_parameters: _models.ExportPipeline, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ExportPipeline]: + """Creates an export pipeline for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param export_pipeline_name: The name of the export pipeline. Required. + :type export_pipeline_name: str + :param export_pipeline_create_parameters: The parameters for creating an export pipeline. + Required. + :type export_pipeline_create_parameters: + ~container_registry_management_client.models.ExportPipeline + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ExportPipeline + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.ExportPipeline] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + registry_name: str, + export_pipeline_name: str, + export_pipeline_create_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ExportPipeline]: + """Creates an export pipeline for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param export_pipeline_name: The name of the export pipeline. Required. + :type export_pipeline_name: str + :param export_pipeline_create_parameters: The parameters for creating an export pipeline. + Required. + :type export_pipeline_create_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ExportPipeline + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.ExportPipeline] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create( + self, + resource_group_name: str, + registry_name: str, + export_pipeline_name: str, + export_pipeline_create_parameters: Union[_models.ExportPipeline, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.ExportPipeline]: + """Creates an export pipeline for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param export_pipeline_name: The name of the export pipeline. Required. + :type export_pipeline_name: str + :param export_pipeline_create_parameters: The parameters for creating an export pipeline. Is + either a ExportPipeline type or a IO[bytes] type. Required. + :type export_pipeline_create_parameters: + ~container_registry_management_client.models.ExportPipeline or IO[bytes] + :return: An instance of AsyncLROPoller that returns ExportPipeline + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.ExportPipeline] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ExportPipeline] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + export_pipeline_name=export_pipeline_name, + export_pipeline_create_parameters=export_pipeline_create_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("ExportPipeline", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.ExportPipeline].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ExportPipeline]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, registry_name: str, export_pipeline_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_export_pipelines_delete_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + export_pipeline_name=export_pipeline_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, registry_name: str, export_pipeline_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes an export pipeline from a container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param export_pipeline_name: The name of the export pipeline. Required. + :type export_pipeline_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + export_pipeline_name=export_pipeline_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + +class ImportPipelinesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~container_registry_management_client.aio.ContainerRegistryManagementClient`'s + :attr:`import_pipelines` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerRegistryManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, resource_group_name: str, registry_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.ImportPipeline"]: + """Lists all import pipelines for the specified container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :return: An iterator like instance of ImportPipeline + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~container_registry_management_client.models.ImportPipeline] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models._models.ImportPipelineListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_import_pipelines_list_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + + return _request + + async def extract_data(pipeline_response): + deserialized = self._deserialize( + _models._models.ImportPipelineListResult, pipeline_response # pylint: disable=protected-access + ) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def get( + self, resource_group_name: str, registry_name: str, import_pipeline_name: str, **kwargs: Any + ) -> _models.ImportPipeline: + """Gets the properties of the import pipeline. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param import_pipeline_name: The name of the import pipeline. Required. + :type import_pipeline_name: str + :return: ImportPipeline + :rtype: ~container_registry_management_client.models.ImportPipeline + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ImportPipeline] = kwargs.pop("cls", None) + + _request = build_import_pipelines_get_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + import_pipeline_name=import_pipeline_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("ImportPipeline", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + registry_name: str, + import_pipeline_name: str, + import_pipeline_create_parameters: Union[_models.ImportPipeline, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(import_pipeline_create_parameters, (IOBase, bytes)): + _content = import_pipeline_create_parameters + else: + _json = self._serialize.body(import_pipeline_create_parameters, "ImportPipeline") + + _request = build_import_pipelines_create_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + import_pipeline_name=import_pipeline_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + registry_name: str, + import_pipeline_name: str, + import_pipeline_create_parameters: _models.ImportPipeline, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ImportPipeline]: + """Creates an import pipeline for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param import_pipeline_name: The name of the import pipeline. Required. + :type import_pipeline_name: str + :param import_pipeline_create_parameters: The parameters for creating an import pipeline. + Required. + :type import_pipeline_create_parameters: + ~container_registry_management_client.models.ImportPipeline + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ImportPipeline + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.ImportPipeline] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + registry_name: str, + import_pipeline_name: str, + import_pipeline_create_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ImportPipeline]: + """Creates an import pipeline for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param import_pipeline_name: The name of the import pipeline. Required. + :type import_pipeline_name: str + :param import_pipeline_create_parameters: The parameters for creating an import pipeline. + Required. + :type import_pipeline_create_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ImportPipeline + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.ImportPipeline] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create( + self, + resource_group_name: str, + registry_name: str, + import_pipeline_name: str, + import_pipeline_create_parameters: Union[_models.ImportPipeline, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.ImportPipeline]: + """Creates an import pipeline for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param import_pipeline_name: The name of the import pipeline. Required. + :type import_pipeline_name: str + :param import_pipeline_create_parameters: The parameters for creating an import pipeline. Is + either a ImportPipeline type or a IO[bytes] type. Required. + :type import_pipeline_create_parameters: + ~container_registry_management_client.models.ImportPipeline or IO[bytes] + :return: An instance of AsyncLROPoller that returns ImportPipeline + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.ImportPipeline] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ImportPipeline] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + import_pipeline_name=import_pipeline_name, + import_pipeline_create_parameters=import_pipeline_create_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("ImportPipeline", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.ImportPipeline].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ImportPipeline]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, registry_name: str, import_pipeline_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_import_pipelines_delete_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + import_pipeline_name=import_pipeline_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, registry_name: str, import_pipeline_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes an import pipeline from a container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param import_pipeline_name: The name of the import pipeline. Required. + :type import_pipeline_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + import_pipeline_name=import_pipeline_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + +class ArchivesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~container_registry_management_client.aio.ContainerRegistryManagementClient`'s + :attr:`archives` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerRegistryManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, resource_group_name: str, registry_name: str, package_type: str, **kwargs: Any + ) -> AsyncItemPaged["_models.Archive"]: + """Lists all archives for the specified container registry and package type. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param package_type: The package type. Required. + :type package_type: str + :return: An iterator like instance of Archive + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~container_registry_management_client.models.Archive] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models._models.ArchiveListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_archives_list_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + package_type=package_type, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + + return _request + + async def extract_data(pipeline_response): + deserialized = self._deserialize( + _models._models.ArchiveListResult, pipeline_response # pylint: disable=protected-access + ) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def get( + self, resource_group_name: str, registry_name: str, package_type: str, archive_name: str, **kwargs: Any + ) -> _models.Archive: + """Gets the properties of the archive. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param package_type: The package type. Required. + :type package_type: str + :param archive_name: The name of the archive resource. Required. + :type archive_name: str + :return: Archive + :rtype: ~container_registry_management_client.models.Archive + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Archive] = kwargs.pop("cls", None) + + _request = build_archives_get_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + package_type=package_type, + archive_name=archive_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("Archive", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + registry_name: str, + package_type: str, + archive_name: str, + archive_create_parameters: Union[_models.Archive, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(archive_create_parameters, (IOBase, bytes)): + _content = archive_create_parameters + else: + _json = self._serialize.body(archive_create_parameters, "Archive") + + _request = build_archives_create_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + package_type=package_type, + archive_name=archive_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + registry_name: str, + package_type: str, + archive_name: str, + archive_create_parameters: _models.Archive, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Archive]: + """Creates a archive for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param package_type: The package type. Required. + :type package_type: str + :param archive_name: The name of the archive resource. Required. + :type archive_name: str + :param archive_create_parameters: The parameters for creating a archive. Required. + :type archive_create_parameters: ~container_registry_management_client.models.Archive + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Archive + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Archive] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + registry_name: str, + package_type: str, + archive_name: str, + archive_create_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Archive]: + """Creates a archive for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param package_type: The package type. Required. + :type package_type: str + :param archive_name: The name of the archive resource. Required. + :type archive_name: str + :param archive_create_parameters: The parameters for creating a archive. Required. + :type archive_create_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Archive + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Archive] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create( + self, + resource_group_name: str, + registry_name: str, + package_type: str, + archive_name: str, + archive_create_parameters: Union[_models.Archive, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.Archive]: + """Creates a archive for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param package_type: The package type. Required. + :type package_type: str + :param archive_name: The name of the archive resource. Required. + :type archive_name: str + :param archive_create_parameters: The parameters for creating a archive. Is either a Archive + type or a IO[bytes] type. Required. + :type archive_create_parameters: ~container_registry_management_client.models.Archive or + IO[bytes] + :return: An instance of AsyncLROPoller that returns Archive + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Archive] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Archive] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + package_type=package_type, + archive_name=archive_name, + archive_create_parameters=archive_create_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("Archive", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.Archive].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.Archive]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @overload + async def update( + self, + resource_group_name: str, + registry_name: str, + package_type: str, + archive_name: str, + archive_update_parameters: _models.ArchiveUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Archive: + """Updates a archive for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param package_type: The package type. Required. + :type package_type: str + :param archive_name: The name of the archive resource. Required. + :type archive_name: str + :param archive_update_parameters: The parameters for updating a archive. Required. + :type archive_update_parameters: + ~container_registry_management_client.models.ArchiveUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: Archive + :rtype: ~container_registry_management_client.models.Archive + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + registry_name: str, + package_type: str, + archive_name: str, + archive_update_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Archive: + """Updates a archive for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param package_type: The package type. Required. + :type package_type: str + :param archive_name: The name of the archive resource. Required. + :type archive_name: str + :param archive_update_parameters: The parameters for updating a archive. Required. + :type archive_update_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: Archive + :rtype: ~container_registry_management_client.models.Archive + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + registry_name: str, + package_type: str, + archive_name: str, + archive_update_parameters: Union[_models.ArchiveUpdateParameters, IO[bytes]], + **kwargs: Any + ) -> _models.Archive: + """Updates a archive for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param package_type: The package type. Required. + :type package_type: str + :param archive_name: The name of the archive resource. Required. + :type archive_name: str + :param archive_update_parameters: The parameters for updating a archive. Is either a + ArchiveUpdateParameters type or a IO[bytes] type. Required. + :type archive_update_parameters: + ~container_registry_management_client.models.ArchiveUpdateParameters or IO[bytes] + :return: Archive + :rtype: ~container_registry_management_client.models.Archive + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Archive] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(archive_update_parameters, (IOBase, bytes)): + _content = archive_update_parameters + else: + _json = self._serialize.body(archive_update_parameters, "ArchiveUpdateParameters") + + _request = build_archives_update_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + package_type=package_type, + archive_name=archive_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("Archive", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _delete_initial( + self, resource_group_name: str, registry_name: str, package_type: str, archive_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_archives_delete_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + package_type=package_type, + archive_name=archive_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, registry_name: str, package_type: str, archive_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a archive from a container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param package_type: The package type. Required. + :type package_type: str + :param archive_name: The name of the archive resource. Required. + :type archive_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + package_type=package_type, + archive_name=archive_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + +class ArchiveVersionsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~container_registry_management_client.aio.ContainerRegistryManagementClient`'s + :attr:`archive_versions` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerRegistryManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, resource_group_name: str, registry_name: str, package_type: str, archive_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.ArchiveVersion"]: + """Lists all archive versions for the specified container registry, repository type and archive + name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param package_type: The package type. Required. + :type package_type: str + :param archive_name: The name of the archive resource. Required. + :type archive_name: str + :return: An iterator like instance of ArchiveVersion + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~container_registry_management_client.models.ArchiveVersion] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models._models.ArchiveVersionListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_archive_versions_list_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + package_type=package_type, + archive_name=archive_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + + return _request + + async def extract_data(pipeline_response): + deserialized = self._deserialize( + _models._models.ArchiveVersionListResult, pipeline_response # pylint: disable=protected-access + ) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + registry_name: str, + package_type: str, + archive_name: str, + archive_version_name: str, + **kwargs: Any + ) -> _models.ArchiveVersion: + """Gets the properties of the archive version. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param package_type: The package type. Required. + :type package_type: str + :param archive_name: The name of the archive resource. Required. + :type archive_name: str + :param archive_version_name: The name of the archive version resource. Required. + :type archive_version_name: str + :return: ArchiveVersion + :rtype: ~container_registry_management_client.models.ArchiveVersion + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ArchiveVersion] = kwargs.pop("cls", None) + + _request = build_archive_versions_get_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + package_type=package_type, + archive_name=archive_name, + archive_version_name=archive_version_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("ArchiveVersion", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + registry_name: str, + package_type: str, + archive_name: str, + archive_version_name: str, + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_archive_versions_create_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + package_type=package_type, + archive_name=archive_name, + archive_version_name=archive_version_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_create( + self, + resource_group_name: str, + registry_name: str, + package_type: str, + archive_name: str, + archive_version_name: str, + **kwargs: Any + ) -> AsyncLROPoller[_models.ArchiveVersion]: + """Creates a archive version for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param package_type: The package type. Required. + :type package_type: str + :param archive_name: The name of the archive resource. Required. + :type archive_name: str + :param archive_version_name: The name of the archive version resource. Required. + :type archive_version_name: str + :return: An instance of AsyncLROPoller that returns ArchiveVersion + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.ArchiveVersion] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ArchiveVersion] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + package_type=package_type, + archive_name=archive_name, + archive_version_name=archive_version_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("ArchiveVersion", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.ArchiveVersion].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ArchiveVersion]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, + resource_group_name: str, + registry_name: str, + package_type: str, + archive_name: str, + archive_version_name: str, + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_archive_versions_delete_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + package_type=package_type, + archive_name=archive_name, + archive_version_name=archive_version_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, + resource_group_name: str, + registry_name: str, + package_type: str, + archive_name: str, + archive_version_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a archive version from a container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param package_type: The package type. Required. + :type package_type: str + :param archive_name: The name of the archive resource. Required. + :type archive_name: str + :param archive_version_name: The name of the archive version resource. Required. + :type archive_version_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + package_type=package_type, + archive_name=archive_name, + archive_version_name=archive_version_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + +class PipelineRunsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~container_registry_management_client.aio.ContainerRegistryManagementClient`'s + :attr:`pipeline_runs` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerRegistryManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, resource_group_name: str, registry_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.PipelineRun"]: + """Lists all the pipeline runs for the specified container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :return: An iterator like instance of PipelineRun + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~container_registry_management_client.models.PipelineRun] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models._models.PipelineRunListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_pipeline_runs_list_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + + return _request + + async def extract_data(pipeline_response): + deserialized = self._deserialize( + _models._models.PipelineRunListResult, pipeline_response # pylint: disable=protected-access + ) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def get( + self, resource_group_name: str, registry_name: str, pipeline_run_name: str, **kwargs: Any + ) -> _models.PipelineRun: + """Gets the detailed information for a given pipeline run. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param pipeline_run_name: The name of the pipeline run. Required. + :type pipeline_run_name: str + :return: PipelineRun + :rtype: ~container_registry_management_client.models.PipelineRun + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PipelineRun] = kwargs.pop("cls", None) + + _request = build_pipeline_runs_get_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + pipeline_run_name=pipeline_run_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("PipelineRun", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + registry_name: str, + pipeline_run_name: str, + pipeline_run_create_parameters: Union[_models.PipelineRun, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(pipeline_run_create_parameters, (IOBase, bytes)): + _content = pipeline_run_create_parameters + else: + _json = self._serialize.body(pipeline_run_create_parameters, "PipelineRun") + + _request = build_pipeline_runs_create_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + pipeline_run_name=pipeline_run_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + registry_name: str, + pipeline_run_name: str, + pipeline_run_create_parameters: _models.PipelineRun, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.PipelineRun]: + """Creates a pipeline run for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param pipeline_run_name: The name of the pipeline run. Required. + :type pipeline_run_name: str + :param pipeline_run_create_parameters: The parameters for creating a pipeline run. Required. + :type pipeline_run_create_parameters: ~container_registry_management_client.models.PipelineRun + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns PipelineRun + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.PipelineRun] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + registry_name: str, + pipeline_run_name: str, + pipeline_run_create_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.PipelineRun]: + """Creates a pipeline run for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param pipeline_run_name: The name of the pipeline run. Required. + :type pipeline_run_name: str + :param pipeline_run_create_parameters: The parameters for creating a pipeline run. Required. + :type pipeline_run_create_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns PipelineRun + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.PipelineRun] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create( + self, + resource_group_name: str, + registry_name: str, + pipeline_run_name: str, + pipeline_run_create_parameters: Union[_models.PipelineRun, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.PipelineRun]: + """Creates a pipeline run for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param pipeline_run_name: The name of the pipeline run. Required. + :type pipeline_run_name: str + :param pipeline_run_create_parameters: The parameters for creating a pipeline run. Is either a + PipelineRun type or a IO[bytes] type. Required. + :type pipeline_run_create_parameters: ~container_registry_management_client.models.PipelineRun + or IO[bytes] + :return: An instance of AsyncLROPoller that returns PipelineRun + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.PipelineRun] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PipelineRun] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + pipeline_run_name=pipeline_run_name, + pipeline_run_create_parameters=pipeline_run_create_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("PipelineRun", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.PipelineRun].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.PipelineRun]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, registry_name: str, pipeline_run_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_pipeline_runs_delete_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + pipeline_run_name=pipeline_run_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, registry_name: str, pipeline_run_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a pipeline run from a container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param pipeline_run_name: The name of the pipeline run. Required. + :type pipeline_run_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + pipeline_run_name=pipeline_run_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + +class PrivateEndpointConnectionsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~container_registry_management_client.aio.ContainerRegistryManagementClient`'s + :attr:`private_endpoint_connections` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerRegistryManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, resource_group_name: str, registry_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.PrivateEndpointConnection"]: + """List all private endpoint connections in a container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :return: An iterator like instance of PrivateEndpointConnection + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~container_registry_management_client.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models._models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_private_endpoint_connections_list_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + + return _request + + async def extract_data(pipeline_response): + deserialized = self._deserialize( + _models._models.PrivateEndpointConnectionListResult, # pylint: disable=protected-access + pipeline_response, + ) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def get( + self, resource_group_name: str, registry_name: str, private_endpoint_connection_name: str, **kwargs: Any + ) -> _models.PrivateEndpointConnection: + """Get the specified private endpoint connection associated with the container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :return: PrivateEndpointConnection + :rtype: ~container_registry_management_client.models.PrivateEndpointConnection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) + + _request = build_private_endpoint_connections_get_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + private_endpoint_connection_name=private_endpoint_connection_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + registry_name: str, + private_endpoint_connection_name: str, + private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(private_endpoint_connection, (IOBase, bytes)): + _content = private_endpoint_connection + else: + _json = self._serialize.body(private_endpoint_connection, "PrivateEndpointConnection") + + _request = build_private_endpoint_connections_create_or_update_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + private_endpoint_connection_name=private_endpoint_connection_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + registry_name: str, + private_endpoint_connection_name: str, + private_endpoint_connection: _models.PrivateEndpointConnection, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.PrivateEndpointConnection]: + """Update the state of specified private endpoint connection associated with the container + registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :param private_endpoint_connection: The parameters for creating a private endpoint connection. + Required. + :type private_endpoint_connection: + ~container_registry_management_client.models.PrivateEndpointConnection + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns PrivateEndpointConnection + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + registry_name: str, + private_endpoint_connection_name: str, + private_endpoint_connection: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.PrivateEndpointConnection]: + """Update the state of specified private endpoint connection associated with the container + registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :param private_endpoint_connection: The parameters for creating a private endpoint connection. + Required. + :type private_endpoint_connection: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns PrivateEndpointConnection + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + registry_name: str, + private_endpoint_connection_name: str, + private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.PrivateEndpointConnection]: + """Update the state of specified private endpoint connection associated with the container + registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :param private_endpoint_connection: The parameters for creating a private endpoint connection. + Is either a PrivateEndpointConnection type or a IO[bytes] type. Required. + :type private_endpoint_connection: + ~container_registry_management_client.models.PrivateEndpointConnection or IO[bytes] + :return: An instance of AsyncLROPoller that returns PrivateEndpointConnection + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + private_endpoint_connection_name=private_endpoint_connection_name, + private_endpoint_connection=private_endpoint_connection, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.PrivateEndpointConnection].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.PrivateEndpointConnection]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, registry_name: str, private_endpoint_connection_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_private_endpoint_connections_delete_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + private_endpoint_connection_name=private_endpoint_connection_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, registry_name: str, private_endpoint_connection_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified private endpoint connection associated with the container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + private_endpoint_connection_name=private_endpoint_connection_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + +class ReplicationsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~container_registry_management_client.aio.ContainerRegistryManagementClient`'s + :attr:`replications` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerRegistryManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, resource_group_name: str, registry_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.Replication"]: + """Lists all the replications for the specified container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :return: An iterator like instance of Replication + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~container_registry_management_client.models.Replication] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models._models.ReplicationListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_replications_list_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + + return _request + + async def extract_data(pipeline_response): + deserialized = self._deserialize( + _models._models.ReplicationListResult, pipeline_response # pylint: disable=protected-access + ) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def get( + self, resource_group_name: str, registry_name: str, replication_name: str, **kwargs: Any + ) -> _models.Replication: + """Gets the properties of the specified replication. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param replication_name: The name of the replication. Required. + :type replication_name: str + :return: Replication + :rtype: ~container_registry_management_client.models.Replication + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Replication] = kwargs.pop("cls", None) + + _request = build_replications_get_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + replication_name=replication_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("Replication", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + registry_name: str, + replication_name: str, + replication: Union[_models.Replication, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(replication, (IOBase, bytes)): + _content = replication + else: + _json = self._serialize.body(replication, "Replication") + + _request = build_replications_create_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + replication_name=replication_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + registry_name: str, + replication_name: str, + replication: _models.Replication, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Replication]: + """Creates a replication for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param replication_name: The name of the replication. Required. + :type replication_name: str + :param replication: The parameters for creating a replication. Required. + :type replication: ~container_registry_management_client.models.Replication + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Replication + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Replication] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + registry_name: str, + replication_name: str, + replication: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Replication]: + """Creates a replication for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param replication_name: The name of the replication. Required. + :type replication_name: str + :param replication: The parameters for creating a replication. Required. + :type replication: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Replication + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Replication] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create( + self, + resource_group_name: str, + registry_name: str, + replication_name: str, + replication: Union[_models.Replication, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.Replication]: + """Creates a replication for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param replication_name: The name of the replication. Required. + :type replication_name: str + :param replication: The parameters for creating a replication. Is either a Replication type or + a IO[bytes] type. Required. + :type replication: ~container_registry_management_client.models.Replication or IO[bytes] + :return: An instance of AsyncLROPoller that returns Replication + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Replication] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Replication] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + replication_name=replication_name, + replication=replication, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("Replication", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.Replication].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.Replication]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + registry_name: str, + replication_name: str, + replication_update_parameters: Union[_models.ReplicationUpdateParameters, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(replication_update_parameters, (IOBase, bytes)): + _content = replication_update_parameters + else: + _json = self._serialize.body(replication_update_parameters, "ReplicationUpdateParameters") + + _request = build_replications_update_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + replication_name=replication_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + registry_name: str, + replication_name: str, + replication_update_parameters: _models.ReplicationUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Replication]: + """Updates a replication for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param replication_name: The name of the replication. Required. + :type replication_name: str + :param replication_update_parameters: The parameters for updating a replication. Required. + :type replication_update_parameters: + ~container_registry_management_client.models.ReplicationUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Replication + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Replication] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + registry_name: str, + replication_name: str, + replication_update_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Replication]: + """Updates a replication for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param replication_name: The name of the replication. Required. + :type replication_name: str + :param replication_update_parameters: The parameters for updating a replication. Required. + :type replication_update_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Replication + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Replication] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + registry_name: str, + replication_name: str, + replication_update_parameters: Union[_models.ReplicationUpdateParameters, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.Replication]: + """Updates a replication for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param replication_name: The name of the replication. Required. + :type replication_name: str + :param replication_update_parameters: The parameters for updating a replication. Is either a + ReplicationUpdateParameters type or a IO[bytes] type. Required. + :type replication_update_parameters: + ~container_registry_management_client.models.ReplicationUpdateParameters or IO[bytes] + :return: An instance of AsyncLROPoller that returns Replication + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Replication] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Replication] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + replication_name=replication_name, + replication_update_parameters=replication_update_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("Replication", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.Replication].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.Replication]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, registry_name: str, replication_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_replications_delete_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + replication_name=replication_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, registry_name: str, replication_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a replication from a container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param replication_name: The name of the replication. Required. + :type replication_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + replication_name=replication_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + +class ScopeMapsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~container_registry_management_client.aio.ContainerRegistryManagementClient`'s + :attr:`scope_maps` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerRegistryManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> AsyncItemPaged["_models.ScopeMap"]: + """Lists all the scope maps for the specified container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :return: An iterator like instance of ScopeMap + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~container_registry_management_client.models.ScopeMap] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models._models.ScopeMapListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_scope_maps_list_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + + return _request + + async def extract_data(pipeline_response): + deserialized = self._deserialize( + _models._models.ScopeMapListResult, pipeline_response # pylint: disable=protected-access + ) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def get( + self, resource_group_name: str, registry_name: str, scope_map_name: str, **kwargs: Any + ) -> _models.ScopeMap: + """Gets the properties of the specified scope map. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param scope_map_name: The name of the scope map. Required. + :type scope_map_name: str + :return: ScopeMap + :rtype: ~container_registry_management_client.models.ScopeMap + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ScopeMap] = kwargs.pop("cls", None) + + _request = build_scope_maps_get_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + scope_map_name=scope_map_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("ScopeMap", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + registry_name: str, + scope_map_name: str, + scope_map_create_parameters: Union[_models.ScopeMap, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(scope_map_create_parameters, (IOBase, bytes)): + _content = scope_map_create_parameters + else: + _json = self._serialize.body(scope_map_create_parameters, "ScopeMap") + + _request = build_scope_maps_create_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + scope_map_name=scope_map_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + registry_name: str, + scope_map_name: str, + scope_map_create_parameters: _models.ScopeMap, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ScopeMap]: + """Creates a scope map for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param scope_map_name: The name of the scope map. Required. + :type scope_map_name: str + :param scope_map_create_parameters: The parameters for creating a scope map. Required. + :type scope_map_create_parameters: ~container_registry_management_client.models.ScopeMap + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ScopeMap + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.ScopeMap] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + registry_name: str, + scope_map_name: str, + scope_map_create_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ScopeMap]: + """Creates a scope map for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param scope_map_name: The name of the scope map. Required. + :type scope_map_name: str + :param scope_map_create_parameters: The parameters for creating a scope map. Required. + :type scope_map_create_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ScopeMap + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.ScopeMap] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create( + self, + resource_group_name: str, + registry_name: str, + scope_map_name: str, + scope_map_create_parameters: Union[_models.ScopeMap, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.ScopeMap]: + """Creates a scope map for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param scope_map_name: The name of the scope map. Required. + :type scope_map_name: str + :param scope_map_create_parameters: The parameters for creating a scope map. Is either a + ScopeMap type or a IO[bytes] type. Required. + :type scope_map_create_parameters: ~container_registry_management_client.models.ScopeMap or + IO[bytes] + :return: An instance of AsyncLROPoller that returns ScopeMap + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.ScopeMap] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ScopeMap] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + scope_map_name=scope_map_name, + scope_map_create_parameters=scope_map_create_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("ScopeMap", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.ScopeMap].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ScopeMap]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + registry_name: str, + scope_map_name: str, + scope_map_update_parameters: Union[_models.ScopeMapUpdateParameters, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(scope_map_update_parameters, (IOBase, bytes)): + _content = scope_map_update_parameters + else: + _json = self._serialize.body(scope_map_update_parameters, "ScopeMapUpdateParameters") + + _request = build_scope_maps_update_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + scope_map_name=scope_map_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + registry_name: str, + scope_map_name: str, + scope_map_update_parameters: _models.ScopeMapUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ScopeMap]: + """Updates a scope map with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param scope_map_name: The name of the scope map. Required. + :type scope_map_name: str + :param scope_map_update_parameters: The parameters for updating a scope map. Required. + :type scope_map_update_parameters: + ~container_registry_management_client.models.ScopeMapUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ScopeMap + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.ScopeMap] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + registry_name: str, + scope_map_name: str, + scope_map_update_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ScopeMap]: + """Updates a scope map with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param scope_map_name: The name of the scope map. Required. + :type scope_map_name: str + :param scope_map_update_parameters: The parameters for updating a scope map. Required. + :type scope_map_update_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ScopeMap + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.ScopeMap] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + registry_name: str, + scope_map_name: str, + scope_map_update_parameters: Union[_models.ScopeMapUpdateParameters, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.ScopeMap]: + """Updates a scope map with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param scope_map_name: The name of the scope map. Required. + :type scope_map_name: str + :param scope_map_update_parameters: The parameters for updating a scope map. Is either a + ScopeMapUpdateParameters type or a IO[bytes] type. Required. + :type scope_map_update_parameters: + ~container_registry_management_client.models.ScopeMapUpdateParameters or IO[bytes] + :return: An instance of AsyncLROPoller that returns ScopeMap + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.ScopeMap] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ScopeMap] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + scope_map_name=scope_map_name, + scope_map_update_parameters=scope_map_update_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("ScopeMap", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.ScopeMap].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ScopeMap]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, registry_name: str, scope_map_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_scope_maps_delete_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + scope_map_name=scope_map_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, registry_name: str, scope_map_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a scope map from a container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param scope_map_name: The name of the scope map. Required. + :type scope_map_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + scope_map_name=scope_map_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + +class TokensOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~container_registry_management_client.aio.ContainerRegistryManagementClient`'s + :attr:`tokens` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerRegistryManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> AsyncItemPaged["_models.Token"]: + """Lists all the tokens for the specified container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :return: An iterator like instance of Token + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~container_registry_management_client.models.Token] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models._models.TokenListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_tokens_list_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + + return _request + + async def extract_data(pipeline_response): + deserialized = self._deserialize( + _models._models.TokenListResult, pipeline_response # pylint: disable=protected-access + ) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def get(self, resource_group_name: str, registry_name: str, token_name: str, **kwargs: Any) -> _models.Token: + """Gets the properties of the specified token. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param token_name: The name of the token. Required. + :type token_name: str + :return: Token + :rtype: ~container_registry_management_client.models.Token + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Token] = kwargs.pop("cls", None) + + _request = build_tokens_get_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + token_name=token_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("Token", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + registry_name: str, + token_name: str, + token_create_parameters: Union[_models.Token, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(token_create_parameters, (IOBase, bytes)): + _content = token_create_parameters + else: + _json = self._serialize.body(token_create_parameters, "Token") + + _request = build_tokens_create_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + token_name=token_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + registry_name: str, + token_name: str, + token_create_parameters: _models.Token, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Token]: + """Creates a token for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param token_name: The name of the token. Required. + :type token_name: str + :param token_create_parameters: The parameters for creating a token. Required. + :type token_create_parameters: ~container_registry_management_client.models.Token + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Token + :rtype: ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Token] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + registry_name: str, + token_name: str, + token_create_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Token]: + """Creates a token for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param token_name: The name of the token. Required. + :type token_name: str + :param token_create_parameters: The parameters for creating a token. Required. + :type token_create_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Token + :rtype: ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Token] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create( + self, + resource_group_name: str, + registry_name: str, + token_name: str, + token_create_parameters: Union[_models.Token, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.Token]: + """Creates a token for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param token_name: The name of the token. Required. + :type token_name: str + :param token_create_parameters: The parameters for creating a token. Is either a Token type or + a IO[bytes] type. Required. + :type token_create_parameters: ~container_registry_management_client.models.Token or IO[bytes] + :return: An instance of AsyncLROPoller that returns Token + :rtype: ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Token] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Token] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + token_name=token_name, + token_create_parameters=token_create_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("Token", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.Token].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.Token]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + registry_name: str, + token_name: str, + token_update_parameters: Union[_models.TokenUpdateParameters, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(token_update_parameters, (IOBase, bytes)): + _content = token_update_parameters + else: + _json = self._serialize.body(token_update_parameters, "TokenUpdateParameters") + + _request = build_tokens_update_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + token_name=token_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + registry_name: str, + token_name: str, + token_update_parameters: _models.TokenUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Token]: + """Updates a token with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param token_name: The name of the token. Required. + :type token_name: str + :param token_update_parameters: The parameters for updating a token. Required. + :type token_update_parameters: + ~container_registry_management_client.models.TokenUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Token + :rtype: ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Token] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + registry_name: str, + token_name: str, + token_update_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Token]: + """Updates a token with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param token_name: The name of the token. Required. + :type token_name: str + :param token_update_parameters: The parameters for updating a token. Required. + :type token_update_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Token + :rtype: ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Token] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + registry_name: str, + token_name: str, + token_update_parameters: Union[_models.TokenUpdateParameters, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.Token]: + """Updates a token with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param token_name: The name of the token. Required. + :type token_name: str + :param token_update_parameters: The parameters for updating a token. Is either a + TokenUpdateParameters type or a IO[bytes] type. Required. + :type token_update_parameters: + ~container_registry_management_client.models.TokenUpdateParameters or IO[bytes] + :return: An instance of AsyncLROPoller that returns Token + :rtype: ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Token] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Token] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + token_name=token_name, + token_update_parameters=token_update_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("Token", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.Token].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.Token]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, registry_name: str, token_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_tokens_delete_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + token_name=token_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, registry_name: str, token_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a token from a container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param token_name: The name of the token. Required. + :type token_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + token_name=token_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + +class WebhooksOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~container_registry_management_client.aio.ContainerRegistryManagementClient`'s + :attr:`webhooks` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerRegistryManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> AsyncItemPaged["_models.Webhook"]: + """Lists all the webhooks for the specified container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :return: An iterator like instance of Webhook + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~container_registry_management_client.models.Webhook] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models._models.WebhookListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_webhooks_list_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + + return _request + + async def extract_data(pipeline_response): + deserialized = self._deserialize( + _models._models.WebhookListResult, pipeline_response # pylint: disable=protected-access + ) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def get( + self, resource_group_name: str, registry_name: str, webhook_name: str, **kwargs: Any + ) -> _models.Webhook: + """Gets the properties of the specified webhook. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param webhook_name: The name of the webhook. Required. + :type webhook_name: str + :return: Webhook + :rtype: ~container_registry_management_client.models.Webhook + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Webhook] = kwargs.pop("cls", None) + + _request = build_webhooks_get_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + webhook_name=webhook_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("Webhook", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + registry_name: str, + webhook_name: str, + webhook_create_parameters: Union[_models.WebhookCreateParameters, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(webhook_create_parameters, (IOBase, bytes)): + _content = webhook_create_parameters + else: + _json = self._serialize.body(webhook_create_parameters, "WebhookCreateParameters") + + _request = build_webhooks_create_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + webhook_name=webhook_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create( + self, + resource_group_name: str, + registry_name: str, + webhook_name: str, + webhook_create_parameters: _models.WebhookCreateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Webhook]: + """Creates a webhook for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param webhook_name: The name of the webhook. Required. + :type webhook_name: str + :param webhook_create_parameters: The parameters for creating a webhook. Required. + :type webhook_create_parameters: + ~container_registry_management_client.models.WebhookCreateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Webhook + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Webhook] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + registry_name: str, + webhook_name: str, + webhook_create_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Webhook]: + """Creates a webhook for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param webhook_name: The name of the webhook. Required. + :type webhook_name: str + :param webhook_create_parameters: The parameters for creating a webhook. Required. + :type webhook_create_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Webhook + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Webhook] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create( + self, + resource_group_name: str, + registry_name: str, + webhook_name: str, + webhook_create_parameters: Union[_models.WebhookCreateParameters, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.Webhook]: + """Creates a webhook for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param webhook_name: The name of the webhook. Required. + :type webhook_name: str + :param webhook_create_parameters: The parameters for creating a webhook. Is either a + WebhookCreateParameters type or a IO[bytes] type. Required. + :type webhook_create_parameters: + ~container_registry_management_client.models.WebhookCreateParameters or IO[bytes] + :return: An instance of AsyncLROPoller that returns Webhook + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Webhook] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Webhook] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + webhook_name=webhook_name, + webhook_create_parameters=webhook_create_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("Webhook", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.Webhook].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.Webhook]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + registry_name: str, + webhook_name: str, + webhook_update_parameters: Union[_models.WebhookUpdateParameters, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(webhook_update_parameters, (IOBase, bytes)): + _content = webhook_update_parameters + else: + _json = self._serialize.body(webhook_update_parameters, "WebhookUpdateParameters") + + _request = build_webhooks_update_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + webhook_name=webhook_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + registry_name: str, + webhook_name: str, + webhook_update_parameters: _models.WebhookUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Webhook]: + """Updates a webhook with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param webhook_name: The name of the webhook. Required. + :type webhook_name: str + :param webhook_update_parameters: The parameters for updating a webhook. Required. + :type webhook_update_parameters: + ~container_registry_management_client.models.WebhookUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Webhook + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Webhook] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + registry_name: str, + webhook_name: str, + webhook_update_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Webhook]: + """Updates a webhook with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param webhook_name: The name of the webhook. Required. + :type webhook_name: str + :param webhook_update_parameters: The parameters for updating a webhook. Required. + :type webhook_update_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Webhook + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Webhook] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + registry_name: str, + webhook_name: str, + webhook_update_parameters: Union[_models.WebhookUpdateParameters, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.Webhook]: + """Updates a webhook with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param webhook_name: The name of the webhook. Required. + :type webhook_name: str + :param webhook_update_parameters: The parameters for updating a webhook. Is either a + WebhookUpdateParameters type or a IO[bytes] type. Required. + :type webhook_update_parameters: + ~container_registry_management_client.models.WebhookUpdateParameters or IO[bytes] + :return: An instance of AsyncLROPoller that returns Webhook + :rtype: + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Webhook] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Webhook] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + webhook_name=webhook_name, + webhook_update_parameters=webhook_update_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("Webhook", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.Webhook].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.Webhook]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, registry_name: str, webhook_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_webhooks_delete_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + webhook_name=webhook_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, registry_name: str, webhook_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a webhook from a container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param webhook_name: The name of the webhook. Required. + :type webhook_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + webhook_name=webhook_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace_async + async def get_callback_config( + self, resource_group_name: str, registry_name: str, webhook_name: str, **kwargs: Any + ) -> _models.CallbackConfig: + """Gets the configuration of service URI and custom headers for the webhook. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param webhook_name: The name of the webhook. Required. + :type webhook_name: str + :return: CallbackConfig + :rtype: ~container_registry_management_client.models.CallbackConfig + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.CallbackConfig] = kwargs.pop("cls", None) + + _request = build_webhooks_get_callback_config_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + webhook_name=webhook_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("CallbackConfig", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_events( + self, resource_group_name: str, registry_name: str, webhook_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.Event"]: + """Lists recent events for the specified webhook. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param webhook_name: The name of the webhook. Required. + :type webhook_name: str + :return: An iterator like instance of Event + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~container_registry_management_client.models.Event] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models._models.EventListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_webhooks_list_events_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + webhook_name=webhook_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + + return _request + + async def extract_data(pipeline_response): + deserialized = self._deserialize( + _models._models.EventListResult, pipeline_response # pylint: disable=protected-access + ) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def ping( + self, resource_group_name: str, registry_name: str, webhook_name: str, **kwargs: Any + ) -> _models.EventInfo: + """Triggers a ping event to be sent to the webhook. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param webhook_name: The name of the webhook. Required. + :type webhook_name: str + :return: EventInfo + :rtype: ~container_registry_management_client.models.EventInfo + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.EventInfo] = kwargs.pop("cls", None) + + _request = build_webhooks_ping_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + webhook_name=webhook_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("EventInfo", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/aio/operations/_patch.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/aio/operations/_patch.py new file mode 100644 index 00000000000..87676c65a8f --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/aio/operations/_patch.py @@ -0,0 +1,21 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" + + +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/models/__init__.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/models/__init__.py new file mode 100644 index 00000000000..14bbdf73dcd --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/models/__init__.py @@ -0,0 +1,386 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.8, generator: @autorest/python@6.49.1) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position + +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models import ( # type: ignore + ActivationProperties, + Actor, + Archive, + ArchivePackageSourceProperties, + ArchiveProperties, + ArchiveUpdateParameters, + ArchiveUpdateProperties, + ArchiveVersion, + ArchiveVersionProperties, + AuthCredential, + AzureADAuthenticationAsArmPolicy, + CacheRule, + CacheRuleProperties, + CacheRuleUpdateParameters, + CacheRuleUpdateProperties, + CallbackConfig, + ConnectedRegistry, + ConnectedRegistryProperties, + ConnectedRegistryUpdateParameters, + ConnectedRegistryUpdateProperties, + CredentialHealth, + CredentialSet, + CredentialSetProperties, + CredentialSetUpdateParameters, + CredentialSetUpdateProperties, + DebianArchivePackageSourceProperties, + DebianArchiveProperties, + EncryptionProperty, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, + Event, + EventContent, + EventInfo, + EventRequestMessage, + EventResponseMessage, + ExportPipeline, + ExportPipelineProperties, + ExportPipelineTargetProperties, + ExportPolicy, + GarbageCollectionProperties, + GenerateCredentialsParameters, + GenerateCredentialsResult, + IPRule, + IdentityProperties, + ImportImageParameters, + ImportPipeline, + ImportPipelineProperties, + ImportPipelineSourceProperties, + ImportSource, + ImportSourceCredentials, + KeyVaultProperties, + LoggingProperties, + LoginServerProperties, + NetworkRuleSet, + OperationDefinition, + OperationDisplayDefinition, + OperationLogSpecificationDefinition, + OperationMetricSpecificationDefinition, + OperationPropertiesDefinition, + OperationServiceSpecificationDefinition, + ParentProperties, + PipelineRun, + PipelineRunProperties, + PipelineRunRequest, + PipelineRunResponse, + PipelineRunSourceProperties, + PipelineRunTargetProperties, + PipelineSourceTriggerDescriptor, + PipelineSourceTriggerProperties, + PipelineTriggerDescriptor, + PipelineTriggerProperties, + Policies, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionProperties, + PrivateLinkResource, + PrivateLinkResourceProperties, + PrivateLinkServiceConnectionState, + ProgressProperties, + ProxyResource, + QuarantinePolicy, + RegenerateCredentialParameters, + Registry, + RegistryListCredentialsResult, + RegistryNameCheckRequest, + RegistryNameStatus, + RegistryPassword, + RegistryProperties, + RegistryPropertiesUpdateParameters, + RegistrySyncResult, + RegistryUpdateParameters, + RegistryUsage, + RegistryUsageListResult, + Replication, + ReplicationProperties, + ReplicationUpdateParameters, + ReplicationUpdateParametersProperties, + Request, + Resource, + RetentionPolicy, + ScopeMap, + ScopeMapProperties, + ScopeMapPropertiesUpdateParameters, + ScopeMapUpdateParameters, + Sku, + SoftDeletePolicy, + Source, + Status, + StatusDetailProperties, + SyncProperties, + SyncUpdateProperties, + SystemData, + Target, + TlsCertificateProperties, + TlsProperties, + Token, + TokenCertificate, + TokenCredentialsProperties, + TokenPassword, + TokenProperties, + TokenUpdateParameters, + TokenUpdateProperties, + TrackedResource, + TrustPolicy, + UserIdentityProperties, + Webhook, + WebhookCreateParameters, + WebhookProperties, + WebhookPropertiesCreateParameters, + WebhookPropertiesUpdateParameters, + WebhookUpdateParameters, +) + +from ._enums import ( # type: ignore + Action, + ActionsRequired, + ActivationStatus, + AuditLogStatus, + AutoGeneratedDomainNameLabelScope, + AzureADAuthenticationAsArmPolicyStatus, + CertificateType, + ConnectedRegistryMode, + ConnectionState, + ConnectionStatus, + CreatedByType, + CredentialHealthStatus, + CredentialName, + DefaultAction, + EncryptionStatus, + EndpointProtocol, + ExportPolicyStatus, + ImportMode, + LogLevel, + MetadataSearch, + NetworkRuleBypassOptions, + PackageSourceType, + PasswordName, + PipelineOptions, + PipelineRunSourceType, + PipelineRunTargetType, + PipelineSourceType, + PolicyStatus, + ProvisioningState, + PublicNetworkAccess, + RegionalEndpoints, + RegistryUsageUnit, + ResourceIdentityType, + RoleAssignmentMode, + SkuName, + SkuTier, + StorageAccessMode, + SyncState, + SyncTrigger, + TlsStatus, + TokenCertificateName, + TokenPasswordName, + TokenStatus, + TriggerStatus, + TrustPolicyType, + WebhookAction, + WebhookStatus, + ZoneRedundancy, +) +from ._patch import __all__ as _patch_all +from ._patch import * +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "ActivationProperties", + "Actor", + "Archive", + "ArchivePackageSourceProperties", + "ArchiveProperties", + "ArchiveUpdateParameters", + "ArchiveUpdateProperties", + "ArchiveVersion", + "ArchiveVersionProperties", + "AuthCredential", + "AzureADAuthenticationAsArmPolicy", + "CacheRule", + "CacheRuleProperties", + "CacheRuleUpdateParameters", + "CacheRuleUpdateProperties", + "CallbackConfig", + "ConnectedRegistry", + "ConnectedRegistryProperties", + "ConnectedRegistryUpdateParameters", + "ConnectedRegistryUpdateProperties", + "CredentialHealth", + "CredentialSet", + "CredentialSetProperties", + "CredentialSetUpdateParameters", + "CredentialSetUpdateProperties", + "DebianArchivePackageSourceProperties", + "DebianArchiveProperties", + "EncryptionProperty", + "ErrorAdditionalInfo", + "ErrorDetail", + "ErrorResponse", + "Event", + "EventContent", + "EventInfo", + "EventRequestMessage", + "EventResponseMessage", + "ExportPipeline", + "ExportPipelineProperties", + "ExportPipelineTargetProperties", + "ExportPolicy", + "GarbageCollectionProperties", + "GenerateCredentialsParameters", + "GenerateCredentialsResult", + "IPRule", + "IdentityProperties", + "ImportImageParameters", + "ImportPipeline", + "ImportPipelineProperties", + "ImportPipelineSourceProperties", + "ImportSource", + "ImportSourceCredentials", + "KeyVaultProperties", + "LoggingProperties", + "LoginServerProperties", + "NetworkRuleSet", + "OperationDefinition", + "OperationDisplayDefinition", + "OperationLogSpecificationDefinition", + "OperationMetricSpecificationDefinition", + "OperationPropertiesDefinition", + "OperationServiceSpecificationDefinition", + "ParentProperties", + "PipelineRun", + "PipelineRunProperties", + "PipelineRunRequest", + "PipelineRunResponse", + "PipelineRunSourceProperties", + "PipelineRunTargetProperties", + "PipelineSourceTriggerDescriptor", + "PipelineSourceTriggerProperties", + "PipelineTriggerDescriptor", + "PipelineTriggerProperties", + "Policies", + "PrivateEndpoint", + "PrivateEndpointConnection", + "PrivateEndpointConnectionProperties", + "PrivateLinkResource", + "PrivateLinkResourceProperties", + "PrivateLinkServiceConnectionState", + "ProgressProperties", + "ProxyResource", + "QuarantinePolicy", + "RegenerateCredentialParameters", + "Registry", + "RegistryListCredentialsResult", + "RegistryNameCheckRequest", + "RegistryNameStatus", + "RegistryPassword", + "RegistryProperties", + "RegistryPropertiesUpdateParameters", + "RegistrySyncResult", + "RegistryUpdateParameters", + "RegistryUsage", + "RegistryUsageListResult", + "Replication", + "ReplicationProperties", + "ReplicationUpdateParameters", + "ReplicationUpdateParametersProperties", + "Request", + "Resource", + "RetentionPolicy", + "ScopeMap", + "ScopeMapProperties", + "ScopeMapPropertiesUpdateParameters", + "ScopeMapUpdateParameters", + "Sku", + "SoftDeletePolicy", + "Source", + "Status", + "StatusDetailProperties", + "SyncProperties", + "SyncUpdateProperties", + "SystemData", + "Target", + "TlsCertificateProperties", + "TlsProperties", + "Token", + "TokenCertificate", + "TokenCredentialsProperties", + "TokenPassword", + "TokenProperties", + "TokenUpdateParameters", + "TokenUpdateProperties", + "TrackedResource", + "TrustPolicy", + "UserIdentityProperties", + "Webhook", + "WebhookCreateParameters", + "WebhookProperties", + "WebhookPropertiesCreateParameters", + "WebhookPropertiesUpdateParameters", + "WebhookUpdateParameters", + "Action", + "ActionsRequired", + "ActivationStatus", + "AuditLogStatus", + "AutoGeneratedDomainNameLabelScope", + "AzureADAuthenticationAsArmPolicyStatus", + "CertificateType", + "ConnectedRegistryMode", + "ConnectionState", + "ConnectionStatus", + "CreatedByType", + "CredentialHealthStatus", + "CredentialName", + "DefaultAction", + "EncryptionStatus", + "EndpointProtocol", + "ExportPolicyStatus", + "ImportMode", + "LogLevel", + "MetadataSearch", + "NetworkRuleBypassOptions", + "PackageSourceType", + "PasswordName", + "PipelineOptions", + "PipelineRunSourceType", + "PipelineRunTargetType", + "PipelineSourceType", + "PolicyStatus", + "ProvisioningState", + "PublicNetworkAccess", + "RegionalEndpoints", + "RegistryUsageUnit", + "ResourceIdentityType", + "RoleAssignmentMode", + "SkuName", + "SkuTier", + "StorageAccessMode", + "SyncState", + "SyncTrigger", + "TlsStatus", + "TokenCertificateName", + "TokenPasswordName", + "TokenStatus", + "TriggerStatus", + "TrustPolicyType", + "WebhookAction", + "WebhookStatus", + "ZoneRedundancy", +] +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore +_patch_sdk() diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/models/_enums.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/models/_enums.py new file mode 100644 index 00000000000..484cf43c57e --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/models/_enums.py @@ -0,0 +1,391 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.8, generator: @autorest/python@6.49.1) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum +from azure.core import CaseInsensitiveEnumMeta + + +class Action(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The action of IP ACL rule.""" + + ALLOW = "Allow" + + +class ActionsRequired(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """A message indicating if changes on the service provider require any updates on the consumer.""" + + NONE = "None" + RECREATE = "Recreate" + + +class ActivationStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The activation status of the connected registry.""" + + ACTIVE = "Active" + INACTIVE = "Inactive" + + +class AuditLogStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Indicates whether audit logs are enabled on the connected registry.""" + + ENABLED = "Enabled" + DISABLED = "Disabled" + + +class AutoGeneratedDomainNameLabelScope(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The auto generated domain name label of the container registry. This value defaults to + "Unsecure". + """ + + UNSECURE = "Unsecure" + TENANT_REUSE = "TenantReuse" + SUBSCRIPTION_REUSE = "SubscriptionReuse" + RESOURCE_GROUP_REUSE = "ResourceGroupReuse" + NO_REUSE = "NoReuse" + + +class AzureADAuthenticationAsArmPolicyStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The value that indicates whether the policy is enabled or not.""" + + ENABLED = "enabled" + DISABLED = "disabled" + + +class CertificateType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The type of certificate location.""" + + LOCAL_DIRECTORY = "LocalDirectory" + + +class ConnectedRegistryMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The mode of the connected registry resource that indicates the permissions of the registry.""" + + READ_WRITE = "ReadWrite" + READ_ONLY = "ReadOnly" + REGISTRY = "Registry" + MIRROR = "Mirror" + + +class ConnectionState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The current connection state of the connected registry.""" + + ONLINE = "Online" + OFFLINE = "Offline" + SYNCING = "Syncing" + UNHEALTHY = "Unhealthy" + + +class ConnectionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The private link service connection status.""" + + APPROVED = "Approved" + PENDING = "Pending" + REJECTED = "Rejected" + DISCONNECTED = "Disconnected" + + +class CreatedByType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The type of identity that created the resource.""" + + USER = "User" + APPLICATION = "Application" + MANAGED_IDENTITY = "ManagedIdentity" + KEY = "Key" + + +class CredentialHealthStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The health status of credential.""" + + HEALTHY = "Healthy" + UNHEALTHY = "Unhealthy" + + +class CredentialName(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The name of the credential.""" + + CREDENTIAL1 = "Credential1" + + +class DefaultAction(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The default action of allow or deny when no other rules match.""" + + ALLOW = "Allow" + DENY = "Deny" + + +class EncryptionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Indicates whether or not the encryption is enabled for container registry.""" + + ENABLED = "enabled" + DISABLED = "disabled" + + +class EndpointProtocol(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The connectivity protocol for the registry.""" + + I_PV4 = "IPv4" + """IPv4 connectivity only""" + I_PV4_AND_I_PV6 = "IPv4AndIPv6" + """IPv4 and IPv6 (dual stack) connectivity""" + + +class ExportPolicyStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The value that indicates whether the policy is enabled or not.""" + + ENABLED = "enabled" + DISABLED = "disabled" + + +class ImportMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """When Force, any existing target tags will be overwritten. When NoForce, any existing target + tags will fail the operation before any copying begins. + """ + + NO_FORCE = "NoForce" + FORCE = "Force" + + +class LogLevel(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The verbosity of logs persisted on the connected registry.""" + + DEBUG = "Debug" + INFORMATION = "Information" + WARNING = "Warning" + ERROR = "Error" + NONE = "None" + + +class MetadataSearch(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Determines whether registry artifacts are indexed for metadata search.""" + + ENABLED = "Enabled" + DISABLED = "Disabled" + + +class NetworkRuleBypassOptions(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Whether to allow trusted Azure services to access a network restricted registry.""" + + AZURE_SERVICES = "AzureServices" + NONE = "None" + + +class PackageSourceType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The type of package source for a archive.""" + + REMOTE = "remote" + + +class PasswordName(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The password name.""" + + PASSWORD = "password" + PASSWORD2 = "password2" + + +class PipelineOptions(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """PipelineOptions.""" + + OVERWRITE_TAGS = "OverwriteTags" + OVERWRITE_BLOBS = "OverwriteBlobs" + DELETE_SOURCE_BLOB_ON_SUCCESS = "DeleteSourceBlobOnSuccess" + CONTINUE_ON_ERRORS = "ContinueOnErrors" + + +class PipelineRunSourceType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The type of the source.""" + + AZURE_STORAGE_BLOB = "AzureStorageBlob" + + +class PipelineRunTargetType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The type of the target.""" + + AZURE_STORAGE_BLOB = "AzureStorageBlob" + + +class PipelineSourceType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The type of source for the import pipeline.""" + + AZURE_STORAGE_BLOB_CONTAINER = "AzureStorageBlobContainer" + + +class PolicyStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The value that indicates whether the policy is enabled or not.""" + + ENABLED = "enabled" + DISABLED = "disabled" + + +class ProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The provisioning state of the archive at the time the operation was called.""" + + CREATING = "Creating" + UPDATING = "Updating" + DELETING = "Deleting" + SUCCEEDED = "Succeeded" + FAILED = "Failed" + CANCELED = "Canceled" + + +class PublicNetworkAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Whether or not public network access is allowed for the container registry.""" + + ENABLED = "Enabled" + DISABLED = "Disabled" + + +class RegionalEndpoints(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Whether or not per-region endpoints are enabled for accessing the registry.""" + + ENABLED = "Enabled" + """Regional endpoints are enabled.""" + DISABLED = "Disabled" + """Regional endpoints are disabled.""" + + +class RegistryUsageUnit(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The unit of measurement.""" + + COUNT = "Count" + BYTES = "Bytes" + + +class ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The identity type.""" + + SYSTEM_ASSIGNED = "SystemAssigned" + USER_ASSIGNED = "UserAssigned" + SYSTEM_ASSIGNED_USER_ASSIGNED = "SystemAssigned, UserAssigned" + NONE = "None" + + +class RoleAssignmentMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Determines registry role assignment mode.""" + + ABAC_REPOSITORY_PERMISSIONS = "AbacRepositoryPermissions" + LEGACY_REGISTRY_PERMISSIONS = "LegacyRegistryPermissions" + + +class SkuName(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The SKU name of the container registry. Required for registry creation.""" + + CLASSIC = "Classic" + BASIC = "Basic" + STANDARD = "Standard" + PREMIUM = "Premium" + + +class SkuTier(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The SKU tier based on the SKU name.""" + + CLASSIC = "Classic" + BASIC = "Basic" + STANDARD = "Standard" + PREMIUM = "Premium" + + +class StorageAccessMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The storage access mode used for the customer storage account.""" + + MANAGED_IDENTITY = "ManagedIdentity" + """Managed Identity access mode""" + SAS_TOKEN = "SasToken" + """SAS Token access mode""" + + +class SyncState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The action that triggered the most recent registry sync.""" + + NOT_ACTIVATED = "NotActivated" + """Connected Registry is not activated""" + SYNCING = "Syncing" + """Connected Registry is syncing""" + FAILED = "Failed" + """Connected Registry sync failed""" + SUCCEEDED = "Succeeded" + """Connected Registry sync succeeded""" + TIMED_OUT = "TimedOut" + """Connected Registry sync timed out""" + PENDING = "Pending" + """Connected Registry sync is pending""" + + +class SyncTrigger(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The status of the connected registry's most recent sync.""" + + SYNC_TOKEN_UPDATE = "SyncTokenUpdate" + """Connected Registry sync was triggered by a sync token update""" + INITIAL_SYNC = "InitialSync" + """Connected Registry sync was triggered by an initial sync during activation""" + MANUAL_RESYNC = "ManualResync" + """Connected Registry sync was triggered by a manual resync request""" + RECOVERY_SERVICE = "RecoveryService" + """Connected Registry sync was triggered by the Connected Registry's recovery service""" + + +class TlsStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Indicates whether HTTPS is enabled for the login server.""" + + ENABLED = "Enabled" + DISABLED = "Disabled" + + +class TokenCertificateName(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """TokenCertificateName.""" + + CERTIFICATE1 = "certificate1" + CERTIFICATE2 = "certificate2" + + +class TokenPasswordName(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The password name "password1" or "password2".""" + + PASSWORD1 = "password1" + PASSWORD2 = "password2" + + +class TokenStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The status of the token example enabled or disabled.""" + + ENABLED = "enabled" + DISABLED = "disabled" + + +class TriggerStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The current status of the source trigger.""" + + ENABLED = "Enabled" + DISABLED = "Disabled" + + +class TrustPolicyType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The type of trust policy.""" + + NOTARY = "Notary" + + +class WebhookAction(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """WebhookAction.""" + + PUSH = "push" + DELETE = "delete" + QUARANTINE = "quarantine" + CHART_PUSH = "chart_push" + CHART_DELETE = "chart_delete" + + +class WebhookStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The status of the webhook at the time the operation was called.""" + + ENABLED = "enabled" + DISABLED = "disabled" + + +class ZoneRedundancy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Whether or not zone redundancy is enabled for this container registry.""" + + ENABLED = "Enabled" + DISABLED = "Disabled" diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/models/_models.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/models/_models.py new file mode 100644 index 00000000000..04aaf762676 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/models/_models.py @@ -0,0 +1,6514 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.8, generator: @autorest/python@6.49.1) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from collections.abc import MutableMapping +import datetime +from typing import Any, Optional, TYPE_CHECKING, Union + +from .._utils import serialization as _serialization + +if TYPE_CHECKING: + from .. import models as _models +JSON = MutableMapping[str, Any] + + +class ActivationProperties(_serialization.Model): + """The activation properties of the connected registry. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar status: The activation status of the connected registry. Known values are: "Active" and + "Inactive". + :vartype status: str or ~container_registry_management_client.models.ActivationStatus + """ + + _validation = { + "status": {"readonly": True}, + } + + _attribute_map = { + "status": {"key": "status", "type": "str"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.status: Optional[Union[str, "_models.ActivationStatus"]] = None + + +class Actor(_serialization.Model): + """The agent that initiated the event. For most situations, this could be from the authorization + context of the request. + + :ivar name: The subject or username associated with the request context that generated the + event. + :vartype name: str + """ + + _attribute_map = { + "name": {"key": "name", "type": "str"}, + } + + def __init__(self, *, name: Optional[str] = None, **kwargs: Any) -> None: + """ + :keyword name: The subject or username associated with the request context that generated the + event. + :paramtype name: str + """ + super().__init__(**kwargs) + self.name = name + + +class Resource(_serialization.Model): + """Common fields that are returned in the response for all Azure Resource Manager resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. E.g. + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~container_registry_management_client.models.SystemData + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.id: Optional[str] = None + self.name: Optional[str] = None + self.type: Optional[str] = None + self.system_data: Optional["_models.SystemData"] = None + + +class ProxyResource(Resource): + """The resource model definition for a Azure Resource Manager proxy resource. It will not have + tags and a location. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. E.g. + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~container_registry_management_client.models.SystemData + """ + + +class Archive(ProxyResource): + """An object that represents a archive for a container registry. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. E.g. + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~container_registry_management_client.models.SystemData + :ivar properties: The properties of the archive. + :vartype properties: ~container_registry_management_client.models.ArchiveProperties + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "ArchiveProperties"}, + } + + def __init__(self, *, properties: Optional["_models.ArchiveProperties"] = None, **kwargs: Any) -> None: + """ + :keyword properties: The properties of the archive. + :paramtype properties: ~container_registry_management_client.models.ArchiveProperties + """ + super().__init__(**kwargs) + self.properties = properties + + +class ArchiveListResult(_serialization.Model): + """The result of a request to list archives for a container registry. + + :ivar value: The list of archives. Since this list may be incomplete, the nextLink field should + be used to request the next list of archives. + :vartype value: list[~container_registry_management_client.models.Archive] + :ivar next_link: The URI that can be used to request the next list of archives. + :vartype next_link: str + """ + + _attribute_map = { + "value": {"key": "value", "type": "[Archive]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__( + self, *, value: Optional[list["_models.Archive"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: + """ + :keyword value: The list of archives. Since this list may be incomplete, the nextLink field + should be used to request the next list of archives. + :paramtype value: list[~container_registry_management_client.models.Archive] + :keyword next_link: The URI that can be used to request the next list of archives. + :paramtype next_link: str + """ + super().__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ArchivePackageSourceProperties(_serialization.Model): + """The properties of the archive package source. + + :ivar type: The type of package source for a archive. "remote" + :vartype type: str or ~container_registry_management_client.models.PackageSourceType + :ivar url: The external repository url. + :vartype url: str + """ + + _attribute_map = { + "type": {"key": "type", "type": "str"}, + "url": {"key": "url", "type": "str"}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "_models.PackageSourceType"]] = None, + url: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword type: The type of package source for a archive. "remote" + :paramtype type: str or ~container_registry_management_client.models.PackageSourceType + :keyword url: The external repository url. + :paramtype url: str + """ + super().__init__(**kwargs) + self.type = type + self.url = url + + +class ArchiveProperties(_serialization.Model): + """The properties of a archive. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar package_source: The package source of the archive. + :vartype package_source: + ~container_registry_management_client.models.ArchivePackageSourceProperties + :ivar published_version: The published version of the archive. + :vartype published_version: str + :ivar repository_endpoint_prefix: + :vartype repository_endpoint_prefix: str + :ivar repository_endpoint: + :vartype repository_endpoint: str + :ivar provisioning_state: The provisioning state of the archive at the time the operation was + called. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and + "Canceled". + :vartype provisioning_state: str or + ~container_registry_management_client.models.ProvisioningState + """ + + _validation = { + "repository_endpoint": {"readonly": True}, + "provisioning_state": {"readonly": True}, + } + + _attribute_map = { + "package_source": {"key": "packageSource", "type": "ArchivePackageSourceProperties"}, + "published_version": {"key": "publishedVersion", "type": "str"}, + "repository_endpoint_prefix": {"key": "repositoryEndpointPrefix", "type": "str"}, + "repository_endpoint": {"key": "repositoryEndpoint", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + } + + def __init__( + self, + *, + package_source: Optional["_models.ArchivePackageSourceProperties"] = None, + published_version: Optional[str] = None, + repository_endpoint_prefix: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword package_source: The package source of the archive. + :paramtype package_source: + ~container_registry_management_client.models.ArchivePackageSourceProperties + :keyword published_version: The published version of the archive. + :paramtype published_version: str + :keyword repository_endpoint_prefix: + :paramtype repository_endpoint_prefix: str + """ + super().__init__(**kwargs) + self.package_source = package_source + self.published_version = published_version + self.repository_endpoint_prefix = repository_endpoint_prefix + self.repository_endpoint: Optional[str] = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + + +class ArchiveUpdateParameters(_serialization.Model): + """The parameters for updating a archive. + + :ivar properties: The properties of the connected registry update parameters. + :vartype properties: ~container_registry_management_client.models.ArchiveUpdateProperties + """ + + _attribute_map = { + "properties": {"key": "properties", "type": "ArchiveUpdateProperties"}, + } + + def __init__(self, *, properties: Optional["_models.ArchiveUpdateProperties"] = None, **kwargs: Any) -> None: + """ + :keyword properties: The properties of the connected registry update parameters. + :paramtype properties: ~container_registry_management_client.models.ArchiveUpdateProperties + """ + super().__init__(**kwargs) + self.properties = properties + + +class ArchiveUpdateProperties(_serialization.Model): + """The properties of a archive. + + :ivar published_version: The published version of the archive. + :vartype published_version: str + """ + + _attribute_map = { + "published_version": {"key": "publishedVersion", "type": "str"}, + } + + def __init__(self, *, published_version: Optional[str] = None, **kwargs: Any) -> None: + """ + :keyword published_version: The published version of the archive. + :paramtype published_version: str + """ + super().__init__(**kwargs) + self.published_version = published_version + + +class ArchiveVersion(ProxyResource): + """An object that represents an export pipeline for a container registry. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. E.g. + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~container_registry_management_client.models.SystemData + :ivar properties: The properties of the archive. + :vartype properties: ~container_registry_management_client.models.ArchiveVersionProperties + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "ArchiveVersionProperties"}, + } + + def __init__(self, *, properties: Optional["_models.ArchiveVersionProperties"] = None, **kwargs: Any) -> None: + """ + :keyword properties: The properties of the archive. + :paramtype properties: ~container_registry_management_client.models.ArchiveVersionProperties + """ + super().__init__(**kwargs) + self.properties = properties + + +class ArchiveVersionListResult(_serialization.Model): + """The result of a request to list archive versions for a container registry. + + :ivar value: The list of archive versions. Since this list may be incomplete, the nextLink + field should be used to request the next list of archive versions. + :vartype value: list[~container_registry_management_client.models.ArchiveVersion] + :ivar next_link: The URI that can be used to request the next list of archive versions. + :vartype next_link: str + """ + + _attribute_map = { + "value": {"key": "value", "type": "[ArchiveVersion]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__( + self, *, value: Optional[list["_models.ArchiveVersion"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: + """ + :keyword value: The list of archive versions. Since this list may be incomplete, the nextLink + field should be used to request the next list of archive versions. + :paramtype value: list[~container_registry_management_client.models.ArchiveVersion] + :keyword next_link: The URI that can be used to request the next list of archive versions. + :paramtype next_link: str + """ + super().__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ArchiveVersionProperties(_serialization.Model): + """The properties of an archive version. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar provisioning_state: The provisioning state of the archive at the time the operation was + called. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and + "Canceled". + :vartype provisioning_state: str or + ~container_registry_management_client.models.ProvisioningState + :ivar archive_version_error_message: The detailed error message for the archive version in the + case of failure. + :vartype archive_version_error_message: str + """ + + _validation = { + "provisioning_state": {"readonly": True}, + } + + _attribute_map = { + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "archive_version_error_message": {"key": "archiveVersionErrorMessage", "type": "str"}, + } + + def __init__(self, *, archive_version_error_message: Optional[str] = None, **kwargs: Any) -> None: + """ + :keyword archive_version_error_message: The detailed error message for the archive version in + the case of failure. + :paramtype archive_version_error_message: str + """ + super().__init__(**kwargs) + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + self.archive_version_error_message = archive_version_error_message + + +class AuthCredential(_serialization.Model): + """Authentication credential stored for an upstream. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The name of the credential. "Credential1" + :vartype name: str or ~container_registry_management_client.models.CredentialName + :ivar username_secret_identifier: KeyVault Secret URI for accessing the username. + :vartype username_secret_identifier: str + :ivar password_secret_identifier: KeyVault Secret URI for accessing the password. + :vartype password_secret_identifier: str + :ivar credential_health: This provides data pertaining to the health of the auth credential. + :vartype credential_health: ~container_registry_management_client.models.CredentialHealth + """ + + _validation = { + "credential_health": {"readonly": True}, + } + + _attribute_map = { + "name": {"key": "name", "type": "str"}, + "username_secret_identifier": {"key": "usernameSecretIdentifier", "type": "str"}, + "password_secret_identifier": {"key": "passwordSecretIdentifier", "type": "str"}, + "credential_health": {"key": "credentialHealth", "type": "CredentialHealth"}, + } + + def __init__( + self, + *, + name: Optional[Union[str, "_models.CredentialName"]] = None, + username_secret_identifier: Optional[str] = None, + password_secret_identifier: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword name: The name of the credential. "Credential1" + :paramtype name: str or ~container_registry_management_client.models.CredentialName + :keyword username_secret_identifier: KeyVault Secret URI for accessing the username. + :paramtype username_secret_identifier: str + :keyword password_secret_identifier: KeyVault Secret URI for accessing the password. + :paramtype password_secret_identifier: str + """ + super().__init__(**kwargs) + self.name = name + self.username_secret_identifier = username_secret_identifier + self.password_secret_identifier = password_secret_identifier + self.credential_health: Optional["_models.CredentialHealth"] = None + + +class AzureADAuthenticationAsArmPolicy(_serialization.Model): + """The policy for using Azure Resource Manager audience token for a container registry. + + :ivar status: The value that indicates whether the policy is enabled or not. Known values are: + "enabled" and "disabled". + :vartype status: str or + ~container_registry_management_client.models.AzureADAuthenticationAsArmPolicyStatus + """ + + _attribute_map = { + "status": {"key": "status", "type": "str"}, + } + + def __init__( + self, *, status: Union[str, "_models.AzureADAuthenticationAsArmPolicyStatus"] = "enabled", **kwargs: Any + ) -> None: + """ + :keyword status: The value that indicates whether the policy is enabled or not. Known values + are: "enabled" and "disabled". + :paramtype status: str or + ~container_registry_management_client.models.AzureADAuthenticationAsArmPolicyStatus + """ + super().__init__(**kwargs) + self.status = status + + +class CacheRule(ProxyResource): + """An object that represents a cache rule for a container registry. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. E.g. + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~container_registry_management_client.models.SystemData + :ivar properties: The properties of the cache rule. + :vartype properties: ~container_registry_management_client.models.CacheRuleProperties + :ivar identity: The identity of the cache rule. + :vartype identity: ~container_registry_management_client.models.IdentityProperties + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "CacheRuleProperties"}, + "identity": {"key": "identity", "type": "IdentityProperties"}, + } + + def __init__( + self, + *, + properties: Optional["_models.CacheRuleProperties"] = None, + identity: Optional["_models.IdentityProperties"] = None, + **kwargs: Any + ) -> None: + """ + :keyword properties: The properties of the cache rule. + :paramtype properties: ~container_registry_management_client.models.CacheRuleProperties + :keyword identity: The identity of the cache rule. + :paramtype identity: ~container_registry_management_client.models.IdentityProperties + """ + super().__init__(**kwargs) + self.properties = properties + self.identity = identity + + +class CacheRuleProperties(_serialization.Model): + """The properties of a cache rule. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar credential_set_resource_id: The ARM resource ID of the credential store which is + associated with the cache rule. + :vartype credential_set_resource_id: str + :ivar source_repository: Source repository pulled from upstream. + :vartype source_repository: str + :ivar target_repository: Target repository specified in docker pull command. Eg: docker pull + myregistry.azurecr.io/{targetRepository}:{tag}. + :vartype target_repository: str + :ivar creation_date: The creation date of the cache rule. + :vartype creation_date: ~datetime.datetime + :ivar provisioning_state: Provisioning state of the resource. Known values are: "Creating", + "Updating", "Deleting", "Succeeded", "Failed", and "Canceled". + :vartype provisioning_state: str or + ~container_registry_management_client.models.ProvisioningState + """ + + _validation = { + "creation_date": {"readonly": True}, + "provisioning_state": {"readonly": True}, + } + + _attribute_map = { + "credential_set_resource_id": {"key": "credentialSetResourceId", "type": "str"}, + "source_repository": {"key": "sourceRepository", "type": "str"}, + "target_repository": {"key": "targetRepository", "type": "str"}, + "creation_date": {"key": "creationDate", "type": "iso-8601"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + } + + def __init__( + self, + *, + credential_set_resource_id: Optional[str] = None, + source_repository: Optional[str] = None, + target_repository: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword credential_set_resource_id: The ARM resource ID of the credential store which is + associated with the cache rule. + :paramtype credential_set_resource_id: str + :keyword source_repository: Source repository pulled from upstream. + :paramtype source_repository: str + :keyword target_repository: Target repository specified in docker pull command. Eg: docker pull + myregistry.azurecr.io/{targetRepository}:{tag}. + :paramtype target_repository: str + """ + super().__init__(**kwargs) + self.credential_set_resource_id = credential_set_resource_id + self.source_repository = source_repository + self.target_repository = target_repository + self.creation_date: Optional[datetime.datetime] = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + + +class CacheRulesListResult(_serialization.Model): + """The result of a request to list cache rules for a container registry. + + :ivar value: The list of cache rules. Since this list may be incomplete, the nextLink field + should be used to request the next list of cache rules. + :vartype value: list[~container_registry_management_client.models.CacheRule] + :ivar next_link: The URI that can be used to request the next list of cache rules. + :vartype next_link: str + """ + + _attribute_map = { + "value": {"key": "value", "type": "[CacheRule]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__( + self, *, value: Optional[list["_models.CacheRule"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: + """ + :keyword value: The list of cache rules. Since this list may be incomplete, the nextLink field + should be used to request the next list of cache rules. + :paramtype value: list[~container_registry_management_client.models.CacheRule] + :keyword next_link: The URI that can be used to request the next list of cache rules. + :paramtype next_link: str + """ + super().__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class CacheRuleUpdateParameters(_serialization.Model): + """The parameters for updating a cache rule. + + :ivar properties: The properties of the cache rule update parameters. + :vartype properties: ~container_registry_management_client.models.CacheRuleUpdateProperties + :ivar identity: The identity of the cache rule. + :vartype identity: ~container_registry_management_client.models.IdentityProperties + """ + + _attribute_map = { + "properties": {"key": "properties", "type": "CacheRuleUpdateProperties"}, + "identity": {"key": "identity", "type": "IdentityProperties"}, + } + + def __init__( + self, + *, + properties: Optional["_models.CacheRuleUpdateProperties"] = None, + identity: Optional["_models.IdentityProperties"] = None, + **kwargs: Any + ) -> None: + """ + :keyword properties: The properties of the cache rule update parameters. + :paramtype properties: ~container_registry_management_client.models.CacheRuleUpdateProperties + :keyword identity: The identity of the cache rule. + :paramtype identity: ~container_registry_management_client.models.IdentityProperties + """ + super().__init__(**kwargs) + self.properties = properties + self.identity = identity + + +class CacheRuleUpdateProperties(_serialization.Model): + """The parameters for updating cache rule properties. + + :ivar credential_set_resource_id: The ARM resource ID of the credential store which is + associated with the Cache rule. + :vartype credential_set_resource_id: str + """ + + _attribute_map = { + "credential_set_resource_id": {"key": "credentialSetResourceId", "type": "str"}, + } + + def __init__(self, *, credential_set_resource_id: Optional[str] = None, **kwargs: Any) -> None: + """ + :keyword credential_set_resource_id: The ARM resource ID of the credential store which is + associated with the Cache rule. + :paramtype credential_set_resource_id: str + """ + super().__init__(**kwargs) + self.credential_set_resource_id = credential_set_resource_id + + +class CallbackConfig(_serialization.Model): + """The configuration of service URI and custom headers for the webhook. + + All required parameters must be populated in order to send to server. + + :ivar service_uri: The service URI for the webhook to post notifications. Required. + :vartype service_uri: str + :ivar custom_headers: Custom headers that will be added to the webhook notifications. + :vartype custom_headers: dict[str, str] + """ + + _validation = { + "service_uri": {"required": True}, + } + + _attribute_map = { + "service_uri": {"key": "serviceUri", "type": "str"}, + "custom_headers": {"key": "customHeaders", "type": "{str}"}, + } + + def __init__(self, *, service_uri: str, custom_headers: Optional[dict[str, str]] = None, **kwargs: Any) -> None: + """ + :keyword service_uri: The service URI for the webhook to post notifications. Required. + :paramtype service_uri: str + :keyword custom_headers: Custom headers that will be added to the webhook notifications. + :paramtype custom_headers: dict[str, str] + """ + super().__init__(**kwargs) + self.service_uri = service_uri + self.custom_headers = custom_headers + + +class ConnectedRegistry(ProxyResource): + """An object that represents a connected registry for a container registry. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. E.g. + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~container_registry_management_client.models.SystemData + :ivar properties: The properties of the connected registry. + :vartype properties: ~container_registry_management_client.models.ConnectedRegistryProperties + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "ConnectedRegistryProperties"}, + } + + def __init__(self, *, properties: Optional["_models.ConnectedRegistryProperties"] = None, **kwargs: Any) -> None: + """ + :keyword properties: The properties of the connected registry. + :paramtype properties: ~container_registry_management_client.models.ConnectedRegistryProperties + """ + super().__init__(**kwargs) + self.properties = properties + + +class ConnectedRegistryListResult(_serialization.Model): + """The result of a request to list connected registries for a container registry. + + :ivar value: The list of connected registries. Since this list may be incomplete, the nextLink + field should be used to request the next list of connected registries. + :vartype value: list[~container_registry_management_client.models.ConnectedRegistry] + :ivar next_link: The URI that can be used to request the next list of connected registries. + :vartype next_link: str + """ + + _attribute_map = { + "value": {"key": "value", "type": "[ConnectedRegistry]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__( + self, + *, + value: Optional[list["_models.ConnectedRegistry"]] = None, + next_link: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword value: The list of connected registries. Since this list may be incomplete, the + nextLink field should be used to request the next list of connected registries. + :paramtype value: list[~container_registry_management_client.models.ConnectedRegistry] + :keyword next_link: The URI that can be used to request the next list of connected registries. + :paramtype next_link: str + """ + super().__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ConnectedRegistryProperties(_serialization.Model): + """The properties of a connected registry. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to server. + + :ivar provisioning_state: Provisioning state of the resource. Known values are: "Creating", + "Updating", "Deleting", "Succeeded", "Failed", and "Canceled". + :vartype provisioning_state: str or + ~container_registry_management_client.models.ProvisioningState + :ivar mode: The mode of the connected registry resource that indicates the permissions of the + registry. Required. Known values are: "ReadWrite", "ReadOnly", "Registry", and "Mirror". + :vartype mode: str or ~container_registry_management_client.models.ConnectedRegistryMode + :ivar version: The current version of ACR runtime on the connected registry. + :vartype version: str + :ivar connection_state: The current connection state of the connected registry. Known values + are: "Online", "Offline", "Syncing", and "Unhealthy". + :vartype connection_state: str or ~container_registry_management_client.models.ConnectionState + :ivar last_activity_time: The last activity time of the connected registry. + :vartype last_activity_time: ~datetime.datetime + :ivar activation: The activation properties of the connected registry. + :vartype activation: ~container_registry_management_client.models.ActivationProperties + :ivar parent: The parent of the connected registry. Required. + :vartype parent: ~container_registry_management_client.models.ParentProperties + :ivar client_token_ids: The list of the ACR token resource IDs used to authenticate clients to + the connected registry. + :vartype client_token_ids: list[str] + :ivar login_server: The login server properties of the connected registry. + :vartype login_server: ~container_registry_management_client.models.LoginServerProperties + :ivar logging: The logging properties of the connected registry. + :vartype logging: ~container_registry_management_client.models.LoggingProperties + :ivar status_details: The list of current statuses of the connected registry. + :vartype status_details: + list[~container_registry_management_client.models.StatusDetailProperties] + :ivar notifications_list: The list of notifications subscription information for the connected + registry. + :vartype notifications_list: list[str] + :ivar garbage_collection: The garbage collection properties of the connected registry. + :vartype garbage_collection: + ~container_registry_management_client.models.GarbageCollectionProperties + :ivar registry_sync_result: The result of the connected registry's most recent sync with its + parent. + :vartype registry_sync_result: ~container_registry_management_client.models.RegistrySyncResult + """ + + _validation = { + "provisioning_state": {"readonly": True}, + "mode": {"required": True}, + "version": {"readonly": True}, + "connection_state": {"readonly": True}, + "last_activity_time": {"readonly": True}, + "activation": {"readonly": True}, + "parent": {"required": True}, + "status_details": {"readonly": True}, + } + + _attribute_map = { + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "mode": {"key": "mode", "type": "str"}, + "version": {"key": "version", "type": "str"}, + "connection_state": {"key": "connectionState", "type": "str"}, + "last_activity_time": {"key": "lastActivityTime", "type": "iso-8601"}, + "activation": {"key": "activation", "type": "ActivationProperties"}, + "parent": {"key": "parent", "type": "ParentProperties"}, + "client_token_ids": {"key": "clientTokenIds", "type": "[str]"}, + "login_server": {"key": "loginServer", "type": "LoginServerProperties"}, + "logging": {"key": "logging", "type": "LoggingProperties"}, + "status_details": {"key": "statusDetails", "type": "[StatusDetailProperties]"}, + "notifications_list": {"key": "notificationsList", "type": "[str]"}, + "garbage_collection": {"key": "garbageCollection", "type": "GarbageCollectionProperties"}, + "registry_sync_result": {"key": "registrySyncResult", "type": "RegistrySyncResult"}, + } + + def __init__( + self, + *, + mode: Union[str, "_models.ConnectedRegistryMode"], + parent: "_models.ParentProperties", + client_token_ids: Optional[list[str]] = None, + login_server: Optional["_models.LoginServerProperties"] = None, + logging: Optional["_models.LoggingProperties"] = None, + notifications_list: Optional[list[str]] = None, + garbage_collection: Optional["_models.GarbageCollectionProperties"] = None, + registry_sync_result: Optional["_models.RegistrySyncResult"] = None, + **kwargs: Any + ) -> None: + """ + :keyword mode: The mode of the connected registry resource that indicates the permissions of + the registry. Required. Known values are: "ReadWrite", "ReadOnly", "Registry", and "Mirror". + :paramtype mode: str or ~container_registry_management_client.models.ConnectedRegistryMode + :keyword parent: The parent of the connected registry. Required. + :paramtype parent: ~container_registry_management_client.models.ParentProperties + :keyword client_token_ids: The list of the ACR token resource IDs used to authenticate clients + to the connected registry. + :paramtype client_token_ids: list[str] + :keyword login_server: The login server properties of the connected registry. + :paramtype login_server: ~container_registry_management_client.models.LoginServerProperties + :keyword logging: The logging properties of the connected registry. + :paramtype logging: ~container_registry_management_client.models.LoggingProperties + :keyword notifications_list: The list of notifications subscription information for the + connected registry. + :paramtype notifications_list: list[str] + :keyword garbage_collection: The garbage collection properties of the connected registry. + :paramtype garbage_collection: + ~container_registry_management_client.models.GarbageCollectionProperties + :keyword registry_sync_result: The result of the connected registry's most recent sync with its + parent. + :paramtype registry_sync_result: + ~container_registry_management_client.models.RegistrySyncResult + """ + super().__init__(**kwargs) + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + self.mode = mode + self.version: Optional[str] = None + self.connection_state: Optional[Union[str, "_models.ConnectionState"]] = None + self.last_activity_time: Optional[datetime.datetime] = None + self.activation: Optional["_models.ActivationProperties"] = None + self.parent = parent + self.client_token_ids = client_token_ids + self.login_server = login_server + self.logging = logging + self.status_details: Optional[list["_models.StatusDetailProperties"]] = None + self.notifications_list = notifications_list + self.garbage_collection = garbage_collection + self.registry_sync_result = registry_sync_result + + +class ConnectedRegistryUpdateParameters(_serialization.Model): + """The parameters for updating a connected registry. + + :ivar properties: The properties of the connected registry update parameters. + :vartype properties: + ~container_registry_management_client.models.ConnectedRegistryUpdateProperties + """ + + _attribute_map = { + "properties": {"key": "properties", "type": "ConnectedRegistryUpdateProperties"}, + } + + def __init__( + self, *, properties: Optional["_models.ConnectedRegistryUpdateProperties"] = None, **kwargs: Any + ) -> None: + """ + :keyword properties: The properties of the connected registry update parameters. + :paramtype properties: + ~container_registry_management_client.models.ConnectedRegistryUpdateProperties + """ + super().__init__(**kwargs) + self.properties = properties + + +class ConnectedRegistryUpdateProperties(_serialization.Model): + """The parameters for updating token properties. + + :ivar sync_properties: The sync properties of the connected registry with its parent. + :vartype sync_properties: ~container_registry_management_client.models.SyncUpdateProperties + :ivar logging: The logging properties of the connected registry. + :vartype logging: ~container_registry_management_client.models.LoggingProperties + :ivar client_token_ids: The list of the ACR token resource IDs used to authenticate clients to + the connected registry. + :vartype client_token_ids: list[str] + :ivar notifications_list: The list of notifications subscription information for the connected + registry. + :vartype notifications_list: list[str] + :ivar garbage_collection: The garbage collection properties of the connected registry. + :vartype garbage_collection: + ~container_registry_management_client.models.GarbageCollectionProperties + """ + + _attribute_map = { + "sync_properties": {"key": "syncProperties", "type": "SyncUpdateProperties"}, + "logging": {"key": "logging", "type": "LoggingProperties"}, + "client_token_ids": {"key": "clientTokenIds", "type": "[str]"}, + "notifications_list": {"key": "notificationsList", "type": "[str]"}, + "garbage_collection": {"key": "garbageCollection", "type": "GarbageCollectionProperties"}, + } + + def __init__( + self, + *, + sync_properties: Optional["_models.SyncUpdateProperties"] = None, + logging: Optional["_models.LoggingProperties"] = None, + client_token_ids: Optional[list[str]] = None, + notifications_list: Optional[list[str]] = None, + garbage_collection: Optional["_models.GarbageCollectionProperties"] = None, + **kwargs: Any + ) -> None: + """ + :keyword sync_properties: The sync properties of the connected registry with its parent. + :paramtype sync_properties: ~container_registry_management_client.models.SyncUpdateProperties + :keyword logging: The logging properties of the connected registry. + :paramtype logging: ~container_registry_management_client.models.LoggingProperties + :keyword client_token_ids: The list of the ACR token resource IDs used to authenticate clients + to the connected registry. + :paramtype client_token_ids: list[str] + :keyword notifications_list: The list of notifications subscription information for the + connected registry. + :paramtype notifications_list: list[str] + :keyword garbage_collection: The garbage collection properties of the connected registry. + :paramtype garbage_collection: + ~container_registry_management_client.models.GarbageCollectionProperties + """ + super().__init__(**kwargs) + self.sync_properties = sync_properties + self.logging = logging + self.client_token_ids = client_token_ids + self.notifications_list = notifications_list + self.garbage_collection = garbage_collection + + +class CredentialHealth(_serialization.Model): + """The health of the auth credential. + + :ivar status: The health status of credential. Known values are: "Healthy" and "Unhealthy". + :vartype status: str or ~container_registry_management_client.models.CredentialHealthStatus + :ivar error_code: Error code representing the health check error. + :vartype error_code: str + :ivar error_message: Descriptive message representing the health check error. + :vartype error_message: str + """ + + _attribute_map = { + "status": {"key": "status", "type": "str"}, + "error_code": {"key": "errorCode", "type": "str"}, + "error_message": {"key": "errorMessage", "type": "str"}, + } + + def __init__( + self, + *, + status: Optional[Union[str, "_models.CredentialHealthStatus"]] = None, + error_code: Optional[str] = None, + error_message: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword status: The health status of credential. Known values are: "Healthy" and "Unhealthy". + :paramtype status: str or ~container_registry_management_client.models.CredentialHealthStatus + :keyword error_code: Error code representing the health check error. + :paramtype error_code: str + :keyword error_message: Descriptive message representing the health check error. + :paramtype error_message: str + """ + super().__init__(**kwargs) + self.status = status + self.error_code = error_code + self.error_message = error_message + + +class CredentialSet(ProxyResource): + """An object that represents a credential set resource for a container registry. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. E.g. + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~container_registry_management_client.models.SystemData + :ivar properties: The properties of the credential set. + :vartype properties: ~container_registry_management_client.models.CredentialSetProperties + :ivar identity: Identities associated with the resource. This is used to access the KeyVault + secrets. + :vartype identity: ~container_registry_management_client.models.IdentityProperties + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "CredentialSetProperties"}, + "identity": {"key": "identity", "type": "IdentityProperties"}, + } + + def __init__( + self, + *, + properties: Optional["_models.CredentialSetProperties"] = None, + identity: Optional["_models.IdentityProperties"] = None, + **kwargs: Any + ) -> None: + """ + :keyword properties: The properties of the credential set. + :paramtype properties: ~container_registry_management_client.models.CredentialSetProperties + :keyword identity: Identities associated with the resource. This is used to access the KeyVault + secrets. + :paramtype identity: ~container_registry_management_client.models.IdentityProperties + """ + super().__init__(**kwargs) + self.properties = properties + self.identity = identity + + +class CredentialSetListResult(_serialization.Model): + """The result of a request to list credential sets for a container registry. + + :ivar value: The list of credential sets. Since this list may be incomplete, the nextLink field + should be used to request the next list of credential sets. + :vartype value: list[~container_registry_management_client.models.CredentialSet] + :ivar next_link: The URI that can be used to request the next list of credential sets. + :vartype next_link: str + """ + + _attribute_map = { + "value": {"key": "value", "type": "[CredentialSet]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__( + self, *, value: Optional[list["_models.CredentialSet"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: + """ + :keyword value: The list of credential sets. Since this list may be incomplete, the nextLink + field should be used to request the next list of credential sets. + :paramtype value: list[~container_registry_management_client.models.CredentialSet] + :keyword next_link: The URI that can be used to request the next list of credential sets. + :paramtype next_link: str + """ + super().__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class CredentialSetProperties(_serialization.Model): + """The properties of a credential set resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar login_server: The credentials are stored for this upstream or login server. + :vartype login_server: str + :ivar auth_credentials: List of authentication credentials stored for an upstream. Usually + consists of a primary and an optional secondary credential. + :vartype auth_credentials: list[~container_registry_management_client.models.AuthCredential] + :ivar creation_date: The creation date of credential store resource. + :vartype creation_date: ~datetime.datetime + :ivar provisioning_state: Provisioning state of the resource. Known values are: "Creating", + "Updating", "Deleting", "Succeeded", "Failed", and "Canceled". + :vartype provisioning_state: str or + ~container_registry_management_client.models.ProvisioningState + """ + + _validation = { + "creation_date": {"readonly": True}, + "provisioning_state": {"readonly": True}, + } + + _attribute_map = { + "login_server": {"key": "loginServer", "type": "str"}, + "auth_credentials": {"key": "authCredentials", "type": "[AuthCredential]"}, + "creation_date": {"key": "creationDate", "type": "iso-8601"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + } + + def __init__( + self, + *, + login_server: Optional[str] = None, + auth_credentials: Optional[list["_models.AuthCredential"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword login_server: The credentials are stored for this upstream or login server. + :paramtype login_server: str + :keyword auth_credentials: List of authentication credentials stored for an upstream. Usually + consists of a primary and an optional secondary credential. + :paramtype auth_credentials: list[~container_registry_management_client.models.AuthCredential] + """ + super().__init__(**kwargs) + self.login_server = login_server + self.auth_credentials = auth_credentials + self.creation_date: Optional[datetime.datetime] = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + + +class CredentialSetUpdateParameters(_serialization.Model): + """The parameters for updating a credential set. + + :ivar properties: The properties of the credential set update parameters. + :vartype properties: ~container_registry_management_client.models.CredentialSetUpdateProperties + :ivar identity: Identities associated with the resource. This is used to access the KeyVault + secrets. + :vartype identity: ~container_registry_management_client.models.IdentityProperties + """ + + _attribute_map = { + "properties": {"key": "properties", "type": "CredentialSetUpdateProperties"}, + "identity": {"key": "identity", "type": "IdentityProperties"}, + } + + def __init__( + self, + *, + properties: Optional["_models.CredentialSetUpdateProperties"] = None, + identity: Optional["_models.IdentityProperties"] = None, + **kwargs: Any + ) -> None: + """ + :keyword properties: The properties of the credential set update parameters. + :paramtype properties: + ~container_registry_management_client.models.CredentialSetUpdateProperties + :keyword identity: Identities associated with the resource. This is used to access the KeyVault + secrets. + :paramtype identity: ~container_registry_management_client.models.IdentityProperties + """ + super().__init__(**kwargs) + self.properties = properties + self.identity = identity + + +class CredentialSetUpdateProperties(_serialization.Model): + """The parameters for updating credential set properties. + + :ivar auth_credentials: List of authentication credentials stored for an upstream. Usually + consists of a primary and an optional secondary credential. + :vartype auth_credentials: list[~container_registry_management_client.models.AuthCredential] + """ + + _attribute_map = { + "auth_credentials": {"key": "authCredentials", "type": "[AuthCredential]"}, + } + + def __init__(self, *, auth_credentials: Optional[list["_models.AuthCredential"]] = None, **kwargs: Any) -> None: + """ + :keyword auth_credentials: List of authentication credentials stored for an upstream. Usually + consists of a primary and an optional secondary credential. + :paramtype auth_credentials: list[~container_registry_management_client.models.AuthCredential] + """ + super().__init__(**kwargs) + self.auth_credentials = auth_credentials + + +class DebianArchivePackageSourceProperties(ArchivePackageSourceProperties): + """The properties of the archive package source. + + :ivar type: The type of package source for a archive. "remote" + :vartype type: str or ~container_registry_management_client.models.PackageSourceType + :ivar url: The external repository url. + :vartype url: str + :ivar distribution_name: Upstream Debian distribution Name. + :vartype distribution_name: str + """ + + _attribute_map = { + "type": {"key": "type", "type": "str"}, + "url": {"key": "url", "type": "str"}, + "distribution_name": {"key": "distributionName", "type": "str"}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "_models.PackageSourceType"]] = None, + url: Optional[str] = None, + distribution_name: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword type: The type of package source for a archive. "remote" + :paramtype type: str or ~container_registry_management_client.models.PackageSourceType + :keyword url: The external repository url. + :paramtype url: str + :keyword distribution_name: Upstream Debian distribution Name. + :paramtype distribution_name: str + """ + super().__init__(type=type, url=url, **kwargs) + self.distribution_name = distribution_name + + +class DebianArchiveProperties(ArchiveProperties): + """The properties of the Debian package Archive. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar package_source: The package source of the archive. + :vartype package_source: + ~container_registry_management_client.models.ArchivePackageSourceProperties + :ivar published_version: The published version of the archive. + :vartype published_version: str + :ivar repository_endpoint_prefix: + :vartype repository_endpoint_prefix: str + :ivar repository_endpoint: + :vartype repository_endpoint: str + :ivar provisioning_state: The provisioning state of the archive at the time the operation was + called. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and + "Canceled". + :vartype provisioning_state: str or + ~container_registry_management_client.models.ProvisioningState + :ivar distribution_name: Debian distribution Name. + :vartype distribution_name: str + """ + + _validation = { + "repository_endpoint": {"readonly": True}, + "provisioning_state": {"readonly": True}, + } + + _attribute_map = { + "package_source": {"key": "packageSource", "type": "ArchivePackageSourceProperties"}, + "published_version": {"key": "publishedVersion", "type": "str"}, + "repository_endpoint_prefix": {"key": "repositoryEndpointPrefix", "type": "str"}, + "repository_endpoint": {"key": "repositoryEndpoint", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "distribution_name": {"key": "distributionName", "type": "str"}, + } + + def __init__( + self, + *, + package_source: Optional["_models.ArchivePackageSourceProperties"] = None, + published_version: Optional[str] = None, + repository_endpoint_prefix: Optional[str] = None, + distribution_name: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword package_source: The package source of the archive. + :paramtype package_source: + ~container_registry_management_client.models.ArchivePackageSourceProperties + :keyword published_version: The published version of the archive. + :paramtype published_version: str + :keyword repository_endpoint_prefix: + :paramtype repository_endpoint_prefix: str + :keyword distribution_name: Debian distribution Name. + :paramtype distribution_name: str + """ + super().__init__( + package_source=package_source, + published_version=published_version, + repository_endpoint_prefix=repository_endpoint_prefix, + **kwargs + ) + self.distribution_name = distribution_name + + +class EncryptionProperty(_serialization.Model): + """EncryptionProperty. + + :ivar status: Indicates whether or not the encryption is enabled for container registry. Known + values are: "enabled" and "disabled". + :vartype status: str or ~container_registry_management_client.models.EncryptionStatus + :ivar key_vault_properties: Key vault properties. + :vartype key_vault_properties: ~container_registry_management_client.models.KeyVaultProperties + """ + + _attribute_map = { + "status": {"key": "status", "type": "str"}, + "key_vault_properties": {"key": "keyVaultProperties", "type": "KeyVaultProperties"}, + } + + def __init__( + self, + *, + status: Optional[Union[str, "_models.EncryptionStatus"]] = None, + key_vault_properties: Optional["_models.KeyVaultProperties"] = None, + **kwargs: Any + ) -> None: + """ + :keyword status: Indicates whether or not the encryption is enabled for container registry. + Known values are: "enabled" and "disabled". + :paramtype status: str or ~container_registry_management_client.models.EncryptionStatus + :keyword key_vault_properties: Key vault properties. + :paramtype key_vault_properties: + ~container_registry_management_client.models.KeyVaultProperties + """ + super().__init__(**kwargs) + self.status = status + self.key_vault_properties = key_vault_properties + + +class ErrorAdditionalInfo(_serialization.Model): + """The resource management error additional info. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: JSON + """ + + _validation = { + "type": {"readonly": True}, + "info": {"readonly": True}, + } + + _attribute_map = { + "type": {"key": "type", "type": "str"}, + "info": {"key": "info", "type": "object"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.type: Optional[str] = None + self.info: Optional[JSON] = None + + +class ErrorDetail(_serialization.Model): + """The error detail. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar target: The error target. + :vartype target: str + :ivar details: The error details. + :vartype details: list[~container_registry_management_client.models.ErrorDetail] + :ivar additional_info: The error additional info. + :vartype additional_info: + list[~container_registry_management_client.models.ErrorAdditionalInfo] + """ + + _validation = { + "code": {"readonly": True}, + "message": {"readonly": True}, + "target": {"readonly": True}, + "details": {"readonly": True}, + "additional_info": {"readonly": True}, + } + + _attribute_map = { + "code": {"key": "code", "type": "str"}, + "message": {"key": "message", "type": "str"}, + "target": {"key": "target", "type": "str"}, + "details": {"key": "details", "type": "[ErrorDetail]"}, + "additional_info": {"key": "additionalInfo", "type": "[ErrorAdditionalInfo]"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.code: Optional[str] = None + self.message: Optional[str] = None + self.target: Optional[str] = None + self.details: Optional[list["_models.ErrorDetail"]] = None + self.additional_info: Optional[list["_models.ErrorAdditionalInfo"]] = None + + +class ErrorResponse(_serialization.Model): + """Common error response for all Azure Resource Manager APIs to return error details for failed + operations. (This also follows the OData error response format.). + + :ivar error: The error object. + :vartype error: ~container_registry_management_client.models.ErrorDetail + """ + + _attribute_map = { + "error": {"key": "error", "type": "ErrorDetail"}, + } + + def __init__(self, *, error: Optional["_models.ErrorDetail"] = None, **kwargs: Any) -> None: + """ + :keyword error: The error object. + :paramtype error: ~container_registry_management_client.models.ErrorDetail + """ + super().__init__(**kwargs) + self.error = error + + +class EventInfo(_serialization.Model): + """The basic information of an event. + + :ivar id: The event ID. + :vartype id: str + """ + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + } + + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin + """ + :keyword id: The event ID. + :paramtype id: str + """ + super().__init__(**kwargs) + self.id = id + + +class Event(EventInfo): + """The event for a webhook. + + :ivar id: The event ID. + :vartype id: str + :ivar event_request_message: The event request message sent to the service URI. + :vartype event_request_message: + ~container_registry_management_client.models.EventRequestMessage + :ivar event_response_message: The event response message received from the service URI. + :vartype event_response_message: + ~container_registry_management_client.models.EventResponseMessage + """ + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "event_request_message": {"key": "eventRequestMessage", "type": "EventRequestMessage"}, + "event_response_message": {"key": "eventResponseMessage", "type": "EventResponseMessage"}, + } + + def __init__( + self, + *, + id: Optional[str] = None, # pylint: disable=redefined-builtin + event_request_message: Optional["_models.EventRequestMessage"] = None, + event_response_message: Optional["_models.EventResponseMessage"] = None, + **kwargs: Any + ) -> None: + """ + :keyword id: The event ID. + :paramtype id: str + :keyword event_request_message: The event request message sent to the service URI. + :paramtype event_request_message: + ~container_registry_management_client.models.EventRequestMessage + :keyword event_response_message: The event response message received from the service URI. + :paramtype event_response_message: + ~container_registry_management_client.models.EventResponseMessage + """ + super().__init__(id=id, **kwargs) + self.event_request_message = event_request_message + self.event_response_message = event_response_message + + +class EventContent(_serialization.Model): + """The content of the event request message. + + :ivar id: The event ID. + :vartype id: str + :ivar timestamp: The time at which the event occurred. + :vartype timestamp: ~datetime.datetime + :ivar action: The action that encompasses the provided event. + :vartype action: str + :ivar target: The target of the event. + :vartype target: ~container_registry_management_client.models.Target + :ivar request: The request that generated the event. + :vartype request: ~container_registry_management_client.models.Request + :ivar actor: The agent that initiated the event. For most situations, this could be from the + authorization context of the request. + :vartype actor: ~container_registry_management_client.models.Actor + :ivar source: The registry node that generated the event. Put differently, while the actor + initiates the event, the source generates it. + :vartype source: ~container_registry_management_client.models.Source + """ + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "timestamp": {"key": "timestamp", "type": "iso-8601"}, + "action": {"key": "action", "type": "str"}, + "target": {"key": "target", "type": "Target"}, + "request": {"key": "request", "type": "Request"}, + "actor": {"key": "actor", "type": "Actor"}, + "source": {"key": "source", "type": "Source"}, + } + + def __init__( + self, + *, + id: Optional[str] = None, # pylint: disable=redefined-builtin + timestamp: Optional[datetime.datetime] = None, + action: Optional[str] = None, + target: Optional["_models.Target"] = None, + request: Optional["_models.Request"] = None, + actor: Optional["_models.Actor"] = None, + source: Optional["_models.Source"] = None, + **kwargs: Any + ) -> None: + """ + :keyword id: The event ID. + :paramtype id: str + :keyword timestamp: The time at which the event occurred. + :paramtype timestamp: ~datetime.datetime + :keyword action: The action that encompasses the provided event. + :paramtype action: str + :keyword target: The target of the event. + :paramtype target: ~container_registry_management_client.models.Target + :keyword request: The request that generated the event. + :paramtype request: ~container_registry_management_client.models.Request + :keyword actor: The agent that initiated the event. For most situations, this could be from the + authorization context of the request. + :paramtype actor: ~container_registry_management_client.models.Actor + :keyword source: The registry node that generated the event. Put differently, while the actor + initiates the event, the source generates it. + :paramtype source: ~container_registry_management_client.models.Source + """ + super().__init__(**kwargs) + self.id = id + self.timestamp = timestamp + self.action = action + self.target = target + self.request = request + self.actor = actor + self.source = source + + +class EventListResult(_serialization.Model): + """The result of a request to list events for a webhook. + + :ivar value: The list of events. Since this list may be incomplete, the nextLink field should + be used to request the next list of events. + :vartype value: list[~container_registry_management_client.models.Event] + :ivar next_link: The URI that can be used to request the next list of events. + :vartype next_link: str + """ + + _attribute_map = { + "value": {"key": "value", "type": "[Event]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__( + self, *, value: Optional[list["_models.Event"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: + """ + :keyword value: The list of events. Since this list may be incomplete, the nextLink field + should be used to request the next list of events. + :paramtype value: list[~container_registry_management_client.models.Event] + :keyword next_link: The URI that can be used to request the next list of events. + :paramtype next_link: str + """ + super().__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class EventRequestMessage(_serialization.Model): + """The event request message sent to the service URI. + + :ivar content: The content of the event request message. + :vartype content: ~container_registry_management_client.models.EventContent + :ivar headers: The headers of the event request message. + :vartype headers: dict[str, str] + :ivar method: The HTTP method used to send the event request message. + :vartype method: str + :ivar request_uri: The URI used to send the event request message. + :vartype request_uri: str + :ivar version: The HTTP message version. + :vartype version: str + """ + + _attribute_map = { + "content": {"key": "content", "type": "EventContent"}, + "headers": {"key": "headers", "type": "{str}"}, + "method": {"key": "method", "type": "str"}, + "request_uri": {"key": "requestUri", "type": "str"}, + "version": {"key": "version", "type": "str"}, + } + + def __init__( + self, + *, + content: Optional["_models.EventContent"] = None, + headers: Optional[dict[str, str]] = None, + method: Optional[str] = None, + request_uri: Optional[str] = None, + version: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword content: The content of the event request message. + :paramtype content: ~container_registry_management_client.models.EventContent + :keyword headers: The headers of the event request message. + :paramtype headers: dict[str, str] + :keyword method: The HTTP method used to send the event request message. + :paramtype method: str + :keyword request_uri: The URI used to send the event request message. + :paramtype request_uri: str + :keyword version: The HTTP message version. + :paramtype version: str + """ + super().__init__(**kwargs) + self.content = content + self.headers = headers + self.method = method + self.request_uri = request_uri + self.version = version + + +class EventResponseMessage(_serialization.Model): + """The event response message received from the service URI. + + :ivar content: The content of the event response message. + :vartype content: str + :ivar headers: The headers of the event response message. + :vartype headers: dict[str, str] + :ivar reason_phrase: The reason phrase of the event response message. + :vartype reason_phrase: str + :ivar status_code: The status code of the event response message. + :vartype status_code: str + :ivar version: The HTTP message version. + :vartype version: str + """ + + _attribute_map = { + "content": {"key": "content", "type": "str"}, + "headers": {"key": "headers", "type": "{str}"}, + "reason_phrase": {"key": "reasonPhrase", "type": "str"}, + "status_code": {"key": "statusCode", "type": "str"}, + "version": {"key": "version", "type": "str"}, + } + + def __init__( + self, + *, + content: Optional[str] = None, + headers: Optional[dict[str, str]] = None, + reason_phrase: Optional[str] = None, + status_code: Optional[str] = None, + version: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword content: The content of the event response message. + :paramtype content: str + :keyword headers: The headers of the event response message. + :paramtype headers: dict[str, str] + :keyword reason_phrase: The reason phrase of the event response message. + :paramtype reason_phrase: str + :keyword status_code: The status code of the event response message. + :paramtype status_code: str + :keyword version: The HTTP message version. + :paramtype version: str + """ + super().__init__(**kwargs) + self.content = content + self.headers = headers + self.reason_phrase = reason_phrase + self.status_code = status_code + self.version = version + + +class ExportPipeline(ProxyResource): + """An object that represents an export pipeline for a container registry. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. E.g. + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~container_registry_management_client.models.SystemData + :ivar properties: The properties of the export pipeline. + :vartype properties: ~container_registry_management_client.models.ExportPipelineProperties + :ivar location: The location of the export pipeline. + :vartype location: str + :ivar identity: The identity of the export pipeline. + :vartype identity: ~container_registry_management_client.models.IdentityProperties + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "ExportPipelineProperties"}, + "location": {"key": "location", "type": "str"}, + "identity": {"key": "identity", "type": "IdentityProperties"}, + } + + def __init__( + self, + *, + properties: Optional["_models.ExportPipelineProperties"] = None, + location: Optional[str] = None, + identity: Optional["_models.IdentityProperties"] = None, + **kwargs: Any + ) -> None: + """ + :keyword properties: The properties of the export pipeline. + :paramtype properties: ~container_registry_management_client.models.ExportPipelineProperties + :keyword location: The location of the export pipeline. + :paramtype location: str + :keyword identity: The identity of the export pipeline. + :paramtype identity: ~container_registry_management_client.models.IdentityProperties + """ + super().__init__(**kwargs) + self.properties = properties + self.location = location + self.identity = identity + + +class ExportPipelineListResult(_serialization.Model): + """The result of a request to list export pipelines for a container registry. + + :ivar value: The list of export pipelines. Since this list may be incomplete, the nextLink + field should be used to request the next list of export pipelines. + :vartype value: list[~container_registry_management_client.models.ExportPipeline] + :ivar next_link: The URI that can be used to request the next list of export pipelines. + :vartype next_link: str + """ + + _attribute_map = { + "value": {"key": "value", "type": "[ExportPipeline]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__( + self, *, value: Optional[list["_models.ExportPipeline"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: + """ + :keyword value: The list of export pipelines. Since this list may be incomplete, the nextLink + field should be used to request the next list of export pipelines. + :paramtype value: list[~container_registry_management_client.models.ExportPipeline] + :keyword next_link: The URI that can be used to request the next list of export pipelines. + :paramtype next_link: str + """ + super().__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ExportPipelineProperties(_serialization.Model): + """The properties of an export pipeline. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to server. + + :ivar target: The target properties of the export pipeline. Required. + :vartype target: ~container_registry_management_client.models.ExportPipelineTargetProperties + :ivar options: The list of all options configured for the pipeline. + :vartype options: list[str or ~container_registry_management_client.models.PipelineOptions] + :ivar provisioning_state: The provisioning state of the pipeline at the time the operation was + called. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and + "Canceled". + :vartype provisioning_state: str or + ~container_registry_management_client.models.ProvisioningState + """ + + _validation = { + "target": {"required": True}, + "provisioning_state": {"readonly": True}, + } + + _attribute_map = { + "target": {"key": "target", "type": "ExportPipelineTargetProperties"}, + "options": {"key": "options", "type": "[str]"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + } + + def __init__( + self, + *, + target: "_models.ExportPipelineTargetProperties", + options: Optional[list[Union[str, "_models.PipelineOptions"]]] = None, + **kwargs: Any + ) -> None: + """ + :keyword target: The target properties of the export pipeline. Required. + :paramtype target: ~container_registry_management_client.models.ExportPipelineTargetProperties + :keyword options: The list of all options configured for the pipeline. + :paramtype options: list[str or ~container_registry_management_client.models.PipelineOptions] + """ + super().__init__(**kwargs) + self.target = target + self.options = options + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + + +class ExportPipelineTargetProperties(_serialization.Model): + """The properties of the export pipeline target. + + :ivar type: The type of target for the export pipeline. + :vartype type: str + :ivar uri: The target uri of the export pipeline. When 'AzureStorageBlob': + "https://accountName.blob.core.windows.net/containerName/blobName" When + 'AzureStorageBlobContainer': "https://accountName.blob.core.windows.net/containerName". + :vartype uri: str + :ivar key_vault_uri: They key vault secret uri to obtain the target storage SAS token. + :vartype key_vault_uri: str + :ivar storage_access_mode: The storage access mode used for the customer storage account. Known + values are: "ManagedIdentity" and "SasToken". + :vartype storage_access_mode: str or + ~container_registry_management_client.models.StorageAccessMode + """ + + _attribute_map = { + "type": {"key": "type", "type": "str"}, + "uri": {"key": "uri", "type": "str"}, + "key_vault_uri": {"key": "keyVaultUri", "type": "str"}, + "storage_access_mode": {"key": "storageAccessMode", "type": "str"}, + } + + def __init__( + self, + *, + type: Optional[str] = None, + uri: Optional[str] = None, + key_vault_uri: Optional[str] = None, + storage_access_mode: Optional[Union[str, "_models.StorageAccessMode"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword type: The type of target for the export pipeline. + :paramtype type: str + :keyword uri: The target uri of the export pipeline. When 'AzureStorageBlob': + "https://accountName.blob.core.windows.net/containerName/blobName" When + 'AzureStorageBlobContainer': "https://accountName.blob.core.windows.net/containerName". + :paramtype uri: str + :keyword key_vault_uri: They key vault secret uri to obtain the target storage SAS token. + :paramtype key_vault_uri: str + :keyword storage_access_mode: The storage access mode used for the customer storage account. + Known values are: "ManagedIdentity" and "SasToken". + :paramtype storage_access_mode: str or + ~container_registry_management_client.models.StorageAccessMode + """ + super().__init__(**kwargs) + self.type = type + self.uri = uri + self.key_vault_uri = key_vault_uri + self.storage_access_mode = storage_access_mode + + +class ExportPolicy(_serialization.Model): + """The export policy for a container registry. + + :ivar status: The value that indicates whether the policy is enabled or not. Known values are: + "enabled" and "disabled". + :vartype status: str or ~container_registry_management_client.models.ExportPolicyStatus + """ + + _attribute_map = { + "status": {"key": "status", "type": "str"}, + } + + def __init__(self, *, status: Union[str, "_models.ExportPolicyStatus"] = "enabled", **kwargs: Any) -> None: + """ + :keyword status: The value that indicates whether the policy is enabled or not. Known values + are: "enabled" and "disabled". + :paramtype status: str or ~container_registry_management_client.models.ExportPolicyStatus + """ + super().__init__(**kwargs) + self.status = status + + +class GarbageCollectionProperties(_serialization.Model): + """The garbage collection properties of the connected registry. + + :ivar enabled: Indicates whether garbage collection is enabled for the connected registry. + :vartype enabled: bool + :ivar schedule: The cron expression indicating the schedule that the connected registry will + run garbage collection. + :vartype schedule: str + """ + + _attribute_map = { + "enabled": {"key": "enabled", "type": "bool"}, + "schedule": {"key": "schedule", "type": "str"}, + } + + def __init__(self, *, enabled: Optional[bool] = None, schedule: Optional[str] = None, **kwargs: Any) -> None: + """ + :keyword enabled: Indicates whether garbage collection is enabled for the connected registry. + :paramtype enabled: bool + :keyword schedule: The cron expression indicating the schedule that the connected registry will + run garbage collection. + :paramtype schedule: str + """ + super().__init__(**kwargs) + self.enabled = enabled + self.schedule = schedule + + +class GenerateCredentialsParameters(_serialization.Model): + """The parameters used to generate credentials for a specified token or user of a container + registry. + + :ivar token_id: The resource ID of the token for which credentials have to be generated. + :vartype token_id: str + :ivar expiry: The expiry date of the generated credentials after which the credentials become + invalid. + :vartype expiry: ~datetime.datetime + :ivar name: Specifies name of the password which should be regenerated if any -- password1 or + password2. Known values are: "password1" and "password2". + :vartype name: str or ~container_registry_management_client.models.TokenPasswordName + """ + + _attribute_map = { + "token_id": {"key": "tokenId", "type": "str"}, + "expiry": {"key": "expiry", "type": "iso-8601"}, + "name": {"key": "name", "type": "str"}, + } + + def __init__( + self, + *, + token_id: Optional[str] = None, + expiry: Optional[datetime.datetime] = None, + name: Optional[Union[str, "_models.TokenPasswordName"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword token_id: The resource ID of the token for which credentials have to be generated. + :paramtype token_id: str + :keyword expiry: The expiry date of the generated credentials after which the credentials + become invalid. + :paramtype expiry: ~datetime.datetime + :keyword name: Specifies name of the password which should be regenerated if any -- password1 + or password2. Known values are: "password1" and "password2". + :paramtype name: str or ~container_registry_management_client.models.TokenPasswordName + """ + super().__init__(**kwargs) + self.token_id = token_id + self.expiry = expiry + self.name = name + + +class GenerateCredentialsResult(_serialization.Model): + """The response from the GenerateCredentials operation. + + :ivar username: The username for a container registry. + :vartype username: str + :ivar passwords: The list of passwords for a container registry. + :vartype passwords: list[~container_registry_management_client.models.TokenPassword] + """ + + _attribute_map = { + "username": {"key": "username", "type": "str"}, + "passwords": {"key": "passwords", "type": "[TokenPassword]"}, + } + + def __init__( + self, + *, + username: Optional[str] = None, + passwords: Optional[list["_models.TokenPassword"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword username: The username for a container registry. + :paramtype username: str + :keyword passwords: The list of passwords for a container registry. + :paramtype passwords: list[~container_registry_management_client.models.TokenPassword] + """ + super().__init__(**kwargs) + self.username = username + self.passwords = passwords + + +class IdentityProperties(_serialization.Model): + """Managed identity for the resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal ID of resource identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of resource. + :vartype tenant_id: str + :ivar type: The identity type. Known values are: "SystemAssigned", "UserAssigned", + "SystemAssigned, UserAssigned", and "None". + :vartype type: str or ~container_registry_management_client.models.ResourceIdentityType + :ivar user_assigned_identities: The list of user identities associated with the resource. The + user identity dictionary key references will be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/ + providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :vartype user_assigned_identities: dict[str, + ~container_registry_management_client.models.UserIdentityProperties] + """ + + _validation = { + "principal_id": {"readonly": True}, + "tenant_id": {"readonly": True}, + } + + _attribute_map = { + "principal_id": {"key": "principalId", "type": "str"}, + "tenant_id": {"key": "tenantId", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "user_assigned_identities": {"key": "userAssignedIdentities", "type": "{UserIdentityProperties}"}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "_models.ResourceIdentityType"]] = None, + user_assigned_identities: Optional[dict[str, "_models.UserIdentityProperties"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword type: The identity type. Known values are: "SystemAssigned", "UserAssigned", + "SystemAssigned, UserAssigned", and "None". + :paramtype type: str or ~container_registry_management_client.models.ResourceIdentityType + :keyword user_assigned_identities: The list of user identities associated with the resource. + The user identity dictionary key references will be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/ + providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :paramtype user_assigned_identities: dict[str, + ~container_registry_management_client.models.UserIdentityProperties] + """ + super().__init__(**kwargs) + self.principal_id: Optional[str] = None + self.tenant_id: Optional[str] = None + self.type = type + self.user_assigned_identities = user_assigned_identities + + +class ImportImageParameters(_serialization.Model): + """ImportImageParameters. + + All required parameters must be populated in order to send to server. + + :ivar source: The source of the image. Required. + :vartype source: ~container_registry_management_client.models.ImportSource + :ivar target_tags: List of strings of the form repo[:tag]. When tag is omitted the source will + be used (or 'latest' if source tag is also omitted). + :vartype target_tags: list[str] + :ivar untagged_target_repositories: List of strings of repository names to do a manifest only + copy. No tag will be created. + :vartype untagged_target_repositories: list[str] + :ivar mode: When Force, any existing target tags will be overwritten. When NoForce, any + existing target tags will fail the operation before any copying begins. Known values are: + "NoForce" and "Force". + :vartype mode: str or ~container_registry_management_client.models.ImportMode + """ + + _validation = { + "source": {"required": True}, + } + + _attribute_map = { + "source": {"key": "source", "type": "ImportSource"}, + "target_tags": {"key": "targetTags", "type": "[str]"}, + "untagged_target_repositories": {"key": "untaggedTargetRepositories", "type": "[str]"}, + "mode": {"key": "mode", "type": "str"}, + } + + def __init__( + self, + *, + source: "_models.ImportSource", + target_tags: Optional[list[str]] = None, + untagged_target_repositories: Optional[list[str]] = None, + mode: Union[str, "_models.ImportMode"] = "NoForce", + **kwargs: Any + ) -> None: + """ + :keyword source: The source of the image. Required. + :paramtype source: ~container_registry_management_client.models.ImportSource + :keyword target_tags: List of strings of the form repo[:tag]. When tag is omitted the source + will be used (or 'latest' if source tag is also omitted). + :paramtype target_tags: list[str] + :keyword untagged_target_repositories: List of strings of repository names to do a manifest + only copy. No tag will be created. + :paramtype untagged_target_repositories: list[str] + :keyword mode: When Force, any existing target tags will be overwritten. When NoForce, any + existing target tags will fail the operation before any copying begins. Known values are: + "NoForce" and "Force". + :paramtype mode: str or ~container_registry_management_client.models.ImportMode + """ + super().__init__(**kwargs) + self.source = source + self.target_tags = target_tags + self.untagged_target_repositories = untagged_target_repositories + self.mode = mode + + +class ImportPipeline(ProxyResource): + """An object that represents an import pipeline for a container registry. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. E.g. + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~container_registry_management_client.models.SystemData + :ivar properties: The properties of the import pipeline. + :vartype properties: ~container_registry_management_client.models.ImportPipelineProperties + :ivar location: The location of the import pipeline. + :vartype location: str + :ivar identity: The identity of the import pipeline. + :vartype identity: ~container_registry_management_client.models.IdentityProperties + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "ImportPipelineProperties"}, + "location": {"key": "location", "type": "str"}, + "identity": {"key": "identity", "type": "IdentityProperties"}, + } + + def __init__( + self, + *, + properties: Optional["_models.ImportPipelineProperties"] = None, + location: Optional[str] = None, + identity: Optional["_models.IdentityProperties"] = None, + **kwargs: Any + ) -> None: + """ + :keyword properties: The properties of the import pipeline. + :paramtype properties: ~container_registry_management_client.models.ImportPipelineProperties + :keyword location: The location of the import pipeline. + :paramtype location: str + :keyword identity: The identity of the import pipeline. + :paramtype identity: ~container_registry_management_client.models.IdentityProperties + """ + super().__init__(**kwargs) + self.properties = properties + self.location = location + self.identity = identity + + +class ImportPipelineListResult(_serialization.Model): + """The result of a request to list import pipelines for a container registry. + + :ivar value: The list of import pipelines. Since this list may be incomplete, the nextLink + field should be used to request the next list of import pipelines. + :vartype value: list[~container_registry_management_client.models.ImportPipeline] + :ivar next_link: The URI that can be used to request the next list of import pipelines. + :vartype next_link: str + """ + + _attribute_map = { + "value": {"key": "value", "type": "[ImportPipeline]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__( + self, *, value: Optional[list["_models.ImportPipeline"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: + """ + :keyword value: The list of import pipelines. Since this list may be incomplete, the nextLink + field should be used to request the next list of import pipelines. + :paramtype value: list[~container_registry_management_client.models.ImportPipeline] + :keyword next_link: The URI that can be used to request the next list of import pipelines. + :paramtype next_link: str + """ + super().__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ImportPipelineProperties(_serialization.Model): + """The properties of an import pipeline. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to server. + + :ivar source: The source properties of the import pipeline. Required. + :vartype source: ~container_registry_management_client.models.ImportPipelineSourceProperties + :ivar trigger: The properties that describe the trigger of the import pipeline. + :vartype trigger: ~container_registry_management_client.models.PipelineTriggerProperties + :ivar options: The list of all options configured for the pipeline. + :vartype options: list[str or ~container_registry_management_client.models.PipelineOptions] + :ivar provisioning_state: The provisioning state of the pipeline at the time the operation was + called. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and + "Canceled". + :vartype provisioning_state: str or + ~container_registry_management_client.models.ProvisioningState + """ + + _validation = { + "source": {"required": True}, + "provisioning_state": {"readonly": True}, + } + + _attribute_map = { + "source": {"key": "source", "type": "ImportPipelineSourceProperties"}, + "trigger": {"key": "trigger", "type": "PipelineTriggerProperties"}, + "options": {"key": "options", "type": "[str]"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + } + + def __init__( + self, + *, + source: "_models.ImportPipelineSourceProperties", + trigger: Optional["_models.PipelineTriggerProperties"] = None, + options: Optional[list[Union[str, "_models.PipelineOptions"]]] = None, + **kwargs: Any + ) -> None: + """ + :keyword source: The source properties of the import pipeline. Required. + :paramtype source: ~container_registry_management_client.models.ImportPipelineSourceProperties + :keyword trigger: The properties that describe the trigger of the import pipeline. + :paramtype trigger: ~container_registry_management_client.models.PipelineTriggerProperties + :keyword options: The list of all options configured for the pipeline. + :paramtype options: list[str or ~container_registry_management_client.models.PipelineOptions] + """ + super().__init__(**kwargs) + self.source = source + self.trigger = trigger + self.options = options + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + + +class ImportPipelineSourceProperties(_serialization.Model): + """The properties of the import pipeline source. + + :ivar type: The type of source for the import pipeline. "AzureStorageBlobContainer" + :vartype type: str or ~container_registry_management_client.models.PipelineSourceType + :ivar uri: The source uri of the import pipeline. When 'AzureStorageBlob': + "https://accountName.blob.core.windows.net/containerName/blobName" When + 'AzureStorageBlobContainer': "https://accountName.blob.core.windows.net/containerName". + :vartype uri: str + :ivar key_vault_uri: They key vault secret uri to obtain the source storage SAS token. + :vartype key_vault_uri: str + :ivar storage_access_mode: The storage access mode used for the customer storage account. Known + values are: "ManagedIdentity" and "SasToken". + :vartype storage_access_mode: str or + ~container_registry_management_client.models.StorageAccessMode + """ + + _attribute_map = { + "type": {"key": "type", "type": "str"}, + "uri": {"key": "uri", "type": "str"}, + "key_vault_uri": {"key": "keyVaultUri", "type": "str"}, + "storage_access_mode": {"key": "storageAccessMode", "type": "str"}, + } + + def __init__( + self, + *, + type: Union[str, "_models.PipelineSourceType"] = "AzureStorageBlobContainer", + uri: Optional[str] = None, + key_vault_uri: Optional[str] = None, + storage_access_mode: Optional[Union[str, "_models.StorageAccessMode"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword type: The type of source for the import pipeline. "AzureStorageBlobContainer" + :paramtype type: str or ~container_registry_management_client.models.PipelineSourceType + :keyword uri: The source uri of the import pipeline. When 'AzureStorageBlob': + "https://accountName.blob.core.windows.net/containerName/blobName" When + 'AzureStorageBlobContainer': "https://accountName.blob.core.windows.net/containerName". + :paramtype uri: str + :keyword key_vault_uri: They key vault secret uri to obtain the source storage SAS token. + :paramtype key_vault_uri: str + :keyword storage_access_mode: The storage access mode used for the customer storage account. + Known values are: "ManagedIdentity" and "SasToken". + :paramtype storage_access_mode: str or + ~container_registry_management_client.models.StorageAccessMode + """ + super().__init__(**kwargs) + self.type = type + self.uri = uri + self.key_vault_uri = key_vault_uri + self.storage_access_mode = storage_access_mode + + +class ImportSource(_serialization.Model): + """ImportSource. + + All required parameters must be populated in order to send to server. + + :ivar resource_id: The resource identifier of the source Azure Container Registry. + :vartype resource_id: str + :ivar registry_uri: The address of the source registry (e.g. 'mcr.microsoft.com'). + :vartype registry_uri: str + :ivar credentials: Credentials used when importing from a registry uri. + :vartype credentials: ~container_registry_management_client.models.ImportSourceCredentials + :ivar source_image: Repository name of the source image. Specify an image by repository + ('hello-world'). This will use the 'latest' tag. Specify an image by tag + ('hello-world:latest'). Specify an image by sha256-based manifest digest + ('hello-world@sha256:abc123'). Required. + :vartype source_image: str + """ + + _validation = { + "source_image": {"required": True}, + } + + _attribute_map = { + "resource_id": {"key": "resourceId", "type": "str"}, + "registry_uri": {"key": "registryUri", "type": "str"}, + "credentials": {"key": "credentials", "type": "ImportSourceCredentials"}, + "source_image": {"key": "sourceImage", "type": "str"}, + } + + def __init__( + self, + *, + source_image: str, + resource_id: Optional[str] = None, + registry_uri: Optional[str] = None, + credentials: Optional["_models.ImportSourceCredentials"] = None, + **kwargs: Any + ) -> None: + """ + :keyword resource_id: The resource identifier of the source Azure Container Registry. + :paramtype resource_id: str + :keyword registry_uri: The address of the source registry (e.g. 'mcr.microsoft.com'). + :paramtype registry_uri: str + :keyword credentials: Credentials used when importing from a registry uri. + :paramtype credentials: ~container_registry_management_client.models.ImportSourceCredentials + :keyword source_image: Repository name of the source image. Specify an image by repository + ('hello-world'). This will use the 'latest' tag. Specify an image by tag + ('hello-world:latest'). Specify an image by sha256-based manifest digest + ('hello-world@sha256:abc123'). Required. + :paramtype source_image: str + """ + super().__init__(**kwargs) + self.resource_id = resource_id + self.registry_uri = registry_uri + self.credentials = credentials + self.source_image = source_image + + +class ImportSourceCredentials(_serialization.Model): + """ImportSourceCredentials. + + All required parameters must be populated in order to send to server. + + :ivar username: The username to authenticate with the source registry. + :vartype username: str + :ivar password: The password used to authenticate with the source registry. Required. + :vartype password: str + """ + + _validation = { + "password": {"required": True}, + } + + _attribute_map = { + "username": {"key": "username", "type": "str"}, + "password": {"key": "password", "type": "str"}, + } + + def __init__(self, *, password: str, username: Optional[str] = None, **kwargs: Any) -> None: + """ + :keyword username: The username to authenticate with the source registry. + :paramtype username: str + :keyword password: The password used to authenticate with the source registry. Required. + :paramtype password: str + """ + super().__init__(**kwargs) + self.username = username + self.password = password + + +class IPRule(_serialization.Model): + """IP rule with specific IP or IP range in CIDR format. + + All required parameters must be populated in order to send to server. + + :ivar action: The action of IP ACL rule. "Allow" + :vartype action: str or ~container_registry_management_client.models.Action + :ivar ip_address_or_range: Specifies the IP or IP range in CIDR format. Only IPV4 address is + allowed. Required. + :vartype ip_address_or_range: str + """ + + _validation = { + "ip_address_or_range": {"required": True}, + } + + _attribute_map = { + "action": {"key": "action", "type": "str"}, + "ip_address_or_range": {"key": "value", "type": "str"}, + } + + def __init__( + self, *, ip_address_or_range: str, action: Union[str, "_models.Action"] = "Allow", **kwargs: Any + ) -> None: + """ + :keyword action: The action of IP ACL rule. "Allow" + :paramtype action: str or ~container_registry_management_client.models.Action + :keyword ip_address_or_range: Specifies the IP or IP range in CIDR format. Only IPV4 address is + allowed. Required. + :paramtype ip_address_or_range: str + """ + super().__init__(**kwargs) + self.action = action + self.ip_address_or_range = ip_address_or_range + + +class KeyVaultProperties(_serialization.Model): + """KeyVaultProperties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar key_identifier: Key vault uri to access the encryption key. + :vartype key_identifier: str + :ivar versioned_key_identifier: The fully qualified key identifier that includes the version of + the key that is actually used for encryption. + :vartype versioned_key_identifier: str + :ivar identity: The client id of the identity which will be used to access key vault. + :vartype identity: str + :ivar key_rotation_enabled: Auto key rotation status for a CMK enabled registry. + :vartype key_rotation_enabled: bool + :ivar last_key_rotation_timestamp: Timestamp of the last successful key rotation. + :vartype last_key_rotation_timestamp: ~datetime.datetime + """ + + _validation = { + "versioned_key_identifier": {"readonly": True}, + "key_rotation_enabled": {"readonly": True}, + "last_key_rotation_timestamp": {"readonly": True}, + } + + _attribute_map = { + "key_identifier": {"key": "keyIdentifier", "type": "str"}, + "versioned_key_identifier": {"key": "versionedKeyIdentifier", "type": "str"}, + "identity": {"key": "identity", "type": "str"}, + "key_rotation_enabled": {"key": "keyRotationEnabled", "type": "bool"}, + "last_key_rotation_timestamp": {"key": "lastKeyRotationTimestamp", "type": "iso-8601"}, + } + + def __init__(self, *, key_identifier: Optional[str] = None, identity: Optional[str] = None, **kwargs: Any) -> None: + """ + :keyword key_identifier: Key vault uri to access the encryption key. + :paramtype key_identifier: str + :keyword identity: The client id of the identity which will be used to access key vault. + :paramtype identity: str + """ + super().__init__(**kwargs) + self.key_identifier = key_identifier + self.versioned_key_identifier: Optional[str] = None + self.identity = identity + self.key_rotation_enabled: Optional[bool] = None + self.last_key_rotation_timestamp: Optional[datetime.datetime] = None + + +class LoggingProperties(_serialization.Model): + """The logging properties of the connected registry. + + :ivar log_level: The verbosity of logs persisted on the connected registry. Known values are: + "Debug", "Information", "Warning", "Error", and "None". + :vartype log_level: str or ~container_registry_management_client.models.LogLevel + :ivar audit_log_status: Indicates whether audit logs are enabled on the connected registry. + Known values are: "Enabled" and "Disabled". + :vartype audit_log_status: str or ~container_registry_management_client.models.AuditLogStatus + """ + + _attribute_map = { + "log_level": {"key": "logLevel", "type": "str"}, + "audit_log_status": {"key": "auditLogStatus", "type": "str"}, + } + + def __init__( + self, + *, + log_level: Union[str, "_models.LogLevel"] = "Information", + audit_log_status: Union[str, "_models.AuditLogStatus"] = "Disabled", + **kwargs: Any + ) -> None: + """ + :keyword log_level: The verbosity of logs persisted on the connected registry. Known values + are: "Debug", "Information", "Warning", "Error", and "None". + :paramtype log_level: str or ~container_registry_management_client.models.LogLevel + :keyword audit_log_status: Indicates whether audit logs are enabled on the connected registry. + Known values are: "Enabled" and "Disabled". + :paramtype audit_log_status: str or ~container_registry_management_client.models.AuditLogStatus + """ + super().__init__(**kwargs) + self.log_level = log_level + self.audit_log_status = audit_log_status + + +class LoginServerProperties(_serialization.Model): + """The login server properties of the connected registry. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar host: The host of the connected registry. Can be FQDN or IP. + :vartype host: str + :ivar tls: The TLS properties of the connected registry login server. + :vartype tls: ~container_registry_management_client.models.TlsProperties + """ + + _validation = { + "host": {"readonly": True}, + "tls": {"readonly": True}, + } + + _attribute_map = { + "host": {"key": "host", "type": "str"}, + "tls": {"key": "tls", "type": "TlsProperties"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.host: Optional[str] = None + self.tls: Optional["_models.TlsProperties"] = None + + +class NetworkRuleSet(_serialization.Model): + """The network rule set for a container registry. + + All required parameters must be populated in order to send to server. + + :ivar default_action: The default action of allow or deny when no other rules match. Known + values are: "Allow" and "Deny". + :vartype default_action: str or ~container_registry_management_client.models.DefaultAction + :ivar ip_rules: The IP ACL rules. + :vartype ip_rules: list[~container_registry_management_client.models.IPRule] + """ + + _validation = { + "default_action": {"required": True}, + } + + _attribute_map = { + "default_action": {"key": "defaultAction", "type": "str"}, + "ip_rules": {"key": "ipRules", "type": "[IPRule]"}, + } + + def __init__( + self, + *, + default_action: Union[str, "_models.DefaultAction"] = "Allow", + ip_rules: Optional[list["_models.IPRule"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword default_action: The default action of allow or deny when no other rules match. Known + values are: "Allow" and "Deny". + :paramtype default_action: str or ~container_registry_management_client.models.DefaultAction + :keyword ip_rules: The IP ACL rules. + :paramtype ip_rules: list[~container_registry_management_client.models.IPRule] + """ + super().__init__(**kwargs) + self.default_action = default_action + self.ip_rules = ip_rules + + +class OperationDefinition(_serialization.Model): + """The definition of a container registry operation. + + :ivar origin: The origin information of the container registry operation. + :vartype origin: str + :ivar name: Operation name: {provider}/{resource}/{operation}. + :vartype name: str + :ivar display: The display information for the container registry operation. + :vartype display: ~container_registry_management_client.models.OperationDisplayDefinition + :ivar properties: The properties information for the container registry operation. + :vartype properties: ~container_registry_management_client.models.OperationPropertiesDefinition + :ivar is_data_action: This property indicates if the operation is an action or a data action + ref: + https://docs.microsoft.com/en-us/azure/role-based-access-control/role-definitions#management-and-data-operations. + :vartype is_data_action: bool + """ + + _attribute_map = { + "origin": {"key": "origin", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "display": {"key": "display", "type": "OperationDisplayDefinition"}, + "properties": {"key": "properties", "type": "OperationPropertiesDefinition"}, + "is_data_action": {"key": "isDataAction", "type": "bool"}, + } + + def __init__( + self, + *, + origin: Optional[str] = None, + name: Optional[str] = None, + display: Optional["_models.OperationDisplayDefinition"] = None, + properties: Optional["_models.OperationPropertiesDefinition"] = None, + is_data_action: Optional[bool] = None, + **kwargs: Any + ) -> None: + """ + :keyword origin: The origin information of the container registry operation. + :paramtype origin: str + :keyword name: Operation name: {provider}/{resource}/{operation}. + :paramtype name: str + :keyword display: The display information for the container registry operation. + :paramtype display: ~container_registry_management_client.models.OperationDisplayDefinition + :keyword properties: The properties information for the container registry operation. + :paramtype properties: + ~container_registry_management_client.models.OperationPropertiesDefinition + :keyword is_data_action: This property indicates if the operation is an action or a data action + ref: + https://docs.microsoft.com/en-us/azure/role-based-access-control/role-definitions#management-and-data-operations. + :paramtype is_data_action: bool + """ + super().__init__(**kwargs) + self.origin = origin + self.name = name + self.display = display + self.properties = properties + self.is_data_action = is_data_action + + +class OperationDisplayDefinition(_serialization.Model): + """The display information for a container registry operation. + + :ivar provider: The resource provider name: Microsoft.ContainerRegistry. + :vartype provider: str + :ivar resource: The resource on which the operation is performed. + :vartype resource: str + :ivar operation: The operation that users can perform. + :vartype operation: str + :ivar description: The description for the operation. + :vartype description: str + """ + + _attribute_map = { + "provider": {"key": "provider", "type": "str"}, + "resource": {"key": "resource", "type": "str"}, + "operation": {"key": "operation", "type": "str"}, + "description": {"key": "description", "type": "str"}, + } + + def __init__( + self, + *, + provider: Optional[str] = None, + resource: Optional[str] = None, + operation: Optional[str] = None, + description: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword provider: The resource provider name: Microsoft.ContainerRegistry. + :paramtype provider: str + :keyword resource: The resource on which the operation is performed. + :paramtype resource: str + :keyword operation: The operation that users can perform. + :paramtype operation: str + :keyword description: The description for the operation. + :paramtype description: str + """ + super().__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class OperationListResult(_serialization.Model): + """The result of a request to list container registry operations. + + :ivar value: The list of container registry operations. Since this list may be incomplete, the + nextLink field should be used to request the next list of operations. + :vartype value: list[~container_registry_management_client.models.OperationDefinition] + :ivar next_link: The URI that can be used to request the next list of container registry + operations. + :vartype next_link: str + """ + + _attribute_map = { + "value": {"key": "value", "type": "[OperationDefinition]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__( + self, + *, + value: Optional[list["_models.OperationDefinition"]] = None, + next_link: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword value: The list of container registry operations. Since this list may be incomplete, + the nextLink field should be used to request the next list of operations. + :paramtype value: list[~container_registry_management_client.models.OperationDefinition] + :keyword next_link: The URI that can be used to request the next list of container registry + operations. + :paramtype next_link: str + """ + super().__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class OperationLogSpecificationDefinition(_serialization.Model): + """The definition of Azure Monitoring log. + + :ivar name: Log name. + :vartype name: str + :ivar display_name: Log display name. + :vartype display_name: str + :ivar blob_duration: Log blob duration. + :vartype blob_duration: str + """ + + _attribute_map = { + "name": {"key": "name", "type": "str"}, + "display_name": {"key": "displayName", "type": "str"}, + "blob_duration": {"key": "blobDuration", "type": "str"}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + display_name: Optional[str] = None, + blob_duration: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword name: Log name. + :paramtype name: str + :keyword display_name: Log display name. + :paramtype display_name: str + :keyword blob_duration: Log blob duration. + :paramtype blob_duration: str + """ + super().__init__(**kwargs) + self.name = name + self.display_name = display_name + self.blob_duration = blob_duration + + +class OperationMetricSpecificationDefinition(_serialization.Model): + """The definition of Azure Monitoring metric. + + :ivar name: Metric name. + :vartype name: str + :ivar display_name: Metric display name. + :vartype display_name: str + :ivar display_description: Metric description. + :vartype display_description: str + :ivar unit: Metric unit. + :vartype unit: str + :ivar aggregation_type: Metric aggregation type. + :vartype aggregation_type: str + :ivar internal_metric_name: Internal metric name. + :vartype internal_metric_name: str + """ + + _attribute_map = { + "name": {"key": "name", "type": "str"}, + "display_name": {"key": "displayName", "type": "str"}, + "display_description": {"key": "displayDescription", "type": "str"}, + "unit": {"key": "unit", "type": "str"}, + "aggregation_type": {"key": "aggregationType", "type": "str"}, + "internal_metric_name": {"key": "internalMetricName", "type": "str"}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + display_name: Optional[str] = None, + display_description: Optional[str] = None, + unit: Optional[str] = None, + aggregation_type: Optional[str] = None, + internal_metric_name: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword name: Metric name. + :paramtype name: str + :keyword display_name: Metric display name. + :paramtype display_name: str + :keyword display_description: Metric description. + :paramtype display_description: str + :keyword unit: Metric unit. + :paramtype unit: str + :keyword aggregation_type: Metric aggregation type. + :paramtype aggregation_type: str + :keyword internal_metric_name: Internal metric name. + :paramtype internal_metric_name: str + """ + super().__init__(**kwargs) + self.name = name + self.display_name = display_name + self.display_description = display_description + self.unit = unit + self.aggregation_type = aggregation_type + self.internal_metric_name = internal_metric_name + + +class OperationPropertiesDefinition(_serialization.Model): + """The definition of Azure Monitoring properties. + + :ivar service_specification: The definition of Azure Monitoring service. + :vartype service_specification: + ~container_registry_management_client.models.OperationServiceSpecificationDefinition + """ + + _attribute_map = { + "service_specification": {"key": "serviceSpecification", "type": "OperationServiceSpecificationDefinition"}, + } + + def __init__( + self, + *, + service_specification: Optional["_models.OperationServiceSpecificationDefinition"] = None, + **kwargs: Any + ) -> None: + """ + :keyword service_specification: The definition of Azure Monitoring service. + :paramtype service_specification: + ~container_registry_management_client.models.OperationServiceSpecificationDefinition + """ + super().__init__(**kwargs) + self.service_specification = service_specification + + +class OperationServiceSpecificationDefinition(_serialization.Model): + """The definition of Azure Monitoring list. + + :ivar metric_specifications: A list of Azure Monitoring metrics definition. + :vartype metric_specifications: + list[~container_registry_management_client.models.OperationMetricSpecificationDefinition] + :ivar log_specifications: A list of Azure Monitoring log definitions. + :vartype log_specifications: + list[~container_registry_management_client.models.OperationLogSpecificationDefinition] + """ + + _attribute_map = { + "metric_specifications": {"key": "metricSpecifications", "type": "[OperationMetricSpecificationDefinition]"}, + "log_specifications": {"key": "logSpecifications", "type": "[OperationLogSpecificationDefinition]"}, + } + + def __init__( + self, + *, + metric_specifications: Optional[list["_models.OperationMetricSpecificationDefinition"]] = None, + log_specifications: Optional[list["_models.OperationLogSpecificationDefinition"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword metric_specifications: A list of Azure Monitoring metrics definition. + :paramtype metric_specifications: + list[~container_registry_management_client.models.OperationMetricSpecificationDefinition] + :keyword log_specifications: A list of Azure Monitoring log definitions. + :paramtype log_specifications: + list[~container_registry_management_client.models.OperationLogSpecificationDefinition] + """ + super().__init__(**kwargs) + self.metric_specifications = metric_specifications + self.log_specifications = log_specifications + + +class ParentProperties(_serialization.Model): + """The properties of the connected registry parent. + + All required parameters must be populated in order to send to server. + + :ivar id: The resource ID of the parent to which the connected registry will be associated. + :vartype id: str + :ivar sync_properties: The sync properties of the connected registry with its parent. Required. + :vartype sync_properties: ~container_registry_management_client.models.SyncProperties + """ + + _validation = { + "sync_properties": {"required": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "sync_properties": {"key": "syncProperties", "type": "SyncProperties"}, + } + + def __init__( + self, + *, + sync_properties: "_models.SyncProperties", + id: Optional[str] = None, # pylint: disable=redefined-builtin + **kwargs: Any + ) -> None: + """ + :keyword id: The resource ID of the parent to which the connected registry will be associated. + :paramtype id: str + :keyword sync_properties: The sync properties of the connected registry with its parent. + Required. + :paramtype sync_properties: ~container_registry_management_client.models.SyncProperties + """ + super().__init__(**kwargs) + self.id = id + self.sync_properties = sync_properties + + +class PipelineRun(ProxyResource): + """An object that represents a pipeline run for a container registry. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. E.g. + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~container_registry_management_client.models.SystemData + :ivar properties: The properties of a pipeline run. + :vartype properties: ~container_registry_management_client.models.PipelineRunProperties + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "PipelineRunProperties"}, + } + + def __init__(self, *, properties: Optional["_models.PipelineRunProperties"] = None, **kwargs: Any) -> None: + """ + :keyword properties: The properties of a pipeline run. + :paramtype properties: ~container_registry_management_client.models.PipelineRunProperties + """ + super().__init__(**kwargs) + self.properties = properties + + +class PipelineRunListResult(_serialization.Model): + """The result of a request to list pipeline runs for a container registry. + + :ivar value: The list of pipeline runs. Since this list may be incomplete, the nextLink field + should be used to request the next list of pipeline runs. + :vartype value: list[~container_registry_management_client.models.PipelineRun] + :ivar next_link: The URI that can be used to request the next list of pipeline runs. + :vartype next_link: str + """ + + _attribute_map = { + "value": {"key": "value", "type": "[PipelineRun]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__( + self, *, value: Optional[list["_models.PipelineRun"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: + """ + :keyword value: The list of pipeline runs. Since this list may be incomplete, the nextLink + field should be used to request the next list of pipeline runs. + :paramtype value: list[~container_registry_management_client.models.PipelineRun] + :keyword next_link: The URI that can be used to request the next list of pipeline runs. + :paramtype next_link: str + """ + super().__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class PipelineRunProperties(_serialization.Model): + """The properties of a pipeline run. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar provisioning_state: The provisioning state of a pipeline run. Known values are: + "Creating", "Updating", "Deleting", "Succeeded", "Failed", and "Canceled". + :vartype provisioning_state: str or + ~container_registry_management_client.models.ProvisioningState + :ivar request: The request parameters for a pipeline run. + :vartype request: ~container_registry_management_client.models.PipelineRunRequest + :ivar response: The response of a pipeline run. + :vartype response: ~container_registry_management_client.models.PipelineRunResponse + :ivar force_update_tag: How the pipeline run should be forced to recreate even if the pipeline + run configuration has not changed. + :vartype force_update_tag: str + """ + + _validation = { + "provisioning_state": {"readonly": True}, + "response": {"readonly": True}, + } + + _attribute_map = { + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "request": {"key": "request", "type": "PipelineRunRequest"}, + "response": {"key": "response", "type": "PipelineRunResponse"}, + "force_update_tag": {"key": "forceUpdateTag", "type": "str"}, + } + + def __init__( + self, + *, + request: Optional["_models.PipelineRunRequest"] = None, + force_update_tag: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword request: The request parameters for a pipeline run. + :paramtype request: ~container_registry_management_client.models.PipelineRunRequest + :keyword force_update_tag: How the pipeline run should be forced to recreate even if the + pipeline run configuration has not changed. + :paramtype force_update_tag: str + """ + super().__init__(**kwargs) + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + self.request = request + self.response: Optional["_models.PipelineRunResponse"] = None + self.force_update_tag = force_update_tag + + +class PipelineRunRequest(_serialization.Model): + """The request properties provided for a pipeline run. + + :ivar pipeline_resource_id: The resource ID of the pipeline to run. + :vartype pipeline_resource_id: str + :ivar artifacts: List of source artifacts to be transferred by the pipeline. Specify an image + by repository ('hello-world'). This will use the 'latest' tag. Specify an image by tag + ('hello-world:latest'). Specify an image by sha256-based manifest digest + ('hello-world@sha256:abc123'). + :vartype artifacts: list[str] + :ivar source: The source properties of the pipeline run. + :vartype source: ~container_registry_management_client.models.PipelineRunSourceProperties + :ivar target: The target properties of the pipeline run. + :vartype target: ~container_registry_management_client.models.PipelineRunTargetProperties + :ivar catalog_digest: The digest of the tar used to transfer the artifacts. + :vartype catalog_digest: str + """ + + _attribute_map = { + "pipeline_resource_id": {"key": "pipelineResourceId", "type": "str"}, + "artifacts": {"key": "artifacts", "type": "[str]"}, + "source": {"key": "source", "type": "PipelineRunSourceProperties"}, + "target": {"key": "target", "type": "PipelineRunTargetProperties"}, + "catalog_digest": {"key": "catalogDigest", "type": "str"}, + } + + def __init__( + self, + *, + pipeline_resource_id: Optional[str] = None, + artifacts: Optional[list[str]] = None, + source: Optional["_models.PipelineRunSourceProperties"] = None, + target: Optional["_models.PipelineRunTargetProperties"] = None, + catalog_digest: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword pipeline_resource_id: The resource ID of the pipeline to run. + :paramtype pipeline_resource_id: str + :keyword artifacts: List of source artifacts to be transferred by the pipeline. Specify an + image by repository ('hello-world'). This will use the 'latest' tag. Specify an image by tag + ('hello-world:latest'). Specify an image by sha256-based manifest digest + ('hello-world@sha256:abc123'). + :paramtype artifacts: list[str] + :keyword source: The source properties of the pipeline run. + :paramtype source: ~container_registry_management_client.models.PipelineRunSourceProperties + :keyword target: The target properties of the pipeline run. + :paramtype target: ~container_registry_management_client.models.PipelineRunTargetProperties + :keyword catalog_digest: The digest of the tar used to transfer the artifacts. + :paramtype catalog_digest: str + """ + super().__init__(**kwargs) + self.pipeline_resource_id = pipeline_resource_id + self.artifacts = artifacts + self.source = source + self.target = target + self.catalog_digest = catalog_digest + + +class PipelineRunResponse(_serialization.Model): + """The response properties returned for a pipeline run. + + :ivar status: The current status of the pipeline run. + :vartype status: str + :ivar imported_artifacts: The artifacts imported in the pipeline run. + :vartype imported_artifacts: list[str] + :ivar progress: The current progress of the copy operation. + :vartype progress: ~container_registry_management_client.models.ProgressProperties + :ivar start_time: The time the pipeline run started. + :vartype start_time: ~datetime.datetime + :ivar finish_time: The time the pipeline run finished. + :vartype finish_time: ~datetime.datetime + :ivar source: The source of the pipeline run. + :vartype source: ~container_registry_management_client.models.ImportPipelineSourceProperties + :ivar target: The target of the pipeline run. + :vartype target: ~container_registry_management_client.models.ExportPipelineTargetProperties + :ivar catalog_digest: The digest of the tar used to transfer the artifacts. + :vartype catalog_digest: str + :ivar trigger: The trigger that caused the pipeline run. + :vartype trigger: ~container_registry_management_client.models.PipelineTriggerDescriptor + :ivar pipeline_run_error_message: The detailed error message for the pipeline run in the case + of failure. + :vartype pipeline_run_error_message: str + """ + + _attribute_map = { + "status": {"key": "status", "type": "str"}, + "imported_artifacts": {"key": "importedArtifacts", "type": "[str]"}, + "progress": {"key": "progress", "type": "ProgressProperties"}, + "start_time": {"key": "startTime", "type": "iso-8601"}, + "finish_time": {"key": "finishTime", "type": "iso-8601"}, + "source": {"key": "source", "type": "ImportPipelineSourceProperties"}, + "target": {"key": "target", "type": "ExportPipelineTargetProperties"}, + "catalog_digest": {"key": "catalogDigest", "type": "str"}, + "trigger": {"key": "trigger", "type": "PipelineTriggerDescriptor"}, + "pipeline_run_error_message": {"key": "pipelineRunErrorMessage", "type": "str"}, + } + + def __init__( + self, + *, + status: Optional[str] = None, + imported_artifacts: Optional[list[str]] = None, + progress: Optional["_models.ProgressProperties"] = None, + start_time: Optional[datetime.datetime] = None, + finish_time: Optional[datetime.datetime] = None, + source: Optional["_models.ImportPipelineSourceProperties"] = None, + target: Optional["_models.ExportPipelineTargetProperties"] = None, + catalog_digest: Optional[str] = None, + trigger: Optional["_models.PipelineTriggerDescriptor"] = None, + pipeline_run_error_message: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword status: The current status of the pipeline run. + :paramtype status: str + :keyword imported_artifacts: The artifacts imported in the pipeline run. + :paramtype imported_artifacts: list[str] + :keyword progress: The current progress of the copy operation. + :paramtype progress: ~container_registry_management_client.models.ProgressProperties + :keyword start_time: The time the pipeline run started. + :paramtype start_time: ~datetime.datetime + :keyword finish_time: The time the pipeline run finished. + :paramtype finish_time: ~datetime.datetime + :keyword source: The source of the pipeline run. + :paramtype source: ~container_registry_management_client.models.ImportPipelineSourceProperties + :keyword target: The target of the pipeline run. + :paramtype target: ~container_registry_management_client.models.ExportPipelineTargetProperties + :keyword catalog_digest: The digest of the tar used to transfer the artifacts. + :paramtype catalog_digest: str + :keyword trigger: The trigger that caused the pipeline run. + :paramtype trigger: ~container_registry_management_client.models.PipelineTriggerDescriptor + :keyword pipeline_run_error_message: The detailed error message for the pipeline run in the + case of failure. + :paramtype pipeline_run_error_message: str + """ + super().__init__(**kwargs) + self.status = status + self.imported_artifacts = imported_artifacts + self.progress = progress + self.start_time = start_time + self.finish_time = finish_time + self.source = source + self.target = target + self.catalog_digest = catalog_digest + self.trigger = trigger + self.pipeline_run_error_message = pipeline_run_error_message + + +class PipelineRunSourceProperties(_serialization.Model): + """The pipeline run source properties. + + :ivar type: The type of the source. "AzureStorageBlob" + :vartype type: str or ~container_registry_management_client.models.PipelineRunSourceType + :ivar name: The name of the source. + :vartype name: str + """ + + _attribute_map = { + "type": {"key": "type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + } + + def __init__( + self, + *, + type: Union[str, "_models.PipelineRunSourceType"] = "AzureStorageBlob", + name: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword type: The type of the source. "AzureStorageBlob" + :paramtype type: str or ~container_registry_management_client.models.PipelineRunSourceType + :keyword name: The name of the source. + :paramtype name: str + """ + super().__init__(**kwargs) + self.type = type + self.name = name + + +class PipelineRunTargetProperties(_serialization.Model): + """The pipeline run target properties. + + :ivar type: The type of the target. "AzureStorageBlob" + :vartype type: str or ~container_registry_management_client.models.PipelineRunTargetType + :ivar name: The name of the target. + :vartype name: str + """ + + _attribute_map = { + "type": {"key": "type", "type": "str"}, + "name": {"key": "name", "type": "str"}, + } + + def __init__( + self, + *, + type: Union[str, "_models.PipelineRunTargetType"] = "AzureStorageBlob", + name: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword type: The type of the target. "AzureStorageBlob" + :paramtype type: str or ~container_registry_management_client.models.PipelineRunTargetType + :keyword name: The name of the target. + :paramtype name: str + """ + super().__init__(**kwargs) + self.type = type + self.name = name + + +class PipelineSourceTriggerDescriptor(_serialization.Model): + """The pipeline source trigger descriptor. + + :ivar timestamp: The timestamp when the source update happened. + :vartype timestamp: ~datetime.datetime + """ + + _attribute_map = { + "timestamp": {"key": "timestamp", "type": "iso-8601"}, + } + + def __init__(self, *, timestamp: Optional[datetime.datetime] = None, **kwargs: Any) -> None: + """ + :keyword timestamp: The timestamp when the source update happened. + :paramtype timestamp: ~datetime.datetime + """ + super().__init__(**kwargs) + self.timestamp = timestamp + + +class PipelineSourceTriggerProperties(_serialization.Model): + """The source trigger properties of the import pipeline. + + All required parameters must be populated in order to send to server. + + :ivar status: The current status of the source trigger. Known values are: "Enabled" and + "Disabled". + :vartype status: str or ~container_registry_management_client.models.TriggerStatus + """ + + _validation = { + "status": {"required": True}, + } + + _attribute_map = { + "status": {"key": "status", "type": "str"}, + } + + def __init__(self, *, status: Union[str, "_models.TriggerStatus"] = "Enabled", **kwargs: Any) -> None: + """ + :keyword status: The current status of the source trigger. Known values are: "Enabled" and + "Disabled". + :paramtype status: str or ~container_registry_management_client.models.TriggerStatus + """ + super().__init__(**kwargs) + self.status = status + + +class PipelineTriggerDescriptor(_serialization.Model): + """The pipeline trigger descriptor. + + :ivar source_trigger: The source trigger that caused the pipeline run. + :vartype source_trigger: + ~container_registry_management_client.models.PipelineSourceTriggerDescriptor + """ + + _attribute_map = { + "source_trigger": {"key": "sourceTrigger", "type": "PipelineSourceTriggerDescriptor"}, + } + + def __init__( + self, *, source_trigger: Optional["_models.PipelineSourceTriggerDescriptor"] = None, **kwargs: Any + ) -> None: + """ + :keyword source_trigger: The source trigger that caused the pipeline run. + :paramtype source_trigger: + ~container_registry_management_client.models.PipelineSourceTriggerDescriptor + """ + super().__init__(**kwargs) + self.source_trigger = source_trigger + + +class PipelineTriggerProperties(_serialization.Model): + """The trigger properties of the import pipeline. + + :ivar source_trigger: The source trigger properties of the pipeline. + :vartype source_trigger: + ~container_registry_management_client.models.PipelineSourceTriggerProperties + """ + + _attribute_map = { + "source_trigger": {"key": "sourceTrigger", "type": "PipelineSourceTriggerProperties"}, + } + + def __init__( + self, *, source_trigger: Optional["_models.PipelineSourceTriggerProperties"] = None, **kwargs: Any + ) -> None: + """ + :keyword source_trigger: The source trigger properties of the pipeline. + :paramtype source_trigger: + ~container_registry_management_client.models.PipelineSourceTriggerProperties + """ + super().__init__(**kwargs) + self.source_trigger = source_trigger + + +class Policies(_serialization.Model): + """The policies for a container registry. + + :ivar quarantine_policy: The quarantine policy for a container registry. + :vartype quarantine_policy: ~container_registry_management_client.models.QuarantinePolicy + :ivar trust_policy: The content trust policy for a container registry. + :vartype trust_policy: ~container_registry_management_client.models.TrustPolicy + :ivar retention_policy: The retention policy for a container registry. + :vartype retention_policy: ~container_registry_management_client.models.RetentionPolicy + :ivar export_policy: The export policy for a container registry. + :vartype export_policy: ~container_registry_management_client.models.ExportPolicy + :ivar azure_ad_authentication_as_arm_policy: The policy for using Azure Resource Manager + audience token for a container registry. + :vartype azure_ad_authentication_as_arm_policy: + ~container_registry_management_client.models.AzureADAuthenticationAsArmPolicy + :ivar soft_delete_policy: The soft delete policy for a container registry. + :vartype soft_delete_policy: ~container_registry_management_client.models.SoftDeletePolicy + """ + + _attribute_map = { + "quarantine_policy": {"key": "quarantinePolicy", "type": "QuarantinePolicy"}, + "trust_policy": {"key": "trustPolicy", "type": "TrustPolicy"}, + "retention_policy": {"key": "retentionPolicy", "type": "RetentionPolicy"}, + "export_policy": {"key": "exportPolicy", "type": "ExportPolicy"}, + "azure_ad_authentication_as_arm_policy": { + "key": "azureADAuthenticationAsArmPolicy", + "type": "AzureADAuthenticationAsArmPolicy", + }, + "soft_delete_policy": {"key": "softDeletePolicy", "type": "SoftDeletePolicy"}, + } + + def __init__( + self, + *, + quarantine_policy: Optional["_models.QuarantinePolicy"] = None, + trust_policy: Optional["_models.TrustPolicy"] = None, + retention_policy: Optional["_models.RetentionPolicy"] = None, + export_policy: Optional["_models.ExportPolicy"] = None, + azure_ad_authentication_as_arm_policy: Optional["_models.AzureADAuthenticationAsArmPolicy"] = None, + soft_delete_policy: Optional["_models.SoftDeletePolicy"] = None, + **kwargs: Any + ) -> None: + """ + :keyword quarantine_policy: The quarantine policy for a container registry. + :paramtype quarantine_policy: ~container_registry_management_client.models.QuarantinePolicy + :keyword trust_policy: The content trust policy for a container registry. + :paramtype trust_policy: ~container_registry_management_client.models.TrustPolicy + :keyword retention_policy: The retention policy for a container registry. + :paramtype retention_policy: ~container_registry_management_client.models.RetentionPolicy + :keyword export_policy: The export policy for a container registry. + :paramtype export_policy: ~container_registry_management_client.models.ExportPolicy + :keyword azure_ad_authentication_as_arm_policy: The policy for using Azure Resource Manager + audience token for a container registry. + :paramtype azure_ad_authentication_as_arm_policy: + ~container_registry_management_client.models.AzureADAuthenticationAsArmPolicy + :keyword soft_delete_policy: The soft delete policy for a container registry. + :paramtype soft_delete_policy: ~container_registry_management_client.models.SoftDeletePolicy + """ + super().__init__(**kwargs) + self.quarantine_policy = quarantine_policy + self.trust_policy = trust_policy + self.retention_policy = retention_policy + self.export_policy = export_policy + self.azure_ad_authentication_as_arm_policy = azure_ad_authentication_as_arm_policy + self.soft_delete_policy = soft_delete_policy + + +class PrivateEndpoint(_serialization.Model): + """The Private Endpoint resource. + + :ivar id: This is private endpoint resource created with Microsoft.Network resource provider. + :vartype id: str + """ + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + } + + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin + """ + :keyword id: This is private endpoint resource created with Microsoft.Network resource + provider. + :paramtype id: str + """ + super().__init__(**kwargs) + self.id = id + + +class PrivateEndpointConnection(ProxyResource): + """An object that represents a private endpoint connection for a container registry. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. E.g. + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~container_registry_management_client.models.SystemData + :ivar properties: The properties of a private endpoint connection. + :vartype properties: + ~container_registry_management_client.models.PrivateEndpointConnectionProperties + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "PrivateEndpointConnectionProperties"}, + } + + def __init__( + self, *, properties: Optional["_models.PrivateEndpointConnectionProperties"] = None, **kwargs: Any + ) -> None: + """ + :keyword properties: The properties of a private endpoint connection. + :paramtype properties: + ~container_registry_management_client.models.PrivateEndpointConnectionProperties + """ + super().__init__(**kwargs) + self.properties = properties + + +class PrivateEndpointConnectionListResult(_serialization.Model): + """The result of a request to list private endpoint connections for a container registry. + + :ivar value: The list of private endpoint connections. Since this list may be incomplete, the + nextLink field should be used to request the next list of private endpoint connections. + :vartype value: list[~container_registry_management_client.models.PrivateEndpointConnection] + :ivar next_link: The URI that can be used to request the next list of private endpoint + connections. + :vartype next_link: str + """ + + _attribute_map = { + "value": {"key": "value", "type": "[PrivateEndpointConnection]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__( + self, + *, + value: Optional[list["_models.PrivateEndpointConnection"]] = None, + next_link: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword value: The list of private endpoint connections. Since this list may be incomplete, + the nextLink field should be used to request the next list of private endpoint connections. + :paramtype value: list[~container_registry_management_client.models.PrivateEndpointConnection] + :keyword next_link: The URI that can be used to request the next list of private endpoint + connections. + :paramtype next_link: str + """ + super().__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class PrivateEndpointConnectionProperties(_serialization.Model): + """The properties of a private endpoint connection. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar private_endpoint: The resource of private endpoint. + :vartype private_endpoint: ~container_registry_management_client.models.PrivateEndpoint + :ivar private_link_service_connection_state: A collection of information about the state of the + connection between service consumer and provider. + :vartype private_link_service_connection_state: + ~container_registry_management_client.models.PrivateLinkServiceConnectionState + :ivar provisioning_state: The provisioning state of private endpoint connection resource. Known + values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and "Canceled". + :vartype provisioning_state: str or + ~container_registry_management_client.models.ProvisioningState + """ + + _validation = { + "provisioning_state": {"readonly": True}, + } + + _attribute_map = { + "private_endpoint": {"key": "privateEndpoint", "type": "PrivateEndpoint"}, + "private_link_service_connection_state": { + "key": "privateLinkServiceConnectionState", + "type": "PrivateLinkServiceConnectionState", + }, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + } + + def __init__( + self, + *, + private_endpoint: Optional["_models.PrivateEndpoint"] = None, + private_link_service_connection_state: Optional["_models.PrivateLinkServiceConnectionState"] = None, + **kwargs: Any + ) -> None: + """ + :keyword private_endpoint: The resource of private endpoint. + :paramtype private_endpoint: ~container_registry_management_client.models.PrivateEndpoint + :keyword private_link_service_connection_state: A collection of information about the state of + the connection between service consumer and provider. + :paramtype private_link_service_connection_state: + ~container_registry_management_client.models.PrivateLinkServiceConnectionState + """ + super().__init__(**kwargs) + self.private_endpoint = private_endpoint + self.private_link_service_connection_state = private_link_service_connection_state + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + + +class PrivateLinkResource(Resource): + """A private link resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. E.g. + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~container_registry_management_client.models.SystemData + :ivar properties: Resource properties. + :vartype properties: ~container_registry_management_client.models.PrivateLinkResourceProperties + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "PrivateLinkResourceProperties"}, + } + + def __init__(self, *, properties: Optional["_models.PrivateLinkResourceProperties"] = None, **kwargs: Any) -> None: + """ + :keyword properties: Resource properties. + :paramtype properties: + ~container_registry_management_client.models.PrivateLinkResourceProperties + """ + super().__init__(**kwargs) + self.properties = properties + + +class PrivateLinkResourceListResult(_serialization.Model): + """The result of a request to list private link resources for a container registry. + + :ivar value: The list of private link resources. Since this list may be incomplete, the + nextLink field should be used to request the next list of private link resources. + :vartype value: list[~container_registry_management_client.models.PrivateLinkResource] + :ivar next_link: The URI that can be used to request the next list of private link resources. + :vartype next_link: str + """ + + _attribute_map = { + "value": {"key": "value", "type": "[PrivateLinkResource]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__( + self, + *, + value: Optional[list["_models.PrivateLinkResource"]] = None, + next_link: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword value: The list of private link resources. Since this list may be incomplete, the + nextLink field should be used to request the next list of private link resources. + :paramtype value: list[~container_registry_management_client.models.PrivateLinkResource] + :keyword next_link: The URI that can be used to request the next list of private link + resources. + :paramtype next_link: str + """ + super().__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class PrivateLinkResourceProperties(_serialization.Model): + """Properties of a private link resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar group_id: The private link resource group id. + :vartype group_id: str + :ivar required_members: The private link resource required member names. + :vartype required_members: list[str] + :ivar required_zone_names: The private link resource private link DNS zone name. + :vartype required_zone_names: list[str] + """ + + _validation = { + "group_id": {"readonly": True}, + "required_members": {"readonly": True}, + } + + _attribute_map = { + "group_id": {"key": "groupId", "type": "str"}, + "required_members": {"key": "requiredMembers", "type": "[str]"}, + "required_zone_names": {"key": "requiredZoneNames", "type": "[str]"}, + } + + def __init__(self, *, required_zone_names: Optional[list[str]] = None, **kwargs: Any) -> None: + """ + :keyword required_zone_names: The private link resource private link DNS zone name. + :paramtype required_zone_names: list[str] + """ + super().__init__(**kwargs) + self.group_id: Optional[str] = None + self.required_members: Optional[list[str]] = None + self.required_zone_names = required_zone_names + + +class PrivateLinkServiceConnectionState(_serialization.Model): + """The state of a private link service connection. + + :ivar status: The private link service connection status. Known values are: "Approved", + "Pending", "Rejected", and "Disconnected". + :vartype status: str or ~container_registry_management_client.models.ConnectionStatus + :ivar description: The description for connection status. For example if connection is rejected + it can indicate reason for rejection. + :vartype description: str + :ivar actions_required: A message indicating if changes on the service provider require any + updates on the consumer. Known values are: "None" and "Recreate". + :vartype actions_required: str or ~container_registry_management_client.models.ActionsRequired + """ + + _attribute_map = { + "status": {"key": "status", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "actions_required": {"key": "actionsRequired", "type": "str"}, + } + + def __init__( + self, + *, + status: Optional[Union[str, "_models.ConnectionStatus"]] = None, + description: Optional[str] = None, + actions_required: Optional[Union[str, "_models.ActionsRequired"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword status: The private link service connection status. Known values are: "Approved", + "Pending", "Rejected", and "Disconnected". + :paramtype status: str or ~container_registry_management_client.models.ConnectionStatus + :keyword description: The description for connection status. For example if connection is + rejected it can indicate reason for rejection. + :paramtype description: str + :keyword actions_required: A message indicating if changes on the service provider require any + updates on the consumer. Known values are: "None" and "Recreate". + :paramtype actions_required: str or + ~container_registry_management_client.models.ActionsRequired + """ + super().__init__(**kwargs) + self.status = status + self.description = description + self.actions_required = actions_required + + +class ProgressProperties(_serialization.Model): + """The progress properties. + + :ivar percentage: The percentage complete of the copy operation. + :vartype percentage: str + """ + + _attribute_map = { + "percentage": {"key": "percentage", "type": "str"}, + } + + def __init__(self, *, percentage: Optional[str] = None, **kwargs: Any) -> None: + """ + :keyword percentage: The percentage complete of the copy operation. + :paramtype percentage: str + """ + super().__init__(**kwargs) + self.percentage = percentage + + +class QuarantinePolicy(_serialization.Model): + """The quarantine policy for a container registry. + + :ivar status: The value that indicates whether the policy is enabled or not. Known values are: + "enabled" and "disabled". + :vartype status: str or ~container_registry_management_client.models.PolicyStatus + """ + + _attribute_map = { + "status": {"key": "status", "type": "str"}, + } + + def __init__(self, *, status: Optional[Union[str, "_models.PolicyStatus"]] = None, **kwargs: Any) -> None: + """ + :keyword status: The value that indicates whether the policy is enabled or not. Known values + are: "enabled" and "disabled". + :paramtype status: str or ~container_registry_management_client.models.PolicyStatus + """ + super().__init__(**kwargs) + self.status = status + + +class RegenerateCredentialParameters(_serialization.Model): + """The parameters used to regenerate the login credential. + + All required parameters must be populated in order to send to server. + + :ivar name: Specifies name of the password which should be regenerated -- password or + password2. Required. Known values are: "password" and "password2". + :vartype name: str or ~container_registry_management_client.models.PasswordName + """ + + _validation = { + "name": {"required": True}, + } + + _attribute_map = { + "name": {"key": "name", "type": "str"}, + } + + def __init__(self, *, name: Union[str, "_models.PasswordName"], **kwargs: Any) -> None: + """ + :keyword name: Specifies name of the password which should be regenerated -- password or + password2. Required. Known values are: "password" and "password2". + :paramtype name: str or ~container_registry_management_client.models.PasswordName + """ + super().__init__(**kwargs) + self.name = name + + +class TrackedResource(Resource): + """The resource model definition for an Azure Resource Manager tracked top level resource which + has 'tags' and a 'location'. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to server. + + :ivar id: Fully qualified resource ID for the resource. E.g. + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~container_registry_management_client.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "location": {"required": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "tags": {"key": "tags", "type": "{str}"}, + "location": {"key": "location", "type": "str"}, + } + + def __init__(self, *, location: str, tags: Optional[dict[str, str]] = None, **kwargs: Any) -> None: + """ + :keyword tags: Resource tags. + :paramtype tags: dict[str, str] + :keyword location: The geo-location where the resource lives. Required. + :paramtype location: str + """ + super().__init__(**kwargs) + self.tags = tags + self.location = location + + +class Registry(TrackedResource): + """An object that represents a container registry. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to server. + + :ivar id: Fully qualified resource ID for the resource. E.g. + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~container_registry_management_client.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: The properties of the container registry. + :vartype properties: ~container_registry_management_client.models.RegistryProperties + :ivar sku: The SKU of the container registry. Required. + :vartype sku: ~container_registry_management_client.models.Sku + :ivar identity: The identity of the container registry. + :vartype identity: ~container_registry_management_client.models.IdentityProperties + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "location": {"required": True}, + "sku": {"required": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "tags": {"key": "tags", "type": "{str}"}, + "location": {"key": "location", "type": "str"}, + "properties": {"key": "properties", "type": "RegistryProperties"}, + "sku": {"key": "sku", "type": "Sku"}, + "identity": {"key": "identity", "type": "IdentityProperties"}, + } + + def __init__( + self, + *, + location: str, + sku: "_models.Sku", + tags: Optional[dict[str, str]] = None, + properties: Optional["_models.RegistryProperties"] = None, + identity: Optional["_models.IdentityProperties"] = None, + **kwargs: Any + ) -> None: + """ + :keyword tags: Resource tags. + :paramtype tags: dict[str, str] + :keyword location: The geo-location where the resource lives. Required. + :paramtype location: str + :keyword properties: The properties of the container registry. + :paramtype properties: ~container_registry_management_client.models.RegistryProperties + :keyword sku: The SKU of the container registry. Required. + :paramtype sku: ~container_registry_management_client.models.Sku + :keyword identity: The identity of the container registry. + :paramtype identity: ~container_registry_management_client.models.IdentityProperties + """ + super().__init__(tags=tags, location=location, **kwargs) + self.properties = properties + self.sku = sku + self.identity = identity + + +class RegistryListCredentialsResult(_serialization.Model): + """The response from the ListCredentials operation. + + :ivar username: The username for a container registry. + :vartype username: str + :ivar passwords: The list of passwords for a container registry. + :vartype passwords: list[~container_registry_management_client.models.RegistryPassword] + """ + + _attribute_map = { + "username": {"key": "username", "type": "str"}, + "passwords": {"key": "passwords", "type": "[RegistryPassword]"}, + } + + def __init__( + self, + *, + username: Optional[str] = None, + passwords: Optional[list["_models.RegistryPassword"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword username: The username for a container registry. + :paramtype username: str + :keyword passwords: The list of passwords for a container registry. + :paramtype passwords: list[~container_registry_management_client.models.RegistryPassword] + """ + super().__init__(**kwargs) + self.username = username + self.passwords = passwords + + +class RegistryListResult(_serialization.Model): + """The result of a request to list container registries. + + :ivar value: The list of container registries. Since this list may be incomplete, the nextLink + field should be used to request the next list of container registries. + :vartype value: list[~container_registry_management_client.models.Registry] + :ivar next_link: The URI that can be used to request the next list of container registries. + :vartype next_link: str + """ + + _attribute_map = { + "value": {"key": "value", "type": "[Registry]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__( + self, *, value: Optional[list["_models.Registry"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: + """ + :keyword value: The list of container registries. Since this list may be incomplete, the + nextLink field should be used to request the next list of container registries. + :paramtype value: list[~container_registry_management_client.models.Registry] + :keyword next_link: The URI that can be used to request the next list of container registries. + :paramtype next_link: str + """ + super().__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class RegistryNameCheckRequest(_serialization.Model): + """A request to check whether a container registry name is available. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to server. + + :ivar name: The name of the container registry. Required. + :vartype name: str + :ivar type: The resource type of the container registry. This field must be set to + 'Microsoft.ContainerRegistry/registries'. Required. Default value is + "Microsoft.ContainerRegistry/registries". + :vartype type: str + :ivar resource_group_name: The resource group name of the container registry. + :vartype resource_group_name: str + :ivar auto_generated_domain_name_label_scope: The auto generated domain name label of the + container registry. This value defaults to "Unsecure". Known values are: "Unsecure", + "TenantReuse", "SubscriptionReuse", "ResourceGroupReuse", and "NoReuse". + :vartype auto_generated_domain_name_label_scope: str or + ~container_registry_management_client.models.AutoGeneratedDomainNameLabelScope + """ + + _validation = { + "name": {"required": True, "max_length": 50, "min_length": 5, "pattern": r"^[a-zA-Z0-9]*$"}, + "type": {"required": True, "constant": True}, + "resource_group_name": {"max_length": 90, "min_length": 1}, + } + + _attribute_map = { + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "resource_group_name": {"key": "resourceGroupName", "type": "str"}, + "auto_generated_domain_name_label_scope": {"key": "autoGeneratedDomainNameLabelScope", "type": "str"}, + } + + type = "Microsoft.ContainerRegistry/registries" + + def __init__( + self, + *, + name: str, + resource_group_name: Optional[str] = None, + auto_generated_domain_name_label_scope: Optional[ + Union[str, "_models.AutoGeneratedDomainNameLabelScope"] + ] = None, + **kwargs: Any + ) -> None: + """ + :keyword name: The name of the container registry. Required. + :paramtype name: str + :keyword resource_group_name: The resource group name of the container registry. + :paramtype resource_group_name: str + :keyword auto_generated_domain_name_label_scope: The auto generated domain name label of the + container registry. This value defaults to "Unsecure". Known values are: "Unsecure", + "TenantReuse", "SubscriptionReuse", "ResourceGroupReuse", and "NoReuse". + :paramtype auto_generated_domain_name_label_scope: str or + ~container_registry_management_client.models.AutoGeneratedDomainNameLabelScope + """ + super().__init__(**kwargs) + self.name = name + self.resource_group_name = resource_group_name + self.auto_generated_domain_name_label_scope = auto_generated_domain_name_label_scope + + +class RegistryNameStatus(_serialization.Model): + """The result of a request to check the availability of a container registry name. + + :ivar available_login_server_name: The complete login server name with domain name label (DNL) + hash, if available. + :vartype available_login_server_name: str + :ivar name_available: The value that indicates whether the name is available. + :vartype name_available: bool + :ivar reason: If any, the reason that the name is not available. + :vartype reason: str + :ivar message: If any, the error message that provides more detail for the reason that the name + is not available. + :vartype message: str + """ + + _attribute_map = { + "available_login_server_name": {"key": "availableLoginServerName", "type": "str"}, + "name_available": {"key": "nameAvailable", "type": "bool"}, + "reason": {"key": "reason", "type": "str"}, + "message": {"key": "message", "type": "str"}, + } + + def __init__( + self, + *, + available_login_server_name: Optional[str] = None, + name_available: Optional[bool] = None, + reason: Optional[str] = None, + message: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword available_login_server_name: The complete login server name with domain name label + (DNL) hash, if available. + :paramtype available_login_server_name: str + :keyword name_available: The value that indicates whether the name is available. + :paramtype name_available: bool + :keyword reason: If any, the reason that the name is not available. + :paramtype reason: str + :keyword message: If any, the error message that provides more detail for the reason that the + name is not available. + :paramtype message: str + """ + super().__init__(**kwargs) + self.available_login_server_name = available_login_server_name + self.name_available = name_available + self.reason = reason + self.message = message + + +class RegistryPassword(_serialization.Model): + """The login password for the container registry. + + :ivar name: The password name. Known values are: "password" and "password2". + :vartype name: str or ~container_registry_management_client.models.PasswordName + :ivar value: The password value. + :vartype value: str + """ + + _attribute_map = { + "name": {"key": "name", "type": "str"}, + "value": {"key": "value", "type": "str"}, + } + + def __init__( + self, *, name: Optional[Union[str, "_models.PasswordName"]] = None, value: Optional[str] = None, **kwargs: Any + ) -> None: + """ + :keyword name: The password name. Known values are: "password" and "password2". + :paramtype name: str or ~container_registry_management_client.models.PasswordName + :keyword value: The password value. + :paramtype value: str + """ + super().__init__(**kwargs) + self.name = name + self.value = value + + +class RegistryProperties(_serialization.Model): + """The properties of a container registry. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar login_server: The URL that can be used to log into the container registry. + :vartype login_server: str + :ivar creation_date: The creation date of the container registry in ISO8601 format. + :vartype creation_date: ~datetime.datetime + :ivar provisioning_state: The provisioning state of the container registry at the time the + operation was called. Known values are: "Creating", "Updating", "Deleting", "Succeeded", + "Failed", and "Canceled". + :vartype provisioning_state: str or + ~container_registry_management_client.models.ProvisioningState + :ivar status: The status of the container registry at the time the operation was called. + :vartype status: ~container_registry_management_client.models.Status + :ivar admin_user_enabled: The value that indicates whether the admin user is enabled. + :vartype admin_user_enabled: bool + :ivar network_rule_set: The network rule set for a container registry. + :vartype network_rule_set: ~container_registry_management_client.models.NetworkRuleSet + :ivar policies: The policies for a container registry. + :vartype policies: ~container_registry_management_client.models.Policies + :ivar encryption: The encryption settings of container registry. + :vartype encryption: ~container_registry_management_client.models.EncryptionProperty + :ivar data_endpoint_enabled: Enable a single data endpoint per region for serving data. + :vartype data_endpoint_enabled: bool + :ivar data_endpoint_host_names: List of host names that will serve data when + dataEndpointEnabled is true. + :vartype data_endpoint_host_names: list[str] + :ivar regional_endpoints: Enable per-region endpoints for accessing registry. Known values are: + "Enabled" and "Disabled". + :vartype regional_endpoints: str or + ~container_registry_management_client.models.RegionalEndpoints + :ivar regional_endpoint_host_names: List of host names that will serve registry when + RegionalEndpoints is enabled. + :vartype regional_endpoint_host_names: list[str] + :ivar endpoint_protocol: The connectivity protocol for the registry, such as IPv4 or dual stack + (IPv4 and IPv6). Known values are: "IPv4" and "IPv4AndIPv6". + :vartype endpoint_protocol: str or + ~container_registry_management_client.models.EndpointProtocol + :ivar private_endpoint_connections: List of private endpoint connections for a container + registry. + :vartype private_endpoint_connections: + list[~container_registry_management_client.models.PrivateEndpointConnection] + :ivar public_network_access: Whether or not public network access is allowed for the container + registry. Known values are: "Enabled" and "Disabled". + :vartype public_network_access: str or + ~container_registry_management_client.models.PublicNetworkAccess + :ivar network_rule_bypass_options: Whether to allow trusted Azure services to access a network + restricted registry. Known values are: "AzureServices" and "None". + :vartype network_rule_bypass_options: str or + ~container_registry_management_client.models.NetworkRuleBypassOptions + :ivar network_rule_bypass_allowed_for_tasks: Whether or not Tasks allowed to bypass the network + rules for this container registry. + :vartype network_rule_bypass_allowed_for_tasks: bool + :ivar zone_redundancy: Whether or not zone redundancy is enabled for this container registry. + Known values are: "Enabled" and "Disabled". + :vartype zone_redundancy: str or ~container_registry_management_client.models.ZoneRedundancy + :ivar anonymous_pull_enabled: Enables registry-wide pull from unauthenticated clients. + :vartype anonymous_pull_enabled: bool + :ivar metadata_search: Determines whether registry artifacts are indexed for metadata search. + Known values are: "Enabled" and "Disabled". + :vartype metadata_search: str or ~container_registry_management_client.models.MetadataSearch + :ivar auto_generated_domain_name_label_scope: Determines the domain name label reuse scope. + Known values are: "Unsecure", "TenantReuse", "SubscriptionReuse", "ResourceGroupReuse", and + "NoReuse". + :vartype auto_generated_domain_name_label_scope: str or + ~container_registry_management_client.models.AutoGeneratedDomainNameLabelScope + :ivar role_assignment_mode: Determines registry role assignment mode. Known values are: + "AbacRepositoryPermissions" and "LegacyRegistryPermissions". + :vartype role_assignment_mode: str or + ~container_registry_management_client.models.RoleAssignmentMode + """ + + _validation = { + "login_server": {"readonly": True}, + "creation_date": {"readonly": True}, + "provisioning_state": {"readonly": True}, + "status": {"readonly": True}, + "data_endpoint_host_names": {"readonly": True}, + "regional_endpoint_host_names": {"readonly": True}, + "private_endpoint_connections": {"readonly": True}, + } + + _attribute_map = { + "login_server": {"key": "loginServer", "type": "str"}, + "creation_date": {"key": "creationDate", "type": "iso-8601"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "status": {"key": "status", "type": "Status"}, + "admin_user_enabled": {"key": "adminUserEnabled", "type": "bool"}, + "network_rule_set": {"key": "networkRuleSet", "type": "NetworkRuleSet"}, + "policies": {"key": "policies", "type": "Policies"}, + "encryption": {"key": "encryption", "type": "EncryptionProperty"}, + "data_endpoint_enabled": {"key": "dataEndpointEnabled", "type": "bool"}, + "data_endpoint_host_names": {"key": "dataEndpointHostNames", "type": "[str]"}, + "regional_endpoints": {"key": "regionalEndpoints", "type": "str"}, + "regional_endpoint_host_names": {"key": "regionalEndpointHostNames", "type": "[str]"}, + "endpoint_protocol": {"key": "endpointProtocol", "type": "str"}, + "private_endpoint_connections": {"key": "privateEndpointConnections", "type": "[PrivateEndpointConnection]"}, + "public_network_access": {"key": "publicNetworkAccess", "type": "str"}, + "network_rule_bypass_options": {"key": "networkRuleBypassOptions", "type": "str"}, + "network_rule_bypass_allowed_for_tasks": {"key": "networkRuleBypassAllowedForTasks", "type": "bool"}, + "zone_redundancy": {"key": "zoneRedundancy", "type": "str"}, + "anonymous_pull_enabled": {"key": "anonymousPullEnabled", "type": "bool"}, + "metadata_search": {"key": "metadataSearch", "type": "str"}, + "auto_generated_domain_name_label_scope": {"key": "autoGeneratedDomainNameLabelScope", "type": "str"}, + "role_assignment_mode": {"key": "roleAssignmentMode", "type": "str"}, + } + + def __init__( + self, + *, + admin_user_enabled: bool = False, + network_rule_set: Optional["_models.NetworkRuleSet"] = None, + policies: Optional["_models.Policies"] = None, + encryption: Optional["_models.EncryptionProperty"] = None, + data_endpoint_enabled: Optional[bool] = None, + regional_endpoints: Optional[Union[str, "_models.RegionalEndpoints"]] = None, + endpoint_protocol: Optional[Union[str, "_models.EndpointProtocol"]] = None, + public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, + network_rule_bypass_options: Optional[Union[str, "_models.NetworkRuleBypassOptions"]] = None, + network_rule_bypass_allowed_for_tasks: bool = False, + zone_redundancy: Optional[Union[str, "_models.ZoneRedundancy"]] = None, + anonymous_pull_enabled: bool = False, + metadata_search: Optional[Union[str, "_models.MetadataSearch"]] = None, + auto_generated_domain_name_label_scope: Optional[ + Union[str, "_models.AutoGeneratedDomainNameLabelScope"] + ] = None, + role_assignment_mode: Optional[Union[str, "_models.RoleAssignmentMode"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword admin_user_enabled: The value that indicates whether the admin user is enabled. + :paramtype admin_user_enabled: bool + :keyword network_rule_set: The network rule set for a container registry. + :paramtype network_rule_set: ~container_registry_management_client.models.NetworkRuleSet + :keyword policies: The policies for a container registry. + :paramtype policies: ~container_registry_management_client.models.Policies + :keyword encryption: The encryption settings of container registry. + :paramtype encryption: ~container_registry_management_client.models.EncryptionProperty + :keyword data_endpoint_enabled: Enable a single data endpoint per region for serving data. + :paramtype data_endpoint_enabled: bool + :keyword regional_endpoints: Enable per-region endpoints for accessing registry. Known values + are: "Enabled" and "Disabled". + :paramtype regional_endpoints: str or + ~container_registry_management_client.models.RegionalEndpoints + :keyword endpoint_protocol: The connectivity protocol for the registry, such as IPv4 or dual + stack (IPv4 and IPv6). Known values are: "IPv4" and "IPv4AndIPv6". + :paramtype endpoint_protocol: str or + ~container_registry_management_client.models.EndpointProtocol + :keyword public_network_access: Whether or not public network access is allowed for the + container registry. Known values are: "Enabled" and "Disabled". + :paramtype public_network_access: str or + ~container_registry_management_client.models.PublicNetworkAccess + :keyword network_rule_bypass_options: Whether to allow trusted Azure services to access a + network restricted registry. Known values are: "AzureServices" and "None". + :paramtype network_rule_bypass_options: str or + ~container_registry_management_client.models.NetworkRuleBypassOptions + :keyword network_rule_bypass_allowed_for_tasks: Whether or not Tasks allowed to bypass the + network rules for this container registry. + :paramtype network_rule_bypass_allowed_for_tasks: bool + :keyword zone_redundancy: Whether or not zone redundancy is enabled for this container + registry. Known values are: "Enabled" and "Disabled". + :paramtype zone_redundancy: str or ~container_registry_management_client.models.ZoneRedundancy + :keyword anonymous_pull_enabled: Enables registry-wide pull from unauthenticated clients. + :paramtype anonymous_pull_enabled: bool + :keyword metadata_search: Determines whether registry artifacts are indexed for metadata + search. Known values are: "Enabled" and "Disabled". + :paramtype metadata_search: str or ~container_registry_management_client.models.MetadataSearch + :keyword auto_generated_domain_name_label_scope: Determines the domain name label reuse scope. + Known values are: "Unsecure", "TenantReuse", "SubscriptionReuse", "ResourceGroupReuse", and + "NoReuse". + :paramtype auto_generated_domain_name_label_scope: str or + ~container_registry_management_client.models.AutoGeneratedDomainNameLabelScope + :keyword role_assignment_mode: Determines registry role assignment mode. Known values are: + "AbacRepositoryPermissions" and "LegacyRegistryPermissions". + :paramtype role_assignment_mode: str or + ~container_registry_management_client.models.RoleAssignmentMode + """ + super().__init__(**kwargs) + self.login_server: Optional[str] = None + self.creation_date: Optional[datetime.datetime] = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + self.status: Optional["_models.Status"] = None + self.admin_user_enabled = admin_user_enabled + self.network_rule_set = network_rule_set + self.policies = policies + self.encryption = encryption + self.data_endpoint_enabled = data_endpoint_enabled + self.data_endpoint_host_names: Optional[list[str]] = None + self.regional_endpoints = regional_endpoints + self.regional_endpoint_host_names: Optional[list[str]] = None + self.endpoint_protocol = endpoint_protocol + self.private_endpoint_connections: Optional[list["_models.PrivateEndpointConnection"]] = None + self.public_network_access = public_network_access + self.network_rule_bypass_options = network_rule_bypass_options + self.network_rule_bypass_allowed_for_tasks = network_rule_bypass_allowed_for_tasks + self.zone_redundancy = zone_redundancy + self.anonymous_pull_enabled = anonymous_pull_enabled + self.metadata_search = metadata_search + self.auto_generated_domain_name_label_scope = auto_generated_domain_name_label_scope + self.role_assignment_mode = role_assignment_mode + + +class RegistryPropertiesUpdateParameters(_serialization.Model): + """The parameters for updating the properties of a container registry. + + :ivar admin_user_enabled: The value that indicates whether the admin user is enabled. + :vartype admin_user_enabled: bool + :ivar network_rule_set: The network rule set for a container registry. + :vartype network_rule_set: ~container_registry_management_client.models.NetworkRuleSet + :ivar policies: The policies for a container registry. + :vartype policies: ~container_registry_management_client.models.Policies + :ivar encryption: The encryption settings of container registry. + :vartype encryption: ~container_registry_management_client.models.EncryptionProperty + :ivar data_endpoint_enabled: Enable a single data endpoint per region for serving data. + :vartype data_endpoint_enabled: bool + :ivar regional_endpoints: Enable per-region endpoints for accessing registry. Known values are: + "Enabled" and "Disabled". + :vartype regional_endpoints: str or + ~container_registry_management_client.models.RegionalEndpoints + :ivar endpoint_protocol: The connectivity protocol for the registry, such as IPv4 or dual stack + (IPv4 and IPv6). Known values are: "IPv4" and "IPv4AndIPv6". + :vartype endpoint_protocol: str or + ~container_registry_management_client.models.EndpointProtocol + :ivar public_network_access: Whether or not public network access is allowed for the container + registry. Known values are: "Enabled" and "Disabled". + :vartype public_network_access: str or + ~container_registry_management_client.models.PublicNetworkAccess + :ivar network_rule_bypass_options: Whether to allow trusted Azure services to access a network + restricted registry. Known values are: "AzureServices" and "None". + :vartype network_rule_bypass_options: str or + ~container_registry_management_client.models.NetworkRuleBypassOptions + :ivar network_rule_bypass_allowed_for_tasks: Whether to allow ACR Tasks service to access a + network restricted registry. + :vartype network_rule_bypass_allowed_for_tasks: bool + :ivar anonymous_pull_enabled: Enables registry-wide pull from unauthenticated clients. + :vartype anonymous_pull_enabled: bool + :ivar metadata_search: Determines whether registry artifacts are indexed for metadata search. + Known values are: "Enabled" and "Disabled". + :vartype metadata_search: str or ~container_registry_management_client.models.MetadataSearch + :ivar role_assignment_mode: Determines registry role assignment mode. Known values are: + "AbacRepositoryPermissions" and "LegacyRegistryPermissions". + :vartype role_assignment_mode: str or + ~container_registry_management_client.models.RoleAssignmentMode + """ + + _attribute_map = { + "admin_user_enabled": {"key": "adminUserEnabled", "type": "bool"}, + "network_rule_set": {"key": "networkRuleSet", "type": "NetworkRuleSet"}, + "policies": {"key": "policies", "type": "Policies"}, + "encryption": {"key": "encryption", "type": "EncryptionProperty"}, + "data_endpoint_enabled": {"key": "dataEndpointEnabled", "type": "bool"}, + "regional_endpoints": {"key": "regionalEndpoints", "type": "str"}, + "endpoint_protocol": {"key": "endpointProtocol", "type": "str"}, + "public_network_access": {"key": "publicNetworkAccess", "type": "str"}, + "network_rule_bypass_options": {"key": "networkRuleBypassOptions", "type": "str"}, + "network_rule_bypass_allowed_for_tasks": {"key": "networkRuleBypassAllowedForTasks", "type": "bool"}, + "anonymous_pull_enabled": {"key": "anonymousPullEnabled", "type": "bool"}, + "metadata_search": {"key": "metadataSearch", "type": "str"}, + "role_assignment_mode": {"key": "roleAssignmentMode", "type": "str"}, + } + + def __init__( + self, + *, + admin_user_enabled: Optional[bool] = None, + network_rule_set: Optional["_models.NetworkRuleSet"] = None, + policies: Optional["_models.Policies"] = None, + encryption: Optional["_models.EncryptionProperty"] = None, + data_endpoint_enabled: Optional[bool] = None, + regional_endpoints: Optional[Union[str, "_models.RegionalEndpoints"]] = None, + endpoint_protocol: Optional[Union[str, "_models.EndpointProtocol"]] = None, + public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, + network_rule_bypass_options: Optional[Union[str, "_models.NetworkRuleBypassOptions"]] = None, + network_rule_bypass_allowed_for_tasks: Optional[bool] = None, + anonymous_pull_enabled: Optional[bool] = None, + metadata_search: Optional[Union[str, "_models.MetadataSearch"]] = None, + role_assignment_mode: Optional[Union[str, "_models.RoleAssignmentMode"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword admin_user_enabled: The value that indicates whether the admin user is enabled. + :paramtype admin_user_enabled: bool + :keyword network_rule_set: The network rule set for a container registry. + :paramtype network_rule_set: ~container_registry_management_client.models.NetworkRuleSet + :keyword policies: The policies for a container registry. + :paramtype policies: ~container_registry_management_client.models.Policies + :keyword encryption: The encryption settings of container registry. + :paramtype encryption: ~container_registry_management_client.models.EncryptionProperty + :keyword data_endpoint_enabled: Enable a single data endpoint per region for serving data. + :paramtype data_endpoint_enabled: bool + :keyword regional_endpoints: Enable per-region endpoints for accessing registry. Known values + are: "Enabled" and "Disabled". + :paramtype regional_endpoints: str or + ~container_registry_management_client.models.RegionalEndpoints + :keyword endpoint_protocol: The connectivity protocol for the registry, such as IPv4 or dual + stack (IPv4 and IPv6). Known values are: "IPv4" and "IPv4AndIPv6". + :paramtype endpoint_protocol: str or + ~container_registry_management_client.models.EndpointProtocol + :keyword public_network_access: Whether or not public network access is allowed for the + container registry. Known values are: "Enabled" and "Disabled". + :paramtype public_network_access: str or + ~container_registry_management_client.models.PublicNetworkAccess + :keyword network_rule_bypass_options: Whether to allow trusted Azure services to access a + network restricted registry. Known values are: "AzureServices" and "None". + :paramtype network_rule_bypass_options: str or + ~container_registry_management_client.models.NetworkRuleBypassOptions + :keyword network_rule_bypass_allowed_for_tasks: Whether to allow ACR Tasks service to access a + network restricted registry. + :paramtype network_rule_bypass_allowed_for_tasks: bool + :keyword anonymous_pull_enabled: Enables registry-wide pull from unauthenticated clients. + :paramtype anonymous_pull_enabled: bool + :keyword metadata_search: Determines whether registry artifacts are indexed for metadata + search. Known values are: "Enabled" and "Disabled". + :paramtype metadata_search: str or ~container_registry_management_client.models.MetadataSearch + :keyword role_assignment_mode: Determines registry role assignment mode. Known values are: + "AbacRepositoryPermissions" and "LegacyRegistryPermissions". + :paramtype role_assignment_mode: str or + ~container_registry_management_client.models.RoleAssignmentMode + """ + super().__init__(**kwargs) + self.admin_user_enabled = admin_user_enabled + self.network_rule_set = network_rule_set + self.policies = policies + self.encryption = encryption + self.data_endpoint_enabled = data_endpoint_enabled + self.regional_endpoints = regional_endpoints + self.endpoint_protocol = endpoint_protocol + self.public_network_access = public_network_access + self.network_rule_bypass_options = network_rule_bypass_options + self.network_rule_bypass_allowed_for_tasks = network_rule_bypass_allowed_for_tasks + self.anonymous_pull_enabled = anonymous_pull_enabled + self.metadata_search = metadata_search + self.role_assignment_mode = role_assignment_mode + + +class RegistrySyncResult(_serialization.Model): + """The registry sync result of the connected registry. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to server. + + :ivar sync_trigger: The action that triggered the most recent registry sync. Required. Known + values are: "SyncTokenUpdate", "InitialSync", "ManualResync", and "RecoveryService". + :vartype sync_trigger: str or ~container_registry_management_client.models.SyncTrigger + :ivar sync_state: The status of the connected registry's most recent sync. Required. Known + values are: "NotActivated", "Syncing", "Failed", "Succeeded", "TimedOut", and "Pending". + :vartype sync_state: str or ~container_registry_management_client.models.SyncState + :ivar last_sync_start_time: The time that the connected registry's most recent sync started. + :vartype last_sync_start_time: ~datetime.datetime + :ivar last_sync_end_time: The time that the connected registry's most recent sync ended. + :vartype last_sync_end_time: ~datetime.datetime + :ivar last_successful_sync_end_time: The time that the connected registry's most recent + successful sync ended. + :vartype last_successful_sync_end_time: ~datetime.datetime + """ + + _validation = { + "sync_trigger": {"required": True, "readonly": True}, + "sync_state": {"required": True, "readonly": True}, + } + + _attribute_map = { + "sync_trigger": {"key": "syncTrigger", "type": "str"}, + "sync_state": {"key": "syncState", "type": "str"}, + "last_sync_start_time": {"key": "lastSyncStartTime", "type": "iso-8601"}, + "last_sync_end_time": {"key": "lastSyncEndTime", "type": "iso-8601"}, + "last_successful_sync_end_time": {"key": "lastSuccessfulSyncEndTime", "type": "iso-8601"}, + } + + def __init__( + self, + *, + last_sync_start_time: Optional[datetime.datetime] = None, + last_sync_end_time: Optional[datetime.datetime] = None, + last_successful_sync_end_time: Optional[datetime.datetime] = None, + **kwargs: Any + ) -> None: + """ + :keyword last_sync_start_time: The time that the connected registry's most recent sync started. + :paramtype last_sync_start_time: ~datetime.datetime + :keyword last_sync_end_time: The time that the connected registry's most recent sync ended. + :paramtype last_sync_end_time: ~datetime.datetime + :keyword last_successful_sync_end_time: The time that the connected registry's most recent + successful sync ended. + :paramtype last_successful_sync_end_time: ~datetime.datetime + """ + super().__init__(**kwargs) + self.sync_trigger: Optional[Union[str, "_models.SyncTrigger"]] = None + self.sync_state: Optional[Union[str, "_models.SyncState"]] = None + self.last_sync_start_time = last_sync_start_time + self.last_sync_end_time = last_sync_end_time + self.last_successful_sync_end_time = last_successful_sync_end_time + + +class RegistryUpdateParameters(_serialization.Model): + """The parameters for updating a container registry. + + :ivar identity: The identity of the container registry. + :vartype identity: ~container_registry_management_client.models.IdentityProperties + :ivar tags: The tags for the container registry. + :vartype tags: dict[str, str] + :ivar sku: The SKU of the container registry. + :vartype sku: ~container_registry_management_client.models.Sku + :ivar properties: The properties that the container registry will be updated with. + :vartype properties: + ~container_registry_management_client.models.RegistryPropertiesUpdateParameters + """ + + _attribute_map = { + "identity": {"key": "identity", "type": "IdentityProperties"}, + "tags": {"key": "tags", "type": "{str}"}, + "sku": {"key": "sku", "type": "Sku"}, + "properties": {"key": "properties", "type": "RegistryPropertiesUpdateParameters"}, + } + + def __init__( + self, + *, + identity: Optional["_models.IdentityProperties"] = None, + tags: Optional[dict[str, str]] = None, + sku: Optional["_models.Sku"] = None, + properties: Optional["_models.RegistryPropertiesUpdateParameters"] = None, + **kwargs: Any + ) -> None: + """ + :keyword identity: The identity of the container registry. + :paramtype identity: ~container_registry_management_client.models.IdentityProperties + :keyword tags: The tags for the container registry. + :paramtype tags: dict[str, str] + :keyword sku: The SKU of the container registry. + :paramtype sku: ~container_registry_management_client.models.Sku + :keyword properties: The properties that the container registry will be updated with. + :paramtype properties: + ~container_registry_management_client.models.RegistryPropertiesUpdateParameters + """ + super().__init__(**kwargs) + self.identity = identity + self.tags = tags + self.sku = sku + self.properties = properties + + +class RegistryUsage(_serialization.Model): + """The quota usage for a container registry. + + :ivar name: The name of the usage. + :vartype name: str + :ivar limit: The limit of the usage. + :vartype limit: int + :ivar current_value: The current value of the usage. + :vartype current_value: int + :ivar unit: The unit of measurement. Known values are: "Count" and "Bytes". + :vartype unit: str or ~container_registry_management_client.models.RegistryUsageUnit + """ + + _attribute_map = { + "name": {"key": "name", "type": "str"}, + "limit": {"key": "limit", "type": "int"}, + "current_value": {"key": "currentValue", "type": "int"}, + "unit": {"key": "unit", "type": "str"}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + limit: Optional[int] = None, + current_value: Optional[int] = None, + unit: Optional[Union[str, "_models.RegistryUsageUnit"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword name: The name of the usage. + :paramtype name: str + :keyword limit: The limit of the usage. + :paramtype limit: int + :keyword current_value: The current value of the usage. + :paramtype current_value: int + :keyword unit: The unit of measurement. Known values are: "Count" and "Bytes". + :paramtype unit: str or ~container_registry_management_client.models.RegistryUsageUnit + """ + super().__init__(**kwargs) + self.name = name + self.limit = limit + self.current_value = current_value + self.unit = unit + + +class RegistryUsageListResult(_serialization.Model): + """The result of a request to get container registry quota usages. + + :ivar value: The list of container registry quota usages. + :vartype value: list[~container_registry_management_client.models.RegistryUsage] + """ + + _attribute_map = { + "value": {"key": "value", "type": "[RegistryUsage]"}, + } + + def __init__(self, *, value: Optional[list["_models.RegistryUsage"]] = None, **kwargs: Any) -> None: + """ + :keyword value: The list of container registry quota usages. + :paramtype value: list[~container_registry_management_client.models.RegistryUsage] + """ + super().__init__(**kwargs) + self.value = value + + +class Replication(TrackedResource): + """An object that represents a replication for a container registry. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to server. + + :ivar id: Fully qualified resource ID for the resource. E.g. + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~container_registry_management_client.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: The properties of the replication. + :vartype properties: ~container_registry_management_client.models.ReplicationProperties + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "location": {"required": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "tags": {"key": "tags", "type": "{str}"}, + "location": {"key": "location", "type": "str"}, + "properties": {"key": "properties", "type": "ReplicationProperties"}, + } + + def __init__( + self, + *, + location: str, + tags: Optional[dict[str, str]] = None, + properties: Optional["_models.ReplicationProperties"] = None, + **kwargs: Any + ) -> None: + """ + :keyword tags: Resource tags. + :paramtype tags: dict[str, str] + :keyword location: The geo-location where the resource lives. Required. + :paramtype location: str + :keyword properties: The properties of the replication. + :paramtype properties: ~container_registry_management_client.models.ReplicationProperties + """ + super().__init__(tags=tags, location=location, **kwargs) + self.properties = properties + + +class ReplicationListResult(_serialization.Model): + """The result of a request to list replications for a container registry. + + :ivar value: The list of replications. Since this list may be incomplete, the nextLink field + should be used to request the next list of replications. + :vartype value: list[~container_registry_management_client.models.Replication] + :ivar next_link: The URI that can be used to request the next list of replications. + :vartype next_link: str + """ + + _attribute_map = { + "value": {"key": "value", "type": "[Replication]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__( + self, *, value: Optional[list["_models.Replication"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: + """ + :keyword value: The list of replications. Since this list may be incomplete, the nextLink field + should be used to request the next list of replications. + :paramtype value: list[~container_registry_management_client.models.Replication] + :keyword next_link: The URI that can be used to request the next list of replications. + :paramtype next_link: str + """ + super().__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ReplicationProperties(_serialization.Model): + """The properties of a replication. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar provisioning_state: The provisioning state of the replication at the time the operation + was called. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and + "Canceled". + :vartype provisioning_state: str or + ~container_registry_management_client.models.ProvisioningState + :ivar status: The status of the replication at the time the operation was called. + :vartype status: ~container_registry_management_client.models.Status + :ivar region_endpoint_enabled: Specifies whether the replication's regional endpoint is + enabled. Requests will not be routed to a replication whose regional endpoint is disabled, + however its data will continue to be synced with other replications. + :vartype region_endpoint_enabled: bool + :ivar zone_redundancy: Whether or not zone redundancy is enabled for this container registry + replication. Known values are: "Enabled" and "Disabled". + :vartype zone_redundancy: str or ~container_registry_management_client.models.ZoneRedundancy + """ + + _validation = { + "provisioning_state": {"readonly": True}, + "status": {"readonly": True}, + } + + _attribute_map = { + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "status": {"key": "status", "type": "Status"}, + "region_endpoint_enabled": {"key": "regionEndpointEnabled", "type": "bool"}, + "zone_redundancy": {"key": "zoneRedundancy", "type": "str"}, + } + + def __init__( + self, + *, + region_endpoint_enabled: bool = True, + zone_redundancy: Optional[Union[str, "_models.ZoneRedundancy"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword region_endpoint_enabled: Specifies whether the replication's regional endpoint is + enabled. Requests will not be routed to a replication whose regional endpoint is disabled, + however its data will continue to be synced with other replications. + :paramtype region_endpoint_enabled: bool + :keyword zone_redundancy: Whether or not zone redundancy is enabled for this container registry + replication. Known values are: "Enabled" and "Disabled". + :paramtype zone_redundancy: str or ~container_registry_management_client.models.ZoneRedundancy + """ + super().__init__(**kwargs) + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + self.status: Optional["_models.Status"] = None + self.region_endpoint_enabled = region_endpoint_enabled + self.zone_redundancy = zone_redundancy + + +class ReplicationUpdateParameters(_serialization.Model): + """The parameters for updating a replication. + + :ivar tags: The tags for the replication. + :vartype tags: dict[str, str] + :ivar properties: The parameters for updating a replication's properties. + :vartype properties: + ~container_registry_management_client.models.ReplicationUpdateParametersProperties + """ + + _attribute_map = { + "tags": {"key": "tags", "type": "{str}"}, + "properties": {"key": "properties", "type": "ReplicationUpdateParametersProperties"}, + } + + def __init__( + self, + *, + tags: Optional[dict[str, str]] = None, + properties: Optional["_models.ReplicationUpdateParametersProperties"] = None, + **kwargs: Any + ) -> None: + """ + :keyword tags: The tags for the replication. + :paramtype tags: dict[str, str] + :keyword properties: The parameters for updating a replication's properties. + :paramtype properties: + ~container_registry_management_client.models.ReplicationUpdateParametersProperties + """ + super().__init__(**kwargs) + self.tags = tags + self.properties = properties + + +class ReplicationUpdateParametersProperties(_serialization.Model): + """ReplicationUpdateParametersProperties. + + :ivar region_endpoint_enabled: Specifies whether the replication's regional endpoint is + enabled. Requests will not be routed to a replication whose regional endpoint is disabled, + however its data will continue to be synced with other replications. + :vartype region_endpoint_enabled: bool + """ + + _attribute_map = { + "region_endpoint_enabled": {"key": "regionEndpointEnabled", "type": "bool"}, + } + + def __init__(self, *, region_endpoint_enabled: Optional[bool] = None, **kwargs: Any) -> None: + """ + :keyword region_endpoint_enabled: Specifies whether the replication's regional endpoint is + enabled. Requests will not be routed to a replication whose regional endpoint is disabled, + however its data will continue to be synced with other replications. + :paramtype region_endpoint_enabled: bool + """ + super().__init__(**kwargs) + self.region_endpoint_enabled = region_endpoint_enabled + + +class Request(_serialization.Model): + """The request that generated the event. + + :ivar id: The ID of the request that initiated the event. + :vartype id: str + :ivar addr: The IP or hostname and possibly port of the client connection that initiated the + event. This is the RemoteAddr from the standard http request. + :vartype addr: str + :ivar host: The externally accessible hostname of the registry instance, as specified by the + http host header on incoming requests. + :vartype host: str + :ivar method: The request method that generated the event. + :vartype method: str + :ivar useragent: The user agent header of the request. + :vartype useragent: str + """ + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "addr": {"key": "addr", "type": "str"}, + "host": {"key": "host", "type": "str"}, + "method": {"key": "method", "type": "str"}, + "useragent": {"key": "useragent", "type": "str"}, + } + + def __init__( + self, + *, + id: Optional[str] = None, # pylint: disable=redefined-builtin + addr: Optional[str] = None, + host: Optional[str] = None, + method: Optional[str] = None, + useragent: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword id: The ID of the request that initiated the event. + :paramtype id: str + :keyword addr: The IP or hostname and possibly port of the client connection that initiated the + event. This is the RemoteAddr from the standard http request. + :paramtype addr: str + :keyword host: The externally accessible hostname of the registry instance, as specified by the + http host header on incoming requests. + :paramtype host: str + :keyword method: The request method that generated the event. + :paramtype method: str + :keyword useragent: The user agent header of the request. + :paramtype useragent: str + """ + super().__init__(**kwargs) + self.id = id + self.addr = addr + self.host = host + self.method = method + self.useragent = useragent + + +class RetentionPolicy(_serialization.Model): + """The retention policy for a container registry. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar days: The number of days to retain an untagged manifest after which it gets purged. + :vartype days: int + :ivar last_updated_time: The timestamp when the policy was last updated. + :vartype last_updated_time: ~datetime.datetime + :ivar status: The value that indicates whether the policy is enabled or not. Known values are: + "enabled" and "disabled". + :vartype status: str or ~container_registry_management_client.models.PolicyStatus + """ + + _validation = { + "last_updated_time": {"readonly": True}, + } + + _attribute_map = { + "days": {"key": "days", "type": "int"}, + "last_updated_time": {"key": "lastUpdatedTime", "type": "iso-8601"}, + "status": {"key": "status", "type": "str"}, + } + + def __init__( + self, *, days: int = 7, status: Optional[Union[str, "_models.PolicyStatus"]] = None, **kwargs: Any + ) -> None: + """ + :keyword days: The number of days to retain an untagged manifest after which it gets purged. + :paramtype days: int + :keyword status: The value that indicates whether the policy is enabled or not. Known values + are: "enabled" and "disabled". + :paramtype status: str or ~container_registry_management_client.models.PolicyStatus + """ + super().__init__(**kwargs) + self.days = days + self.last_updated_time: Optional[datetime.datetime] = None + self.status = status + + +class ScopeMap(ProxyResource): + """An object that represents a scope map for a container registry. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. E.g. + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~container_registry_management_client.models.SystemData + :ivar properties: The properties of the scope map. + :vartype properties: ~container_registry_management_client.models.ScopeMapProperties + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "ScopeMapProperties"}, + } + + def __init__(self, *, properties: Optional["_models.ScopeMapProperties"] = None, **kwargs: Any) -> None: + """ + :keyword properties: The properties of the scope map. + :paramtype properties: ~container_registry_management_client.models.ScopeMapProperties + """ + super().__init__(**kwargs) + self.properties = properties + + +class ScopeMapListResult(_serialization.Model): + """The result of a request to list scope maps for a container registry. + + :ivar value: The list of scope maps. Since this list may be incomplete, the nextLink field + should be used to request the next list of scope maps. + :vartype value: list[~container_registry_management_client.models.ScopeMap] + :ivar next_link: The URI that can be used to request the next list of scope maps. + :vartype next_link: str + """ + + _attribute_map = { + "value": {"key": "value", "type": "[ScopeMap]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__( + self, *, value: Optional[list["_models.ScopeMap"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: + """ + :keyword value: The list of scope maps. Since this list may be incomplete, the nextLink field + should be used to request the next list of scope maps. + :paramtype value: list[~container_registry_management_client.models.ScopeMap] + :keyword next_link: The URI that can be used to request the next list of scope maps. + :paramtype next_link: str + """ + super().__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ScopeMapProperties(_serialization.Model): + """The properties of a scope map. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to server. + + :ivar description: The user friendly description of the scope map. + :vartype description: str + :ivar type: The type of the scope map. E.g. BuildIn scope map. + :vartype type: str + :ivar creation_date: The creation date of scope map. + :vartype creation_date: ~datetime.datetime + :ivar provisioning_state: Provisioning state of the resource. Known values are: "Creating", + "Updating", "Deleting", "Succeeded", "Failed", and "Canceled". + :vartype provisioning_state: str or + ~container_registry_management_client.models.ProvisioningState + :ivar actions: The list of scoped permissions for registry artifacts. E.g. + repositories/repository-name/content/read, repositories/repository-name/metadata/write. + Required. + :vartype actions: list[str] + """ + + _validation = { + "type": {"readonly": True}, + "creation_date": {"readonly": True}, + "provisioning_state": {"readonly": True}, + "actions": {"required": True}, + } + + _attribute_map = { + "description": {"key": "description", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "creation_date": {"key": "creationDate", "type": "iso-8601"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "actions": {"key": "actions", "type": "[str]"}, + } + + def __init__(self, *, actions: list[str], description: Optional[str] = None, **kwargs: Any) -> None: + """ + :keyword description: The user friendly description of the scope map. + :paramtype description: str + :keyword actions: The list of scoped permissions for registry artifacts. E.g. + repositories/repository-name/content/read, repositories/repository-name/metadata/write. + Required. + :paramtype actions: list[str] + """ + super().__init__(**kwargs) + self.description = description + self.type: Optional[str] = None + self.creation_date: Optional[datetime.datetime] = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + self.actions = actions + + +class ScopeMapPropertiesUpdateParameters(_serialization.Model): + """The update parameters for scope map properties. + + :ivar description: The user friendly description of the scope map. + :vartype description: str + :ivar actions: The list of scope permissions for registry artifacts. E.g. + repositories/repository-name/pull, repositories/repository-name/delete. + :vartype actions: list[str] + """ + + _attribute_map = { + "description": {"key": "description", "type": "str"}, + "actions": {"key": "actions", "type": "[str]"}, + } + + def __init__( + self, *, description: Optional[str] = None, actions: Optional[list[str]] = None, **kwargs: Any + ) -> None: + """ + :keyword description: The user friendly description of the scope map. + :paramtype description: str + :keyword actions: The list of scope permissions for registry artifacts. E.g. + repositories/repository-name/pull, repositories/repository-name/delete. + :paramtype actions: list[str] + """ + super().__init__(**kwargs) + self.description = description + self.actions = actions + + +class ScopeMapUpdateParameters(_serialization.Model): + """The properties for updating the scope map. + + :ivar properties: The update parameters for scope map properties. + :vartype properties: + ~container_registry_management_client.models.ScopeMapPropertiesUpdateParameters + """ + + _attribute_map = { + "properties": {"key": "properties", "type": "ScopeMapPropertiesUpdateParameters"}, + } + + def __init__( + self, *, properties: Optional["_models.ScopeMapPropertiesUpdateParameters"] = None, **kwargs: Any + ) -> None: + """ + :keyword properties: The update parameters for scope map properties. + :paramtype properties: + ~container_registry_management_client.models.ScopeMapPropertiesUpdateParameters + """ + super().__init__(**kwargs) + self.properties = properties + + +class Sku(_serialization.Model): + """The SKU of a container registry. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to server. + + :ivar name: The SKU name of the container registry. Required for registry creation. Required. + Known values are: "Classic", "Basic", "Standard", and "Premium". + :vartype name: str or ~container_registry_management_client.models.SkuName + :ivar tier: The SKU tier based on the SKU name. Known values are: "Classic", "Basic", + "Standard", and "Premium". + :vartype tier: str or ~container_registry_management_client.models.SkuTier + """ + + _validation = { + "name": {"required": True}, + "tier": {"readonly": True}, + } + + _attribute_map = { + "name": {"key": "name", "type": "str"}, + "tier": {"key": "tier", "type": "str"}, + } + + def __init__(self, *, name: Union[str, "_models.SkuName"], **kwargs: Any) -> None: + """ + :keyword name: The SKU name of the container registry. Required for registry creation. + Required. Known values are: "Classic", "Basic", "Standard", and "Premium". + :paramtype name: str or ~container_registry_management_client.models.SkuName + """ + super().__init__(**kwargs) + self.name = name + self.tier: Optional[Union[str, "_models.SkuTier"]] = None + + +class SoftDeletePolicy(_serialization.Model): + """The soft delete policy for a container registry. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar retention_days: The number of days after which a soft-deleted item is permanently + deleted. + :vartype retention_days: int + :ivar last_updated_time: The timestamp when the policy was last updated. + :vartype last_updated_time: ~datetime.datetime + :ivar status: The value that indicates whether the policy is enabled or not. Known values are: + "enabled" and "disabled". + :vartype status: str or ~container_registry_management_client.models.PolicyStatus + """ + + _validation = { + "last_updated_time": {"readonly": True}, + } + + _attribute_map = { + "retention_days": {"key": "retentionDays", "type": "int"}, + "last_updated_time": {"key": "lastUpdatedTime", "type": "iso-8601"}, + "status": {"key": "status", "type": "str"}, + } + + def __init__( + self, *, retention_days: int = 7, status: Optional[Union[str, "_models.PolicyStatus"]] = None, **kwargs: Any + ) -> None: + """ + :keyword retention_days: The number of days after which a soft-deleted item is permanently + deleted. + :paramtype retention_days: int + :keyword status: The value that indicates whether the policy is enabled or not. Known values + are: "enabled" and "disabled". + :paramtype status: str or ~container_registry_management_client.models.PolicyStatus + """ + super().__init__(**kwargs) + self.retention_days = retention_days + self.last_updated_time: Optional[datetime.datetime] = None + self.status = status + + +class Source(_serialization.Model): + """The registry node that generated the event. Put differently, while the actor initiates the + event, the source generates it. + + :ivar addr: The IP or hostname and the port of the registry node that generated the event. + Generally, this will be resolved by os.Hostname() along with the running port. + :vartype addr: str + :ivar instance_id: The running instance of an application. Changes after each restart. + :vartype instance_id: str + """ + + _attribute_map = { + "addr": {"key": "addr", "type": "str"}, + "instance_id": {"key": "instanceID", "type": "str"}, + } + + def __init__(self, *, addr: Optional[str] = None, instance_id: Optional[str] = None, **kwargs: Any) -> None: + """ + :keyword addr: The IP or hostname and the port of the registry node that generated the event. + Generally, this will be resolved by os.Hostname() along with the running port. + :paramtype addr: str + :keyword instance_id: The running instance of an application. Changes after each restart. + :paramtype instance_id: str + """ + super().__init__(**kwargs) + self.addr = addr + self.instance_id = instance_id + + +class Status(_serialization.Model): + """The status of an Azure resource at the time the operation was called. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar display_status: The short label for the status. + :vartype display_status: str + :ivar message: The detailed message for the status, including alerts and error messages. + :vartype message: str + :ivar timestamp: The timestamp when the status was changed to the current value. + :vartype timestamp: ~datetime.datetime + """ + + _validation = { + "display_status": {"readonly": True}, + "message": {"readonly": True}, + "timestamp": {"readonly": True}, + } + + _attribute_map = { + "display_status": {"key": "displayStatus", "type": "str"}, + "message": {"key": "message", "type": "str"}, + "timestamp": {"key": "timestamp", "type": "iso-8601"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.display_status: Optional[str] = None + self.message: Optional[str] = None + self.timestamp: Optional[datetime.datetime] = None + + +class StatusDetailProperties(_serialization.Model): + """The status detail properties of the connected registry. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: The component of the connected registry corresponding to the status. + :vartype type: str + :ivar code: The HTTP status code. + :vartype code: str + :ivar description: The description of the status. + :vartype description: str + :ivar timestamp: The timestamp of the status. + :vartype timestamp: ~datetime.datetime + :ivar correlation_id: The correlation ID of the status. + :vartype correlation_id: str + """ + + _validation = { + "type": {"readonly": True}, + "code": {"readonly": True}, + "description": {"readonly": True}, + "timestamp": {"readonly": True}, + "correlation_id": {"readonly": True}, + } + + _attribute_map = { + "type": {"key": "type", "type": "str"}, + "code": {"key": "code", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "timestamp": {"key": "timestamp", "type": "iso-8601"}, + "correlation_id": {"key": "correlationId", "type": "str"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.type: Optional[str] = None + self.code: Optional[str] = None + self.description: Optional[str] = None + self.timestamp: Optional[datetime.datetime] = None + self.correlation_id: Optional[str] = None + + +class SyncProperties(_serialization.Model): + """The sync properties of the connected registry with its parent. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to server. + + :ivar token_id: The resource ID of the ACR token used to authenticate the connected registry to + its parent during sync. Required. + :vartype token_id: str + :ivar schedule: The cron expression indicating the schedule that the connected registry will + sync with its parent. + :vartype schedule: str + :ivar sync_window: The time window during which sync is enabled for each schedule occurrence. + Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. + :vartype sync_window: ~datetime.timedelta + :ivar message_ttl: The period of time for which a message is available to sync before it is + expired. Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. + Required. + :vartype message_ttl: ~datetime.timedelta + :ivar last_sync_time: The last time a sync occurred between the connected registry and its + parent. + :vartype last_sync_time: ~datetime.datetime + :ivar gateway_endpoint: The gateway endpoint used by the connected registry to communicate with + its parent. + :vartype gateway_endpoint: str + """ + + _validation = { + "token_id": {"required": True}, + "message_ttl": {"required": True}, + "last_sync_time": {"readonly": True}, + "gateway_endpoint": {"readonly": True}, + } + + _attribute_map = { + "token_id": {"key": "tokenId", "type": "str"}, + "schedule": {"key": "schedule", "type": "str"}, + "sync_window": {"key": "syncWindow", "type": "duration"}, + "message_ttl": {"key": "messageTtl", "type": "duration"}, + "last_sync_time": {"key": "lastSyncTime", "type": "iso-8601"}, + "gateway_endpoint": {"key": "gatewayEndpoint", "type": "str"}, + } + + def __init__( + self, + *, + token_id: str, + message_ttl: datetime.timedelta, + schedule: Optional[str] = None, + sync_window: Optional[datetime.timedelta] = None, + **kwargs: Any + ) -> None: + """ + :keyword token_id: The resource ID of the ACR token used to authenticate the connected registry + to its parent during sync. Required. + :paramtype token_id: str + :keyword schedule: The cron expression indicating the schedule that the connected registry will + sync with its parent. + :paramtype schedule: str + :keyword sync_window: The time window during which sync is enabled for each schedule + occurrence. Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. + :paramtype sync_window: ~datetime.timedelta + :keyword message_ttl: The period of time for which a message is available to sync before it is + expired. Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. + Required. + :paramtype message_ttl: ~datetime.timedelta + """ + super().__init__(**kwargs) + self.token_id = token_id + self.schedule = schedule + self.sync_window = sync_window + self.message_ttl = message_ttl + self.last_sync_time: Optional[datetime.datetime] = None + self.gateway_endpoint: Optional[str] = None + + +class SyncUpdateProperties(_serialization.Model): + """The parameters for updating the sync properties of the connected registry with its parent. + + :ivar schedule: The cron expression indicating the schedule that the connected registry will + sync with its parent. + :vartype schedule: str + :ivar sync_window: The time window during which sync is enabled for each schedule occurrence. + Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. + :vartype sync_window: ~datetime.timedelta + :ivar message_ttl: The period of time for which a message is available to sync before it is + expired. Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. + :vartype message_ttl: ~datetime.timedelta + """ + + _attribute_map = { + "schedule": {"key": "schedule", "type": "str"}, + "sync_window": {"key": "syncWindow", "type": "duration"}, + "message_ttl": {"key": "messageTtl", "type": "duration"}, + } + + def __init__( + self, + *, + schedule: Optional[str] = None, + sync_window: Optional[datetime.timedelta] = None, + message_ttl: Optional[datetime.timedelta] = None, + **kwargs: Any + ) -> None: + """ + :keyword schedule: The cron expression indicating the schedule that the connected registry will + sync with its parent. + :paramtype schedule: str + :keyword sync_window: The time window during which sync is enabled for each schedule + occurrence. Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. + :paramtype sync_window: ~datetime.timedelta + :keyword message_ttl: The period of time for which a message is available to sync before it is + expired. Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. + :paramtype message_ttl: ~datetime.timedelta + """ + super().__init__(**kwargs) + self.schedule = schedule + self.sync_window = sync_window + self.message_ttl = message_ttl + + +class SystemData(_serialization.Model): + """Metadata pertaining to creation and last modification of the resource. + + :ivar created_by: The identity that created the resource. + :vartype created_by: str + :ivar created_by_type: The type of identity that created the resource. Known values are: + "User", "Application", "ManagedIdentity", and "Key". + :vartype created_by_type: str or ~container_registry_management_client.models.CreatedByType + :ivar created_at: The timestamp of resource creation (UTC). + :vartype created_at: ~datetime.datetime + :ivar last_modified_by: The identity that last modified the resource. + :vartype last_modified_by: str + :ivar last_modified_by_type: The type of identity that last modified the resource. Known values + are: "User", "Application", "ManagedIdentity", and "Key". + :vartype last_modified_by_type: str or + ~container_registry_management_client.models.CreatedByType + :ivar last_modified_at: The timestamp of resource last modification (UTC). + :vartype last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + "created_by": {"key": "createdBy", "type": "str"}, + "created_by_type": {"key": "createdByType", "type": "str"}, + "created_at": {"key": "createdAt", "type": "iso-8601"}, + "last_modified_by": {"key": "lastModifiedBy", "type": "str"}, + "last_modified_by_type": {"key": "lastModifiedByType", "type": "str"}, + "last_modified_at": {"key": "lastModifiedAt", "type": "iso-8601"}, + } + + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + **kwargs: Any + ) -> None: + """ + :keyword created_by: The identity that created the resource. + :paramtype created_by: str + :keyword created_by_type: The type of identity that created the resource. Known values are: + "User", "Application", "ManagedIdentity", and "Key". + :paramtype created_by_type: str or ~container_registry_management_client.models.CreatedByType + :keyword created_at: The timestamp of resource creation (UTC). + :paramtype created_at: ~datetime.datetime + :keyword last_modified_by: The identity that last modified the resource. + :paramtype last_modified_by: str + :keyword last_modified_by_type: The type of identity that last modified the resource. Known + values are: "User", "Application", "ManagedIdentity", and "Key". + :paramtype last_modified_by_type: str or + ~container_registry_management_client.models.CreatedByType + :keyword last_modified_at: The timestamp of resource last modification (UTC). + :paramtype last_modified_at: ~datetime.datetime + """ + super().__init__(**kwargs) + self.created_by = created_by + self.created_by_type = created_by_type + self.created_at = created_at + self.last_modified_by = last_modified_by + self.last_modified_by_type = last_modified_by_type + self.last_modified_at = last_modified_at + + +class Target(_serialization.Model): + """The target of the event. + + :ivar media_type: The MIME type of the referenced object. + :vartype media_type: str + :ivar size: The number of bytes of the content. Same as Length field. + :vartype size: int + :ivar digest: The digest of the content, as defined by the Registry V2 HTTP API Specification. + :vartype digest: str + :ivar length: The number of bytes of the content. Same as Size field. + :vartype length: int + :ivar repository: The repository name. + :vartype repository: str + :ivar url: The direct URL to the content. + :vartype url: str + :ivar tag: The tag name. + :vartype tag: str + :ivar name: The name of the artifact. + :vartype name: str + :ivar version: The version of the artifact. + :vartype version: str + """ + + _attribute_map = { + "media_type": {"key": "mediaType", "type": "str"}, + "size": {"key": "size", "type": "int"}, + "digest": {"key": "digest", "type": "str"}, + "length": {"key": "length", "type": "int"}, + "repository": {"key": "repository", "type": "str"}, + "url": {"key": "url", "type": "str"}, + "tag": {"key": "tag", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "version": {"key": "version", "type": "str"}, + } + + def __init__( + self, + *, + media_type: Optional[str] = None, + size: Optional[int] = None, + digest: Optional[str] = None, + length: Optional[int] = None, + repository: Optional[str] = None, + url: Optional[str] = None, + tag: Optional[str] = None, + name: Optional[str] = None, + version: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword media_type: The MIME type of the referenced object. + :paramtype media_type: str + :keyword size: The number of bytes of the content. Same as Length field. + :paramtype size: int + :keyword digest: The digest of the content, as defined by the Registry V2 HTTP API + Specification. + :paramtype digest: str + :keyword length: The number of bytes of the content. Same as Size field. + :paramtype length: int + :keyword repository: The repository name. + :paramtype repository: str + :keyword url: The direct URL to the content. + :paramtype url: str + :keyword tag: The tag name. + :paramtype tag: str + :keyword name: The name of the artifact. + :paramtype name: str + :keyword version: The version of the artifact. + :paramtype version: str + """ + super().__init__(**kwargs) + self.media_type = media_type + self.size = size + self.digest = digest + self.length = length + self.repository = repository + self.url = url + self.tag = tag + self.name = name + self.version = version + + +class TlsCertificateProperties(_serialization.Model): + """The TLS certificate properties of the connected registry login server. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: The type of certificate location. "LocalDirectory" + :vartype type: str or ~container_registry_management_client.models.CertificateType + :ivar location: Indicates the location of the certificates. + :vartype location: str + """ + + _validation = { + "type": {"readonly": True}, + "location": {"readonly": True}, + } + + _attribute_map = { + "type": {"key": "type", "type": "str"}, + "location": {"key": "location", "type": "str"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.type: Optional[Union[str, "_models.CertificateType"]] = None + self.location: Optional[str] = None + + +class TlsProperties(_serialization.Model): + """The TLS properties of the connected registry login server. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar status: Indicates whether HTTPS is enabled for the login server. Known values are: + "Enabled" and "Disabled". + :vartype status: str or ~container_registry_management_client.models.TlsStatus + :ivar certificate: The certificate used to configure HTTPS for the login server. + :vartype certificate: ~container_registry_management_client.models.TlsCertificateProperties + """ + + _validation = { + "status": {"readonly": True}, + "certificate": {"readonly": True}, + } + + _attribute_map = { + "status": {"key": "status", "type": "str"}, + "certificate": {"key": "certificate", "type": "TlsCertificateProperties"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.status: Optional[Union[str, "_models.TlsStatus"]] = None + self.certificate: Optional["_models.TlsCertificateProperties"] = None + + +class Token(ProxyResource): + """An object that represents a token for a container registry. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. E.g. + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~container_registry_management_client.models.SystemData + :ivar properties: The properties of the token. + :vartype properties: ~container_registry_management_client.models.TokenProperties + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "TokenProperties"}, + } + + def __init__(self, *, properties: Optional["_models.TokenProperties"] = None, **kwargs: Any) -> None: + """ + :keyword properties: The properties of the token. + :paramtype properties: ~container_registry_management_client.models.TokenProperties + """ + super().__init__(**kwargs) + self.properties = properties + + +class TokenCertificate(_serialization.Model): + """The properties of a certificate used for authenticating a token. + + :ivar name: Known values are: "certificate1" and "certificate2". + :vartype name: str or ~container_registry_management_client.models.TokenCertificateName + :ivar expiry: The expiry datetime of the certificate. + :vartype expiry: ~datetime.datetime + :ivar thumbprint: The thumbprint of the certificate. + :vartype thumbprint: str + :ivar encoded_pem_certificate: Base 64 encoded string of the public certificate1 in PEM format + that will be used for authenticating the token. + :vartype encoded_pem_certificate: str + """ + + _attribute_map = { + "name": {"key": "name", "type": "str"}, + "expiry": {"key": "expiry", "type": "iso-8601"}, + "thumbprint": {"key": "thumbprint", "type": "str"}, + "encoded_pem_certificate": {"key": "encodedPemCertificate", "type": "str"}, + } + + def __init__( + self, + *, + name: Optional[Union[str, "_models.TokenCertificateName"]] = None, + expiry: Optional[datetime.datetime] = None, + thumbprint: Optional[str] = None, + encoded_pem_certificate: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword name: Known values are: "certificate1" and "certificate2". + :paramtype name: str or ~container_registry_management_client.models.TokenCertificateName + :keyword expiry: The expiry datetime of the certificate. + :paramtype expiry: ~datetime.datetime + :keyword thumbprint: The thumbprint of the certificate. + :paramtype thumbprint: str + :keyword encoded_pem_certificate: Base 64 encoded string of the public certificate1 in PEM + format that will be used for authenticating the token. + :paramtype encoded_pem_certificate: str + """ + super().__init__(**kwargs) + self.name = name + self.expiry = expiry + self.thumbprint = thumbprint + self.encoded_pem_certificate = encoded_pem_certificate + + +class TokenCredentialsProperties(_serialization.Model): + """The properties of the credentials that can be used for authenticating the token. + + :ivar certificates: + :vartype certificates: list[~container_registry_management_client.models.TokenCertificate] + :ivar passwords: + :vartype passwords: list[~container_registry_management_client.models.TokenPassword] + """ + + _attribute_map = { + "certificates": {"key": "certificates", "type": "[TokenCertificate]"}, + "passwords": {"key": "passwords", "type": "[TokenPassword]"}, + } + + def __init__( + self, + *, + certificates: Optional[list["_models.TokenCertificate"]] = None, + passwords: Optional[list["_models.TokenPassword"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword certificates: + :paramtype certificates: list[~container_registry_management_client.models.TokenCertificate] + :keyword passwords: + :paramtype passwords: list[~container_registry_management_client.models.TokenPassword] + """ + super().__init__(**kwargs) + self.certificates = certificates + self.passwords = passwords + + +class TokenListResult(_serialization.Model): + """The result of a request to list tokens for a container registry. + + :ivar value: The list of tokens. Since this list may be incomplete, the nextLink field should + be used to request the next list of tokens. + :vartype value: list[~container_registry_management_client.models.Token] + :ivar next_link: The URI that can be used to request the next list of tokens. + :vartype next_link: str + """ + + _attribute_map = { + "value": {"key": "value", "type": "[Token]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__( + self, *, value: Optional[list["_models.Token"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: + """ + :keyword value: The list of tokens. Since this list may be incomplete, the nextLink field + should be used to request the next list of tokens. + :paramtype value: list[~container_registry_management_client.models.Token] + :keyword next_link: The URI that can be used to request the next list of tokens. + :paramtype next_link: str + """ + super().__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class TokenPassword(_serialization.Model): + """The password that will be used for authenticating the token of a container registry. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar creation_time: The creation datetime of the password. + :vartype creation_time: ~datetime.datetime + :ivar expiry: The expiry datetime of the password. + :vartype expiry: ~datetime.datetime + :ivar name: The password name "password1" or "password2". Known values are: "password1" and + "password2". + :vartype name: str or ~container_registry_management_client.models.TokenPasswordName + :ivar value: The password value. + :vartype value: str + """ + + _validation = { + "value": {"readonly": True}, + } + + _attribute_map = { + "creation_time": {"key": "creationTime", "type": "iso-8601"}, + "expiry": {"key": "expiry", "type": "iso-8601"}, + "name": {"key": "name", "type": "str"}, + "value": {"key": "value", "type": "str"}, + } + + def __init__( + self, + *, + creation_time: Optional[datetime.datetime] = None, + expiry: Optional[datetime.datetime] = None, + name: Optional[Union[str, "_models.TokenPasswordName"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword creation_time: The creation datetime of the password. + :paramtype creation_time: ~datetime.datetime + :keyword expiry: The expiry datetime of the password. + :paramtype expiry: ~datetime.datetime + :keyword name: The password name "password1" or "password2". Known values are: "password1" and + "password2". + :paramtype name: str or ~container_registry_management_client.models.TokenPasswordName + """ + super().__init__(**kwargs) + self.creation_time = creation_time + self.expiry = expiry + self.name = name + self.value: Optional[str] = None + + +class TokenProperties(_serialization.Model): + """The properties of a token. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar creation_date: The creation date of scope map. + :vartype creation_date: ~datetime.datetime + :ivar provisioning_state: Provisioning state of the resource. Known values are: "Creating", + "Updating", "Deleting", "Succeeded", "Failed", and "Canceled". + :vartype provisioning_state: str or + ~container_registry_management_client.models.ProvisioningState + :ivar scope_map_id: The resource ID of the scope map to which the token will be associated + with. + :vartype scope_map_id: str + :ivar credentials: The credentials that can be used for authenticating the token. + :vartype credentials: ~container_registry_management_client.models.TokenCredentialsProperties + :ivar status: The status of the token example enabled or disabled. Known values are: "enabled" + and "disabled". + :vartype status: str or ~container_registry_management_client.models.TokenStatus + """ + + _validation = { + "creation_date": {"readonly": True}, + "provisioning_state": {"readonly": True}, + } + + _attribute_map = { + "creation_date": {"key": "creationDate", "type": "iso-8601"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "scope_map_id": {"key": "scopeMapId", "type": "str"}, + "credentials": {"key": "credentials", "type": "TokenCredentialsProperties"}, + "status": {"key": "status", "type": "str"}, + } + + def __init__( + self, + *, + scope_map_id: Optional[str] = None, + credentials: Optional["_models.TokenCredentialsProperties"] = None, + status: Optional[Union[str, "_models.TokenStatus"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword scope_map_id: The resource ID of the scope map to which the token will be associated + with. + :paramtype scope_map_id: str + :keyword credentials: The credentials that can be used for authenticating the token. + :paramtype credentials: ~container_registry_management_client.models.TokenCredentialsProperties + :keyword status: The status of the token example enabled or disabled. Known values are: + "enabled" and "disabled". + :paramtype status: str or ~container_registry_management_client.models.TokenStatus + """ + super().__init__(**kwargs) + self.creation_date: Optional[datetime.datetime] = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + self.scope_map_id = scope_map_id + self.credentials = credentials + self.status = status + + +class TokenUpdateParameters(_serialization.Model): + """The parameters for updating a token. + + :ivar properties: The properties of the token update parameters. + :vartype properties: ~container_registry_management_client.models.TokenUpdateProperties + """ + + _attribute_map = { + "properties": {"key": "properties", "type": "TokenUpdateProperties"}, + } + + def __init__(self, *, properties: Optional["_models.TokenUpdateProperties"] = None, **kwargs: Any) -> None: + """ + :keyword properties: The properties of the token update parameters. + :paramtype properties: ~container_registry_management_client.models.TokenUpdateProperties + """ + super().__init__(**kwargs) + self.properties = properties + + +class TokenUpdateProperties(_serialization.Model): + """The parameters for updating token properties. + + :ivar scope_map_id: The resource ID of the scope map to which the token will be associated + with. + :vartype scope_map_id: str + :ivar status: The status of the token example enabled or disabled. Known values are: "enabled" + and "disabled". + :vartype status: str or ~container_registry_management_client.models.TokenStatus + :ivar credentials: The credentials that can be used for authenticating the token. + :vartype credentials: ~container_registry_management_client.models.TokenCredentialsProperties + """ + + _attribute_map = { + "scope_map_id": {"key": "scopeMapId", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "credentials": {"key": "credentials", "type": "TokenCredentialsProperties"}, + } + + def __init__( + self, + *, + scope_map_id: Optional[str] = None, + status: Optional[Union[str, "_models.TokenStatus"]] = None, + credentials: Optional["_models.TokenCredentialsProperties"] = None, + **kwargs: Any + ) -> None: + """ + :keyword scope_map_id: The resource ID of the scope map to which the token will be associated + with. + :paramtype scope_map_id: str + :keyword status: The status of the token example enabled or disabled. Known values are: + "enabled" and "disabled". + :paramtype status: str or ~container_registry_management_client.models.TokenStatus + :keyword credentials: The credentials that can be used for authenticating the token. + :paramtype credentials: ~container_registry_management_client.models.TokenCredentialsProperties + """ + super().__init__(**kwargs) + self.scope_map_id = scope_map_id + self.status = status + self.credentials = credentials + + +class TrustPolicy(_serialization.Model): + """The content trust policy for a container registry. + + :ivar type: The type of trust policy. "Notary" + :vartype type: str or ~container_registry_management_client.models.TrustPolicyType + :ivar status: The value that indicates whether the policy is enabled or not. Known values are: + "enabled" and "disabled". + :vartype status: str or ~container_registry_management_client.models.PolicyStatus + """ + + _attribute_map = { + "type": {"key": "type", "type": "str"}, + "status": {"key": "status", "type": "str"}, + } + + def __init__( + self, + *, + type: Union[str, "_models.TrustPolicyType"] = "Notary", + status: Optional[Union[str, "_models.PolicyStatus"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword type: The type of trust policy. "Notary" + :paramtype type: str or ~container_registry_management_client.models.TrustPolicyType + :keyword status: The value that indicates whether the policy is enabled or not. Known values + are: "enabled" and "disabled". + :paramtype status: str or ~container_registry_management_client.models.PolicyStatus + """ + super().__init__(**kwargs) + self.type = type + self.status = status + + +class UserIdentityProperties(_serialization.Model): + """UserIdentityProperties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + "principal_id": {"readonly": True}, + "client_id": {"readonly": True}, + } + + _attribute_map = { + "principal_id": {"key": "principalId", "type": "str"}, + "client_id": {"key": "clientId", "type": "str"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.principal_id: Optional[str] = None + self.client_id: Optional[str] = None + + +class Webhook(TrackedResource): + """An object that represents a webhook for a container registry. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to server. + + :ivar id: Fully qualified resource ID for the resource. E.g. + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~container_registry_management_client.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: The properties of the webhook. + :vartype properties: ~container_registry_management_client.models.WebhookProperties + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "location": {"required": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "tags": {"key": "tags", "type": "{str}"}, + "location": {"key": "location", "type": "str"}, + "properties": {"key": "properties", "type": "WebhookProperties"}, + } + + def __init__( + self, + *, + location: str, + tags: Optional[dict[str, str]] = None, + properties: Optional["_models.WebhookProperties"] = None, + **kwargs: Any + ) -> None: + """ + :keyword tags: Resource tags. + :paramtype tags: dict[str, str] + :keyword location: The geo-location where the resource lives. Required. + :paramtype location: str + :keyword properties: The properties of the webhook. + :paramtype properties: ~container_registry_management_client.models.WebhookProperties + """ + super().__init__(tags=tags, location=location, **kwargs) + self.properties = properties + + +class WebhookCreateParameters(_serialization.Model): + """The parameters for creating a webhook. + + All required parameters must be populated in order to send to server. + + :ivar tags: The tags for the webhook. + :vartype tags: dict[str, str] + :ivar location: The location of the webhook. This cannot be changed after the resource is + created. Required. + :vartype location: str + :ivar properties: The properties that the webhook will be created with. + :vartype properties: + ~container_registry_management_client.models.WebhookPropertiesCreateParameters + """ + + _validation = { + "location": {"required": True}, + } + + _attribute_map = { + "tags": {"key": "tags", "type": "{str}"}, + "location": {"key": "location", "type": "str"}, + "properties": {"key": "properties", "type": "WebhookPropertiesCreateParameters"}, + } + + def __init__( + self, + *, + location: str, + tags: Optional[dict[str, str]] = None, + properties: Optional["_models.WebhookPropertiesCreateParameters"] = None, + **kwargs: Any + ) -> None: + """ + :keyword tags: The tags for the webhook. + :paramtype tags: dict[str, str] + :keyword location: The location of the webhook. This cannot be changed after the resource is + created. Required. + :paramtype location: str + :keyword properties: The properties that the webhook will be created with. + :paramtype properties: + ~container_registry_management_client.models.WebhookPropertiesCreateParameters + """ + super().__init__(**kwargs) + self.tags = tags + self.location = location + self.properties = properties + + +class WebhookListResult(_serialization.Model): + """The result of a request to list webhooks for a container registry. + + :ivar value: The list of webhooks. Since this list may be incomplete, the nextLink field should + be used to request the next list of webhooks. + :vartype value: list[~container_registry_management_client.models.Webhook] + :ivar next_link: The URI that can be used to request the next list of webhooks. + :vartype next_link: str + """ + + _attribute_map = { + "value": {"key": "value", "type": "[Webhook]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__( + self, *, value: Optional[list["_models.Webhook"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: + """ + :keyword value: The list of webhooks. Since this list may be incomplete, the nextLink field + should be used to request the next list of webhooks. + :paramtype value: list[~container_registry_management_client.models.Webhook] + :keyword next_link: The URI that can be used to request the next list of webhooks. + :paramtype next_link: str + """ + super().__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class WebhookProperties(_serialization.Model): + """The properties of a webhook. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to server. + + :ivar status: The status of the webhook at the time the operation was called. Known values are: + "enabled" and "disabled". + :vartype status: str or ~container_registry_management_client.models.WebhookStatus + :ivar scope: The scope of repositories where the event can be triggered. For example, 'foo:*' + means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. + 'foo' is equivalent to 'foo:latest'. Empty means all events. + :vartype scope: str + :ivar actions: The list of actions that trigger the webhook to post notifications. Required. + :vartype actions: list[str or ~container_registry_management_client.models.WebhookAction] + :ivar provisioning_state: The provisioning state of the webhook at the time the operation was + called. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and + "Canceled". + :vartype provisioning_state: str or + ~container_registry_management_client.models.ProvisioningState + """ + + _validation = { + "actions": {"required": True}, + "provisioning_state": {"readonly": True}, + } + + _attribute_map = { + "status": {"key": "status", "type": "str"}, + "scope": {"key": "scope", "type": "str"}, + "actions": {"key": "actions", "type": "[str]"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + } + + def __init__( + self, + *, + actions: list[Union[str, "_models.WebhookAction"]], + status: Optional[Union[str, "_models.WebhookStatus"]] = None, + scope: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword status: The status of the webhook at the time the operation was called. Known values + are: "enabled" and "disabled". + :paramtype status: str or ~container_registry_management_client.models.WebhookStatus + :keyword scope: The scope of repositories where the event can be triggered. For example, + 'foo:*' means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' + only. 'foo' is equivalent to 'foo:latest'. Empty means all events. + :paramtype scope: str + :keyword actions: The list of actions that trigger the webhook to post notifications. Required. + :paramtype actions: list[str or ~container_registry_management_client.models.WebhookAction] + """ + super().__init__(**kwargs) + self.status = status + self.scope = scope + self.actions = actions + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + + +class WebhookPropertiesCreateParameters(_serialization.Model): + """The parameters for creating the properties of a webhook. + + All required parameters must be populated in order to send to server. + + :ivar service_uri: The service URI for the webhook to post notifications. Required. + :vartype service_uri: str + :ivar custom_headers: Custom headers that will be added to the webhook notifications. + :vartype custom_headers: dict[str, str] + :ivar status: The status of the webhook at the time the operation was called. Known values are: + "enabled" and "disabled". + :vartype status: str or ~container_registry_management_client.models.WebhookStatus + :ivar scope: The scope of repositories where the event can be triggered. For example, 'foo:*' + means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. + 'foo' is equivalent to 'foo:latest'. Empty means all events. + :vartype scope: str + :ivar actions: The list of actions that trigger the webhook to post notifications. Required. + :vartype actions: list[str or ~container_registry_management_client.models.WebhookAction] + """ + + _validation = { + "service_uri": {"required": True}, + "actions": {"required": True}, + } + + _attribute_map = { + "service_uri": {"key": "serviceUri", "type": "str"}, + "custom_headers": {"key": "customHeaders", "type": "{str}"}, + "status": {"key": "status", "type": "str"}, + "scope": {"key": "scope", "type": "str"}, + "actions": {"key": "actions", "type": "[str]"}, + } + + def __init__( + self, + *, + service_uri: str, + actions: list[Union[str, "_models.WebhookAction"]], + custom_headers: Optional[dict[str, str]] = None, + status: Optional[Union[str, "_models.WebhookStatus"]] = None, + scope: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword service_uri: The service URI for the webhook to post notifications. Required. + :paramtype service_uri: str + :keyword custom_headers: Custom headers that will be added to the webhook notifications. + :paramtype custom_headers: dict[str, str] + :keyword status: The status of the webhook at the time the operation was called. Known values + are: "enabled" and "disabled". + :paramtype status: str or ~container_registry_management_client.models.WebhookStatus + :keyword scope: The scope of repositories where the event can be triggered. For example, + 'foo:*' means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' + only. 'foo' is equivalent to 'foo:latest'. Empty means all events. + :paramtype scope: str + :keyword actions: The list of actions that trigger the webhook to post notifications. Required. + :paramtype actions: list[str or ~container_registry_management_client.models.WebhookAction] + """ + super().__init__(**kwargs) + self.service_uri = service_uri + self.custom_headers = custom_headers + self.status = status + self.scope = scope + self.actions = actions + + +class WebhookPropertiesUpdateParameters(_serialization.Model): + """The parameters for updating the properties of a webhook. + + :ivar service_uri: The service URI for the webhook to post notifications. + :vartype service_uri: str + :ivar custom_headers: Custom headers that will be added to the webhook notifications. + :vartype custom_headers: dict[str, str] + :ivar status: The status of the webhook at the time the operation was called. Known values are: + "enabled" and "disabled". + :vartype status: str or ~container_registry_management_client.models.WebhookStatus + :ivar scope: The scope of repositories where the event can be triggered. For example, 'foo:*' + means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. + 'foo' is equivalent to 'foo:latest'. Empty means all events. + :vartype scope: str + :ivar actions: The list of actions that trigger the webhook to post notifications. + :vartype actions: list[str or ~container_registry_management_client.models.WebhookAction] + """ + + _attribute_map = { + "service_uri": {"key": "serviceUri", "type": "str"}, + "custom_headers": {"key": "customHeaders", "type": "{str}"}, + "status": {"key": "status", "type": "str"}, + "scope": {"key": "scope", "type": "str"}, + "actions": {"key": "actions", "type": "[str]"}, + } + + def __init__( + self, + *, + service_uri: Optional[str] = None, + custom_headers: Optional[dict[str, str]] = None, + status: Optional[Union[str, "_models.WebhookStatus"]] = None, + scope: Optional[str] = None, + actions: Optional[list[Union[str, "_models.WebhookAction"]]] = None, + **kwargs: Any + ) -> None: + """ + :keyword service_uri: The service URI for the webhook to post notifications. + :paramtype service_uri: str + :keyword custom_headers: Custom headers that will be added to the webhook notifications. + :paramtype custom_headers: dict[str, str] + :keyword status: The status of the webhook at the time the operation was called. Known values + are: "enabled" and "disabled". + :paramtype status: str or ~container_registry_management_client.models.WebhookStatus + :keyword scope: The scope of repositories where the event can be triggered. For example, + 'foo:*' means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' + only. 'foo' is equivalent to 'foo:latest'. Empty means all events. + :paramtype scope: str + :keyword actions: The list of actions that trigger the webhook to post notifications. + :paramtype actions: list[str or ~container_registry_management_client.models.WebhookAction] + """ + super().__init__(**kwargs) + self.service_uri = service_uri + self.custom_headers = custom_headers + self.status = status + self.scope = scope + self.actions = actions + + +class WebhookUpdateParameters(_serialization.Model): + """The parameters for updating a webhook. + + :ivar tags: The tags for the webhook. + :vartype tags: dict[str, str] + :ivar properties: The properties that the webhook will be updated with. + :vartype properties: + ~container_registry_management_client.models.WebhookPropertiesUpdateParameters + """ + + _attribute_map = { + "tags": {"key": "tags", "type": "{str}"}, + "properties": {"key": "properties", "type": "WebhookPropertiesUpdateParameters"}, + } + + def __init__( + self, + *, + tags: Optional[dict[str, str]] = None, + properties: Optional["_models.WebhookPropertiesUpdateParameters"] = None, + **kwargs: Any + ) -> None: + """ + :keyword tags: The tags for the webhook. + :paramtype tags: dict[str, str] + :keyword properties: The properties that the webhook will be updated with. + :paramtype properties: + ~container_registry_management_client.models.WebhookPropertiesUpdateParameters + """ + super().__init__(**kwargs) + self.tags = tags + self.properties = properties diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/models/_patch.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/models/_patch.py new file mode 100644 index 00000000000..87676c65a8f --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/models/_patch.py @@ -0,0 +1,21 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" + + +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/operations/__init__.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/operations/__init__.py new file mode 100644 index 00000000000..de865704f5c --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/operations/__init__.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.8, generator: @autorest/python@6.49.1) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position + +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import Operations # type: ignore +from ._operations import RegistriesOperations # type: ignore +from ._operations import CacheRulesOperations # type: ignore +from ._operations import ConnectedRegistriesOperations # type: ignore +from ._operations import CredentialSetsOperations # type: ignore +from ._operations import ExportPipelinesOperations # type: ignore +from ._operations import ImportPipelinesOperations # type: ignore +from ._operations import ArchivesOperations # type: ignore +from ._operations import ArchiveVersionsOperations # type: ignore +from ._operations import PipelineRunsOperations # type: ignore +from ._operations import PrivateEndpointConnectionsOperations # type: ignore +from ._operations import ReplicationsOperations # type: ignore +from ._operations import ScopeMapsOperations # type: ignore +from ._operations import TokensOperations # type: ignore +from ._operations import WebhooksOperations # type: ignore + +from ._patch import __all__ as _patch_all +from ._patch import * +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "Operations", + "RegistriesOperations", + "CacheRulesOperations", + "ConnectedRegistriesOperations", + "CredentialSetsOperations", + "ExportPipelinesOperations", + "ImportPipelinesOperations", + "ArchivesOperations", + "ArchiveVersionsOperations", + "PipelineRunsOperations", + "PrivateEndpointConnectionsOperations", + "ReplicationsOperations", + "ScopeMapsOperations", + "TokensOperations", + "WebhooksOperations", +] +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore +_patch_sdk() diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/operations/_operations.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/operations/_operations.py new file mode 100644 index 00000000000..5c3bd56b7a0 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/operations/_operations.py @@ -0,0 +1,13281 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.8, generator: @autorest/python@6.49.1) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from collections.abc import MutableMapping +from io import IOBase +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload +import urllib.parse + +from azure.core import PipelineClient +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, + map_error, +) +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.polling.base_polling import LROBasePolling +from azure.core.rest import HttpRequest, HttpResponse +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict + +from .. import models as _models +from .._configuration import ContainerRegistryManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_operations_list_request(**kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/providers/Microsoft.ContainerRegistry/operations" + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_registries_check_name_availability_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerRegistry/checkNameAvailability" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_registries_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerRegistry/registries" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_registries_list_by_resource_group_request( # pylint: disable=name-too-long + resource_group_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_registries_get_request( + resource_group_name: str, registry_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_registries_create_request( + resource_group_name: str, registry_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_registries_update_request( + resource_group_name: str, registry_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_registries_delete_request( + resource_group_name: str, registry_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_registries_generate_credentials_request( # pylint: disable=name-too-long + resource_group_name: str, registry_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/generateCredentials" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_registries_import_image_request( + resource_group_name: str, registry_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importImage" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_registries_list_credentials_request( # pylint: disable=name-too-long + resource_group_name: str, registry_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listCredentials" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_registries_list_usages_request( + resource_group_name: str, registry_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listUsages" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_registries_list_private_link_resources_request( # pylint: disable=name-too-long + resource_group_name: str, registry_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateLinkResources" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_registries_get_private_link_resource_request( # pylint: disable=name-too-long + resource_group_name: str, registry_name: str, group_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateLinkResources/{groupName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "groupName": _SERIALIZER.url("group_name", group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_registries_regenerate_credential_request( # pylint: disable=name-too-long + resource_group_name: str, registry_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/regenerateCredential" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_cache_rules_list_request( + resource_group_name: str, registry_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_cache_rules_get_request( + resource_group_name: str, registry_name: str, cache_rule_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules/{cacheRuleName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "cacheRuleName": _SERIALIZER.url( + "cache_rule_name", cache_rule_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9-]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_cache_rules_create_request( + resource_group_name: str, registry_name: str, cache_rule_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules/{cacheRuleName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "cacheRuleName": _SERIALIZER.url( + "cache_rule_name", cache_rule_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9-]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_cache_rules_update_request( + resource_group_name: str, registry_name: str, cache_rule_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules/{cacheRuleName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "cacheRuleName": _SERIALIZER.url( + "cache_rule_name", cache_rule_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9-]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_cache_rules_delete_request( + resource_group_name: str, registry_name: str, cache_rule_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules/{cacheRuleName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "cacheRuleName": _SERIALIZER.url( + "cache_rule_name", cache_rule_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9-]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_connected_registries_list_request( + resource_group_name: str, registry_name: str, subscription_id: str, *, filter: Optional[str] = None, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if filter is not None: + _params["$filter"] = _SERIALIZER.query("filter", filter, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_connected_registries_get_request( + resource_group_name: str, registry_name: str, connected_registry_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "connectedRegistryName": _SERIALIZER.url( + "connected_registry_name", + connected_registry_name, + "str", + max_length=50, + min_length=5, + pattern=r"^[a-zA-Z0-9]*$", + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_connected_registries_create_request( # pylint: disable=name-too-long + resource_group_name: str, registry_name: str, connected_registry_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "connectedRegistryName": _SERIALIZER.url( + "connected_registry_name", + connected_registry_name, + "str", + max_length=50, + min_length=5, + pattern=r"^[a-zA-Z0-9]*$", + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_connected_registries_update_request( # pylint: disable=name-too-long + resource_group_name: str, registry_name: str, connected_registry_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "connectedRegistryName": _SERIALIZER.url( + "connected_registry_name", + connected_registry_name, + "str", + max_length=50, + min_length=5, + pattern=r"^[a-zA-Z0-9]*$", + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_connected_registries_delete_request( # pylint: disable=name-too-long + resource_group_name: str, registry_name: str, connected_registry_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "connectedRegistryName": _SERIALIZER.url( + "connected_registry_name", + connected_registry_name, + "str", + max_length=50, + min_length=5, + pattern=r"^[a-zA-Z0-9]*$", + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_connected_registries_deactivate_request( # pylint: disable=name-too-long + resource_group_name: str, registry_name: str, connected_registry_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}/deactivate" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "connectedRegistryName": _SERIALIZER.url( + "connected_registry_name", + connected_registry_name, + "str", + max_length=50, + min_length=5, + pattern=r"^[a-zA-Z0-9]*$", + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_connected_registries_resync_request( # pylint: disable=name-too-long + resource_group_name: str, registry_name: str, connected_registry_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}/resync" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "connectedRegistryName": _SERIALIZER.url( + "connected_registry_name", + connected_registry_name, + "str", + max_length=50, + min_length=5, + pattern=r"^[a-zA-Z0-9]*$", + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_credential_sets_list_request( + resource_group_name: str, registry_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_credential_sets_get_request( + resource_group_name: str, registry_name: str, credential_set_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets/{credentialSetName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "credentialSetName": _SERIALIZER.url( + "credential_set_name", credential_set_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9-]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_credential_sets_create_request( + resource_group_name: str, registry_name: str, credential_set_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets/{credentialSetName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "credentialSetName": _SERIALIZER.url( + "credential_set_name", credential_set_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9-]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_credential_sets_update_request( + resource_group_name: str, registry_name: str, credential_set_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets/{credentialSetName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "credentialSetName": _SERIALIZER.url( + "credential_set_name", credential_set_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9-]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_credential_sets_delete_request( + resource_group_name: str, registry_name: str, credential_set_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets/{credentialSetName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "credentialSetName": _SERIALIZER.url( + "credential_set_name", credential_set_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9-]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_export_pipelines_list_request( + resource_group_name: str, registry_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_export_pipelines_get_request( + resource_group_name: str, registry_name: str, export_pipeline_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines/{exportPipelineName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "exportPipelineName": _SERIALIZER.url( + "export_pipeline_name", export_pipeline_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_export_pipelines_create_request( + resource_group_name: str, registry_name: str, export_pipeline_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines/{exportPipelineName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "exportPipelineName": _SERIALIZER.url( + "export_pipeline_name", export_pipeline_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_export_pipelines_delete_request( + resource_group_name: str, registry_name: str, export_pipeline_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines/{exportPipelineName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "exportPipelineName": _SERIALIZER.url( + "export_pipeline_name", export_pipeline_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_import_pipelines_list_request( + resource_group_name: str, registry_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_import_pipelines_get_request( + resource_group_name: str, registry_name: str, import_pipeline_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines/{importPipelineName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "importPipelineName": _SERIALIZER.url( + "import_pipeline_name", import_pipeline_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_import_pipelines_create_request( + resource_group_name: str, registry_name: str, import_pipeline_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines/{importPipelineName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "importPipelineName": _SERIALIZER.url( + "import_pipeline_name", import_pipeline_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_import_pipelines_delete_request( + resource_group_name: str, registry_name: str, import_pipeline_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines/{importPipelineName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "importPipelineName": _SERIALIZER.url( + "import_pipeline_name", import_pipeline_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_archives_list_request( + resource_group_name: str, registry_name: str, package_type: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "packageType": _SERIALIZER.url( + "package_type", package_type, "str", max_length=50, min_length=3, pattern=r"^[a-zA-Z]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_archives_get_request( + resource_group_name: str, + registry_name: str, + package_type: str, + archive_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "packageType": _SERIALIZER.url( + "package_type", package_type, "str", max_length=50, min_length=3, pattern=r"^[a-zA-Z]*$" + ), + "archiveName": _SERIALIZER.url( + "archive_name", archive_name, "str", max_length=200, min_length=5, pattern=r"^[a-zA-Z0-9-]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_archives_create_request( + resource_group_name: str, + registry_name: str, + package_type: str, + archive_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "packageType": _SERIALIZER.url( + "package_type", package_type, "str", max_length=50, min_length=3, pattern=r"^[a-zA-Z]*$" + ), + "archiveName": _SERIALIZER.url( + "archive_name", archive_name, "str", max_length=200, min_length=5, pattern=r"^[a-zA-Z0-9-]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_archives_update_request( + resource_group_name: str, + registry_name: str, + package_type: str, + archive_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "packageType": _SERIALIZER.url( + "package_type", package_type, "str", max_length=50, min_length=3, pattern=r"^[a-zA-Z]*$" + ), + "archiveName": _SERIALIZER.url( + "archive_name", archive_name, "str", max_length=200, min_length=5, pattern=r"^[a-zA-Z0-9-]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_archives_delete_request( + resource_group_name: str, + registry_name: str, + package_type: str, + archive_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "packageType": _SERIALIZER.url( + "package_type", package_type, "str", max_length=50, min_length=3, pattern=r"^[a-zA-Z]*$" + ), + "archiveName": _SERIALIZER.url( + "archive_name", archive_name, "str", max_length=200, min_length=5, pattern=r"^[a-zA-Z0-9-]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_archive_versions_list_request( + resource_group_name: str, + registry_name: str, + package_type: str, + archive_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}/versions" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "packageType": _SERIALIZER.url( + "package_type", package_type, "str", max_length=50, min_length=3, pattern=r"^[a-zA-Z]*$" + ), + "archiveName": _SERIALIZER.url( + "archive_name", archive_name, "str", max_length=200, min_length=5, pattern=r"^[a-zA-Z0-9-]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_archive_versions_get_request( + resource_group_name: str, + registry_name: str, + package_type: str, + archive_name: str, + archive_version_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}/versions/{archiveVersionName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "packageType": _SERIALIZER.url( + "package_type", package_type, "str", max_length=50, min_length=3, pattern=r"^[a-zA-Z]*$" + ), + "archiveName": _SERIALIZER.url( + "archive_name", archive_name, "str", max_length=200, min_length=5, pattern=r"^[a-zA-Z0-9-]*$" + ), + "archiveVersionName": _SERIALIZER.url( + "archive_version_name", + archive_version_name, + "str", + max_length=200, + min_length=5, + pattern=r"^[a-zA-Z0-9-]*$", + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_archive_versions_create_request( + resource_group_name: str, + registry_name: str, + package_type: str, + archive_name: str, + archive_version_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}/versions/{archiveVersionName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "packageType": _SERIALIZER.url( + "package_type", package_type, "str", max_length=50, min_length=3, pattern=r"^[a-zA-Z]*$" + ), + "archiveName": _SERIALIZER.url( + "archive_name", archive_name, "str", max_length=200, min_length=5, pattern=r"^[a-zA-Z0-9-]*$" + ), + "archiveVersionName": _SERIALIZER.url( + "archive_version_name", + archive_version_name, + "str", + max_length=200, + min_length=5, + pattern=r"^[a-zA-Z0-9-]*$", + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_archive_versions_delete_request( + resource_group_name: str, + registry_name: str, + package_type: str, + archive_name: str, + archive_version_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}/versions/{archiveVersionName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "packageType": _SERIALIZER.url( + "package_type", package_type, "str", max_length=50, min_length=3, pattern=r"^[a-zA-Z]*$" + ), + "archiveName": _SERIALIZER.url( + "archive_name", archive_name, "str", max_length=200, min_length=5, pattern=r"^[a-zA-Z0-9-]*$" + ), + "archiveVersionName": _SERIALIZER.url( + "archive_version_name", + archive_version_name, + "str", + max_length=200, + min_length=5, + pattern=r"^[a-zA-Z0-9-]*$", + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_pipeline_runs_list_request( + resource_group_name: str, registry_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_pipeline_runs_get_request( + resource_group_name: str, registry_name: str, pipeline_run_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns/{pipelineRunName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "pipelineRunName": _SERIALIZER.url( + "pipeline_run_name", pipeline_run_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_pipeline_runs_create_request( + resource_group_name: str, registry_name: str, pipeline_run_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns/{pipelineRunName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "pipelineRunName": _SERIALIZER.url( + "pipeline_run_name", pipeline_run_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_pipeline_runs_delete_request( + resource_group_name: str, registry_name: str, pipeline_run_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns/{pipelineRunName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "pipelineRunName": _SERIALIZER.url( + "pipeline_run_name", pipeline_run_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_private_endpoint_connections_list_request( # pylint: disable=name-too-long + resource_group_name: str, registry_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateEndpointConnections" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_private_endpoint_connections_get_request( # pylint: disable=name-too-long + resource_group_name: str, + registry_name: str, + private_endpoint_connection_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateEndpointConnections/{privateEndpointConnectionName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "privateEndpointConnectionName": _SERIALIZER.url( + "private_endpoint_connection_name", private_endpoint_connection_name, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_private_endpoint_connections_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + registry_name: str, + private_endpoint_connection_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateEndpointConnections/{privateEndpointConnectionName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "privateEndpointConnectionName": _SERIALIZER.url( + "private_endpoint_connection_name", private_endpoint_connection_name, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_private_endpoint_connections_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + registry_name: str, + private_endpoint_connection_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateEndpointConnections/{privateEndpointConnectionName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "privateEndpointConnectionName": _SERIALIZER.url( + "private_endpoint_connection_name", private_endpoint_connection_name, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_replications_list_request( + resource_group_name: str, registry_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_replications_get_request( + resource_group_name: str, registry_name: str, replication_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications/{replicationName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "replicationName": _SERIALIZER.url( + "replication_name", replication_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_replications_create_request( + resource_group_name: str, registry_name: str, replication_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications/{replicationName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "replicationName": _SERIALIZER.url( + "replication_name", replication_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_replications_update_request( + resource_group_name: str, registry_name: str, replication_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications/{replicationName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "replicationName": _SERIALIZER.url( + "replication_name", replication_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_replications_delete_request( + resource_group_name: str, registry_name: str, replication_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications/{replicationName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "replicationName": _SERIALIZER.url( + "replication_name", replication_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_scope_maps_list_request( + resource_group_name: str, registry_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_scope_maps_get_request( + resource_group_name: str, registry_name: str, scope_map_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps/{scopeMapName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "scopeMapName": _SERIALIZER.url( + "scope_map_name", scope_map_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9-_]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_scope_maps_create_request( + resource_group_name: str, registry_name: str, scope_map_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps/{scopeMapName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "scopeMapName": _SERIALIZER.url( + "scope_map_name", scope_map_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9-_]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_scope_maps_update_request( + resource_group_name: str, registry_name: str, scope_map_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps/{scopeMapName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "scopeMapName": _SERIALIZER.url( + "scope_map_name", scope_map_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9-_]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_scope_maps_delete_request( + resource_group_name: str, registry_name: str, scope_map_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps/{scopeMapName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "scopeMapName": _SERIALIZER.url( + "scope_map_name", scope_map_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9-_]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_tokens_list_request( + resource_group_name: str, registry_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_tokens_get_request( + resource_group_name: str, registry_name: str, token_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens/{tokenName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "tokenName": _SERIALIZER.url( + "token_name", token_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9-]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_tokens_create_request( + resource_group_name: str, registry_name: str, token_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens/{tokenName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "tokenName": _SERIALIZER.url( + "token_name", token_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9-]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_tokens_update_request( + resource_group_name: str, registry_name: str, token_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens/{tokenName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "tokenName": _SERIALIZER.url( + "token_name", token_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9-]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_tokens_delete_request( + resource_group_name: str, registry_name: str, token_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens/{tokenName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "tokenName": _SERIALIZER.url( + "token_name", token_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9-]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_webhooks_list_request( + resource_group_name: str, registry_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_webhooks_get_request( + resource_group_name: str, registry_name: str, webhook_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "webhookName": _SERIALIZER.url( + "webhook_name", webhook_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_webhooks_create_request( + resource_group_name: str, registry_name: str, webhook_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "webhookName": _SERIALIZER.url( + "webhook_name", webhook_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_webhooks_update_request( + resource_group_name: str, registry_name: str, webhook_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "webhookName": _SERIALIZER.url( + "webhook_name", webhook_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_webhooks_delete_request( + resource_group_name: str, registry_name: str, webhook_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "webhookName": _SERIALIZER.url( + "webhook_name", webhook_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_webhooks_get_callback_config_request( # pylint: disable=name-too-long + resource_group_name: str, registry_name: str, webhook_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/getCallbackConfig" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "webhookName": _SERIALIZER.url( + "webhook_name", webhook_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_webhooks_list_events_request( + resource_group_name: str, registry_name: str, webhook_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/listEvents" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "webhookName": _SERIALIZER.url( + "webhook_name", webhook_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_webhooks_ping_request( + resource_group_name: str, registry_name: str, webhook_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/ping" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "registryName": _SERIALIZER.url( + "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + "webhookName": _SERIALIZER.url( + "webhook_name", webhook_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +class Operations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~container_registry_management_client.ContainerRegistryManagementClient`'s + :attr:`operations` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerRegistryManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, **kwargs: Any) -> ItemPaged["_models.OperationDefinition"]: + """List the operations for the provider. + + :return: An iterator like instance of OperationDefinition + :rtype: + ~azure.core.paging.ItemPaged[~container_registry_management_client.models.OperationDefinition] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models._models.OperationListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_operations_list_request( + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + + return _request + + def extract_data(pipeline_response): + deserialized = self._deserialize( + _models._models.OperationListResult, pipeline_response # pylint: disable=protected-access + ) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class RegistriesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~container_registry_management_client.ContainerRegistryManagementClient`'s + :attr:`registries` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerRegistryManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @overload + def check_name_availability( + self, + registry_name_check_request: _models.RegistryNameCheckRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.RegistryNameStatus: + """Checks whether the container registry name is available for use. The name must contain only + alphanumeric characters, be globally unique, and between 5 and 50 characters in length. + + :param registry_name_check_request: The request body. Required. + :type registry_name_check_request: + ~container_registry_management_client.models.RegistryNameCheckRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: RegistryNameStatus + :rtype: ~container_registry_management_client.models.RegistryNameStatus + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def check_name_availability( + self, registry_name_check_request: IO[bytes], *, content_type: str = "application/json", **kwargs: Any + ) -> _models.RegistryNameStatus: + """Checks whether the container registry name is available for use. The name must contain only + alphanumeric characters, be globally unique, and between 5 and 50 characters in length. + + :param registry_name_check_request: The request body. Required. + :type registry_name_check_request: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: RegistryNameStatus + :rtype: ~container_registry_management_client.models.RegistryNameStatus + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def check_name_availability( + self, registry_name_check_request: Union[_models.RegistryNameCheckRequest, IO[bytes]], **kwargs: Any + ) -> _models.RegistryNameStatus: + """Checks whether the container registry name is available for use. The name must contain only + alphanumeric characters, be globally unique, and between 5 and 50 characters in length. + + :param registry_name_check_request: The request body. Is either a RegistryNameCheckRequest type + or a IO[bytes] type. Required. + :type registry_name_check_request: + ~container_registry_management_client.models.RegistryNameCheckRequest or IO[bytes] + :return: RegistryNameStatus + :rtype: ~container_registry_management_client.models.RegistryNameStatus + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.RegistryNameStatus] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(registry_name_check_request, (IOBase, bytes)): + _content = registry_name_check_request + else: + _json = self._serialize.body(registry_name_check_request, "RegistryNameCheckRequest") + + _request = build_registries_check_name_availability_request( + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("RegistryNameStatus", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list(self, **kwargs: Any) -> ItemPaged["_models.Registry"]: + """Lists all the container registries under the specified subscription. + + :return: An iterator like instance of Registry + :rtype: ~azure.core.paging.ItemPaged[~container_registry_management_client.models.Registry] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models._models.RegistryListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_registries_list_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + + return _request + + def extract_data(pipeline_response): + deserialized = self._deserialize( + _models._models.RegistryListResult, pipeline_response # pylint: disable=protected-access + ) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.Registry"]: + """Lists all the container registries under the specified resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of Registry + :rtype: ~azure.core.paging.ItemPaged[~container_registry_management_client.models.Registry] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models._models.RegistryListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_registries_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + + return _request + + def extract_data(pipeline_response): + deserialized = self._deserialize( + _models._models.RegistryListResult, pipeline_response # pylint: disable=protected-access + ) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def get(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> _models.Registry: + """Gets the properties of the specified container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :return: Registry + :rtype: ~container_registry_management_client.models.Registry + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Registry] = kwargs.pop("cls", None) + + _request = build_registries_get_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("Registry", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, resource_group_name: str, registry_name: str, registry: Union[_models.Registry, IO[bytes]], **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(registry, (IOBase, bytes)): + _content = registry + else: + _json = self._serialize.body(registry, "Registry") + + _request = build_registries_create_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + registry_name: str, + registry: _models.Registry, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Registry]: + """Creates a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param registry: The parameters for creating a container registry. Required. + :type registry: ~container_registry_management_client.models.Registry + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Registry + :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Registry] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + registry_name: str, + registry: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Registry]: + """Creates a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param registry: The parameters for creating a container registry. Required. + :type registry: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Registry + :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Registry] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create( + self, resource_group_name: str, registry_name: str, registry: Union[_models.Registry, IO[bytes]], **kwargs: Any + ) -> LROPoller[_models.Registry]: + """Creates a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param registry: The parameters for creating a container registry. Is either a Registry type or + a IO[bytes] type. Required. + :type registry: ~container_registry_management_client.models.Registry or IO[bytes] + :return: An instance of LROPoller that returns Registry + :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Registry] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Registry] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + registry=registry, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("Registry", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, + LROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.Registry].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.Registry]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + registry_name: str, + registry_update_parameters: Union[_models.RegistryUpdateParameters, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(registry_update_parameters, (IOBase, bytes)): + _content = registry_update_parameters + else: + _json = self._serialize.body(registry_update_parameters, "RegistryUpdateParameters") + + _request = build_registries_update_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + registry_name: str, + registry_update_parameters: _models.RegistryUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Registry]: + """Updates a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param registry_update_parameters: The parameters for updating a container registry. Required. + :type registry_update_parameters: + ~container_registry_management_client.models.RegistryUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Registry + :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Registry] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + registry_name: str, + registry_update_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Registry]: + """Updates a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param registry_update_parameters: The parameters for updating a container registry. Required. + :type registry_update_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Registry + :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Registry] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + registry_name: str, + registry_update_parameters: Union[_models.RegistryUpdateParameters, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.Registry]: + """Updates a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param registry_update_parameters: The parameters for updating a container registry. Is either + a RegistryUpdateParameters type or a IO[bytes] type. Required. + :type registry_update_parameters: + ~container_registry_management_client.models.RegistryUpdateParameters or IO[bytes] + :return: An instance of LROPoller that returns Registry + :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Registry] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Registry] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + registry_update_parameters=registry_update_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("Registry", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, + LROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.Registry].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.Registry]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_registries_delete_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> LROPoller[None]: + """Deletes a container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, LROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + def _generate_credentials_initial( + self, + resource_group_name: str, + registry_name: str, + generate_credentials_parameters: Union[_models.GenerateCredentialsParameters, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(generate_credentials_parameters, (IOBase, bytes)): + _content = generate_credentials_parameters + else: + _json = self._serialize.body(generate_credentials_parameters, "GenerateCredentialsParameters") + + _request = build_registries_generate_credentials_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_generate_credentials( + self, + resource_group_name: str, + registry_name: str, + generate_credentials_parameters: _models.GenerateCredentialsParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.GenerateCredentialsResult]: + """Generate keys for a token of a specified container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param generate_credentials_parameters: The parameters for generating credentials. Required. + :type generate_credentials_parameters: + ~container_registry_management_client.models.GenerateCredentialsParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns GenerateCredentialsResult + :rtype: + ~azure.core.polling.LROPoller[~container_registry_management_client.models.GenerateCredentialsResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_generate_credentials( + self, + resource_group_name: str, + registry_name: str, + generate_credentials_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.GenerateCredentialsResult]: + """Generate keys for a token of a specified container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param generate_credentials_parameters: The parameters for generating credentials. Required. + :type generate_credentials_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns GenerateCredentialsResult + :rtype: + ~azure.core.polling.LROPoller[~container_registry_management_client.models.GenerateCredentialsResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_generate_credentials( + self, + resource_group_name: str, + registry_name: str, + generate_credentials_parameters: Union[_models.GenerateCredentialsParameters, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.GenerateCredentialsResult]: + """Generate keys for a token of a specified container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param generate_credentials_parameters: The parameters for generating credentials. Is either a + GenerateCredentialsParameters type or a IO[bytes] type. Required. + :type generate_credentials_parameters: + ~container_registry_management_client.models.GenerateCredentialsParameters or IO[bytes] + :return: An instance of LROPoller that returns GenerateCredentialsResult + :rtype: + ~azure.core.polling.LROPoller[~container_registry_management_client.models.GenerateCredentialsResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.GenerateCredentialsResult] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._generate_credentials_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + generate_credentials_parameters=generate_credentials_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("GenerateCredentialsResult", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, LROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.GenerateCredentialsResult].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.GenerateCredentialsResult]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _import_image_initial( + self, + resource_group_name: str, + registry_name: str, + parameters: Union[_models.ImportImageParameters, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _json = self._serialize.body(parameters, "ImportImageParameters") + + _request = build_registries_import_image_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_import_image( + self, + resource_group_name: str, + registry_name: str, + parameters: _models.ImportImageParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Copies an image to this container registry from the specified container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param parameters: The parameters specifying the image to copy and the source container + registry. Required. + :type parameters: ~container_registry_management_client.models.ImportImageParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_import_image( + self, + resource_group_name: str, + registry_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Copies an image to this container registry from the specified container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param parameters: The parameters specifying the image to copy and the source container + registry. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_import_image( + self, + resource_group_name: str, + registry_name: str, + parameters: Union[_models.ImportImageParameters, IO[bytes]], + **kwargs: Any + ) -> LROPoller[None]: + """Copies an image to this container registry from the specified container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param parameters: The parameters specifying the image to copy and the source container + registry. Is either a ImportImageParameters type or a IO[bytes] type. Required. + :type parameters: ~container_registry_management_client.models.ImportImageParameters or + IO[bytes] + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._import_image_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, LROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_credentials( + self, resource_group_name: str, registry_name: str, **kwargs: Any + ) -> _models.RegistryListCredentialsResult: + """Lists the login credentials for the specified container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :return: RegistryListCredentialsResult + :rtype: ~container_registry_management_client.models.RegistryListCredentialsResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.RegistryListCredentialsResult] = kwargs.pop("cls", None) + + _request = build_registries_list_credentials_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("RegistryListCredentialsResult", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_usages( + self, resource_group_name: str, registry_name: str, **kwargs: Any + ) -> _models.RegistryUsageListResult: + """Gets the quota usages for the specified container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :return: RegistryUsageListResult + :rtype: ~container_registry_management_client.models.RegistryUsageListResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.RegistryUsageListResult] = kwargs.pop("cls", None) + + _request = build_registries_list_usages_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("RegistryUsageListResult", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_private_link_resources( + self, resource_group_name: str, registry_name: str, **kwargs: Any + ) -> ItemPaged["_models.PrivateLinkResource"]: + """Lists the private link resources for a container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :return: An iterator like instance of PrivateLinkResource + :rtype: + ~azure.core.paging.ItemPaged[~container_registry_management_client.models.PrivateLinkResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models._models.PrivateLinkResourceListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_registries_list_private_link_resources_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + + return _request + + def extract_data(pipeline_response): + deserialized = self._deserialize( + _models._models.PrivateLinkResourceListResult, pipeline_response # pylint: disable=protected-access + ) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def get_private_link_resource( + self, resource_group_name: str, registry_name: str, group_name: str, **kwargs: Any + ) -> _models.PrivateLinkResource: + """Gets a private link resource by a specified group name for a container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param group_name: The name of the private link associated with the Azure resource. Required. + :type group_name: str + :return: PrivateLinkResource + :rtype: ~container_registry_management_client.models.PrivateLinkResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PrivateLinkResource] = kwargs.pop("cls", None) + + _request = build_registries_get_private_link_resource_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + group_name=group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("PrivateLinkResource", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def regenerate_credential( + self, + resource_group_name: str, + registry_name: str, + regenerate_credential_parameters: _models.RegenerateCredentialParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.RegistryListCredentialsResult: + """Regenerates one of the login credentials for the specified container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param regenerate_credential_parameters: Specifies name of the password which should be + regenerated -- password or password2. Required. + :type regenerate_credential_parameters: + ~container_registry_management_client.models.RegenerateCredentialParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: RegistryListCredentialsResult + :rtype: ~container_registry_management_client.models.RegistryListCredentialsResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def regenerate_credential( + self, + resource_group_name: str, + registry_name: str, + regenerate_credential_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.RegistryListCredentialsResult: + """Regenerates one of the login credentials for the specified container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param regenerate_credential_parameters: Specifies name of the password which should be + regenerated -- password or password2. Required. + :type regenerate_credential_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: RegistryListCredentialsResult + :rtype: ~container_registry_management_client.models.RegistryListCredentialsResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def regenerate_credential( + self, + resource_group_name: str, + registry_name: str, + regenerate_credential_parameters: Union[_models.RegenerateCredentialParameters, IO[bytes]], + **kwargs: Any + ) -> _models.RegistryListCredentialsResult: + """Regenerates one of the login credentials for the specified container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param regenerate_credential_parameters: Specifies name of the password which should be + regenerated -- password or password2. Is either a RegenerateCredentialParameters type or a + IO[bytes] type. Required. + :type regenerate_credential_parameters: + ~container_registry_management_client.models.RegenerateCredentialParameters or IO[bytes] + :return: RegistryListCredentialsResult + :rtype: ~container_registry_management_client.models.RegistryListCredentialsResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.RegistryListCredentialsResult] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(regenerate_credential_parameters, (IOBase, bytes)): + _content = regenerate_credential_parameters + else: + _json = self._serialize.body(regenerate_credential_parameters, "RegenerateCredentialParameters") + + _request = build_registries_regenerate_credential_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("RegistryListCredentialsResult", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class CacheRulesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~container_registry_management_client.ContainerRegistryManagementClient`'s + :attr:`cache_rules` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerRegistryManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> ItemPaged["_models.CacheRule"]: + """Lists all cache rule resources for the specified container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :return: An iterator like instance of CacheRule + :rtype: ~azure.core.paging.ItemPaged[~container_registry_management_client.models.CacheRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models._models.CacheRulesListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_cache_rules_list_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + + return _request + + def extract_data(pipeline_response): + deserialized = self._deserialize( + _models._models.CacheRulesListResult, pipeline_response # pylint: disable=protected-access + ) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def get( + self, resource_group_name: str, registry_name: str, cache_rule_name: str, **kwargs: Any + ) -> _models.CacheRule: + """Gets the properties of the specified cache rule resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param cache_rule_name: The name of the cache rule. Required. + :type cache_rule_name: str + :return: CacheRule + :rtype: ~container_registry_management_client.models.CacheRule + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.CacheRule] = kwargs.pop("cls", None) + + _request = build_cache_rules_get_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + cache_rule_name=cache_rule_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("CacheRule", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, + resource_group_name: str, + registry_name: str, + cache_rule_name: str, + cache_rule_create_parameters: Union[_models.CacheRule, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(cache_rule_create_parameters, (IOBase, bytes)): + _content = cache_rule_create_parameters + else: + _json = self._serialize.body(cache_rule_create_parameters, "CacheRule") + + _request = build_cache_rules_create_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + cache_rule_name=cache_rule_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + registry_name: str, + cache_rule_name: str, + cache_rule_create_parameters: _models.CacheRule, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CacheRule]: + """Creates a cache rule for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param cache_rule_name: The name of the cache rule. Required. + :type cache_rule_name: str + :param cache_rule_create_parameters: The parameters for creating a cache rule. Required. + :type cache_rule_create_parameters: ~container_registry_management_client.models.CacheRule + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns CacheRule + :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.CacheRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + registry_name: str, + cache_rule_name: str, + cache_rule_create_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CacheRule]: + """Creates a cache rule for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param cache_rule_name: The name of the cache rule. Required. + :type cache_rule_name: str + :param cache_rule_create_parameters: The parameters for creating a cache rule. Required. + :type cache_rule_create_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns CacheRule + :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.CacheRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create( + self, + resource_group_name: str, + registry_name: str, + cache_rule_name: str, + cache_rule_create_parameters: Union[_models.CacheRule, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.CacheRule]: + """Creates a cache rule for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param cache_rule_name: The name of the cache rule. Required. + :type cache_rule_name: str + :param cache_rule_create_parameters: The parameters for creating a cache rule. Is either a + CacheRule type or a IO[bytes] type. Required. + :type cache_rule_create_parameters: ~container_registry_management_client.models.CacheRule or + IO[bytes] + :return: An instance of LROPoller that returns CacheRule + :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.CacheRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CacheRule] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + cache_rule_name=cache_rule_name, + cache_rule_create_parameters=cache_rule_create_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("CacheRule", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, + LROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.CacheRule].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.CacheRule]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + registry_name: str, + cache_rule_name: str, + cache_rule_update_parameters: Union[_models.CacheRuleUpdateParameters, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(cache_rule_update_parameters, (IOBase, bytes)): + _content = cache_rule_update_parameters + else: + _json = self._serialize.body(cache_rule_update_parameters, "CacheRuleUpdateParameters") + + _request = build_cache_rules_update_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + cache_rule_name=cache_rule_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + registry_name: str, + cache_rule_name: str, + cache_rule_update_parameters: _models.CacheRuleUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CacheRule]: + """Updates a cache rule for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param cache_rule_name: The name of the cache rule. Required. + :type cache_rule_name: str + :param cache_rule_update_parameters: The parameters for updating a cache rule. Required. + :type cache_rule_update_parameters: + ~container_registry_management_client.models.CacheRuleUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns CacheRule + :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.CacheRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + registry_name: str, + cache_rule_name: str, + cache_rule_update_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CacheRule]: + """Updates a cache rule for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param cache_rule_name: The name of the cache rule. Required. + :type cache_rule_name: str + :param cache_rule_update_parameters: The parameters for updating a cache rule. Required. + :type cache_rule_update_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns CacheRule + :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.CacheRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + registry_name: str, + cache_rule_name: str, + cache_rule_update_parameters: Union[_models.CacheRuleUpdateParameters, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.CacheRule]: + """Updates a cache rule for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param cache_rule_name: The name of the cache rule. Required. + :type cache_rule_name: str + :param cache_rule_update_parameters: The parameters for updating a cache rule. Is either a + CacheRuleUpdateParameters type or a IO[bytes] type. Required. + :type cache_rule_update_parameters: + ~container_registry_management_client.models.CacheRuleUpdateParameters or IO[bytes] + :return: An instance of LROPoller that returns CacheRule + :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.CacheRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CacheRule] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + cache_rule_name=cache_rule_name, + cache_rule_update_parameters=cache_rule_update_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("CacheRule", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, + LROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.CacheRule].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.CacheRule]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, resource_group_name: str, registry_name: str, cache_rule_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_cache_rules_delete_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + cache_rule_name=cache_rule_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, resource_group_name: str, registry_name: str, cache_rule_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes a cache rule resource from a container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param cache_rule_name: The name of the cache rule. Required. + :type cache_rule_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + cache_rule_name=cache_rule_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, LROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + +class ConnectedRegistriesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~container_registry_management_client.ContainerRegistryManagementClient`'s + :attr:`connected_registries` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerRegistryManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, resource_group_name: str, registry_name: str, *, filter: Optional[str] = None, **kwargs: Any + ) -> ItemPaged["_models.ConnectedRegistry"]: + """Lists all connected registries for the specified container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :keyword filter: An OData filter expression that describes a subset of connectedRegistries to + return. The parameters that can be filtered are parent.id (the resource id of the + connectedRegistry parent), mode, and connectionState. The supported operator is eq. Default + value is None. + :paramtype filter: str + :return: An iterator like instance of ConnectedRegistry + :rtype: + ~azure.core.paging.ItemPaged[~container_registry_management_client.models.ConnectedRegistry] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models._models.ConnectedRegistryListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_connected_registries_list_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + subscription_id=self._config.subscription_id, + filter=filter, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + + return _request + + def extract_data(pipeline_response): + deserialized = self._deserialize( + _models._models.ConnectedRegistryListResult, pipeline_response # pylint: disable=protected-access + ) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def get( + self, resource_group_name: str, registry_name: str, connected_registry_name: str, **kwargs: Any + ) -> _models.ConnectedRegistry: + """Gets the properties of the connected registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param connected_registry_name: The name of the connected registry. Required. + :type connected_registry_name: str + :return: ConnectedRegistry + :rtype: ~container_registry_management_client.models.ConnectedRegistry + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ConnectedRegistry] = kwargs.pop("cls", None) + + _request = build_connected_registries_get_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + connected_registry_name=connected_registry_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("ConnectedRegistry", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, + resource_group_name: str, + registry_name: str, + connected_registry_name: str, + connected_registry_create_parameters: Union[_models.ConnectedRegistry, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(connected_registry_create_parameters, (IOBase, bytes)): + _content = connected_registry_create_parameters + else: + _json = self._serialize.body(connected_registry_create_parameters, "ConnectedRegistry") + + _request = build_connected_registries_create_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + connected_registry_name=connected_registry_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + registry_name: str, + connected_registry_name: str, + connected_registry_create_parameters: _models.ConnectedRegistry, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ConnectedRegistry]: + """Creates a connected registry for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param connected_registry_name: The name of the connected registry. Required. + :type connected_registry_name: str + :param connected_registry_create_parameters: The parameters for creating a connectedRegistry. + Required. + :type connected_registry_create_parameters: + ~container_registry_management_client.models.ConnectedRegistry + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ConnectedRegistry + :rtype: + ~azure.core.polling.LROPoller[~container_registry_management_client.models.ConnectedRegistry] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + registry_name: str, + connected_registry_name: str, + connected_registry_create_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ConnectedRegistry]: + """Creates a connected registry for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param connected_registry_name: The name of the connected registry. Required. + :type connected_registry_name: str + :param connected_registry_create_parameters: The parameters for creating a connectedRegistry. + Required. + :type connected_registry_create_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ConnectedRegistry + :rtype: + ~azure.core.polling.LROPoller[~container_registry_management_client.models.ConnectedRegistry] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create( + self, + resource_group_name: str, + registry_name: str, + connected_registry_name: str, + connected_registry_create_parameters: Union[_models.ConnectedRegistry, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.ConnectedRegistry]: + """Creates a connected registry for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param connected_registry_name: The name of the connected registry. Required. + :type connected_registry_name: str + :param connected_registry_create_parameters: The parameters for creating a connectedRegistry. + Is either a ConnectedRegistry type or a IO[bytes] type. Required. + :type connected_registry_create_parameters: + ~container_registry_management_client.models.ConnectedRegistry or IO[bytes] + :return: An instance of LROPoller that returns ConnectedRegistry + :rtype: + ~azure.core.polling.LROPoller[~container_registry_management_client.models.ConnectedRegistry] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ConnectedRegistry] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + connected_registry_name=connected_registry_name, + connected_registry_create_parameters=connected_registry_create_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("ConnectedRegistry", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, + LROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ConnectedRegistry].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ConnectedRegistry]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + registry_name: str, + connected_registry_name: str, + connected_registry_update_parameters: Union[_models.ConnectedRegistryUpdateParameters, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(connected_registry_update_parameters, (IOBase, bytes)): + _content = connected_registry_update_parameters + else: + _json = self._serialize.body(connected_registry_update_parameters, "ConnectedRegistryUpdateParameters") + + _request = build_connected_registries_update_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + connected_registry_name=connected_registry_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + registry_name: str, + connected_registry_name: str, + connected_registry_update_parameters: _models.ConnectedRegistryUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ConnectedRegistry]: + """Updates a connected registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param connected_registry_name: The name of the connected registry. Required. + :type connected_registry_name: str + :param connected_registry_update_parameters: The parameters for updating a connectedRegistry. + Required. + :type connected_registry_update_parameters: + ~container_registry_management_client.models.ConnectedRegistryUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ConnectedRegistry + :rtype: + ~azure.core.polling.LROPoller[~container_registry_management_client.models.ConnectedRegistry] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + registry_name: str, + connected_registry_name: str, + connected_registry_update_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ConnectedRegistry]: + """Updates a connected registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param connected_registry_name: The name of the connected registry. Required. + :type connected_registry_name: str + :param connected_registry_update_parameters: The parameters for updating a connectedRegistry. + Required. + :type connected_registry_update_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ConnectedRegistry + :rtype: + ~azure.core.polling.LROPoller[~container_registry_management_client.models.ConnectedRegistry] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + registry_name: str, + connected_registry_name: str, + connected_registry_update_parameters: Union[_models.ConnectedRegistryUpdateParameters, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.ConnectedRegistry]: + """Updates a connected registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param connected_registry_name: The name of the connected registry. Required. + :type connected_registry_name: str + :param connected_registry_update_parameters: The parameters for updating a connectedRegistry. + Is either a ConnectedRegistryUpdateParameters type or a IO[bytes] type. Required. + :type connected_registry_update_parameters: + ~container_registry_management_client.models.ConnectedRegistryUpdateParameters or IO[bytes] + :return: An instance of LROPoller that returns ConnectedRegistry + :rtype: + ~azure.core.polling.LROPoller[~container_registry_management_client.models.ConnectedRegistry] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ConnectedRegistry] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + connected_registry_name=connected_registry_name, + connected_registry_update_parameters=connected_registry_update_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("ConnectedRegistry", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, + LROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ConnectedRegistry].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ConnectedRegistry]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, resource_group_name: str, registry_name: str, connected_registry_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_connected_registries_delete_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + connected_registry_name=connected_registry_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, resource_group_name: str, registry_name: str, connected_registry_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes a connected registry from a container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param connected_registry_name: The name of the connected registry. Required. + :type connected_registry_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + connected_registry_name=connected_registry_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, LROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + def _deactivate_initial( + self, resource_group_name: str, registry_name: str, connected_registry_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_connected_registries_deactivate_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + connected_registry_name=connected_registry_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_deactivate( + self, resource_group_name: str, registry_name: str, connected_registry_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deactivates the connected registry instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param connected_registry_name: The name of the connected registry. Required. + :type connected_registry_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._deactivate_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + connected_registry_name=connected_registry_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, LROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def resync( + self, resource_group_name: str, registry_name: str, connected_registry_name: str, **kwargs: Any + ) -> _models.ConnectedRegistry: + """Resync the connected registry instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param connected_registry_name: The name of the connected registry. Required. + :type connected_registry_name: str + :return: ConnectedRegistry + :rtype: ~container_registry_management_client.models.ConnectedRegistry + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ConnectedRegistry] = kwargs.pop("cls", None) + + _request = build_connected_registries_resync_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + connected_registry_name=connected_registry_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("ConnectedRegistry", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class CredentialSetsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~container_registry_management_client.ContainerRegistryManagementClient`'s + :attr:`credential_sets` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerRegistryManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> ItemPaged["_models.CredentialSet"]: + """Lists all credential set resources for the specified container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :return: An iterator like instance of CredentialSet + :rtype: + ~azure.core.paging.ItemPaged[~container_registry_management_client.models.CredentialSet] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models._models.CredentialSetListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_credential_sets_list_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + + return _request + + def extract_data(pipeline_response): + deserialized = self._deserialize( + _models._models.CredentialSetListResult, pipeline_response # pylint: disable=protected-access + ) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def get( + self, resource_group_name: str, registry_name: str, credential_set_name: str, **kwargs: Any + ) -> _models.CredentialSet: + """Gets the properties of the specified credential set resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param credential_set_name: The name of the credential set. Required. + :type credential_set_name: str + :return: CredentialSet + :rtype: ~container_registry_management_client.models.CredentialSet + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.CredentialSet] = kwargs.pop("cls", None) + + _request = build_credential_sets_get_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + credential_set_name=credential_set_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("CredentialSet", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, + resource_group_name: str, + registry_name: str, + credential_set_name: str, + credential_set_create_parameters: Union[_models.CredentialSet, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(credential_set_create_parameters, (IOBase, bytes)): + _content = credential_set_create_parameters + else: + _json = self._serialize.body(credential_set_create_parameters, "CredentialSet") + + _request = build_credential_sets_create_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + credential_set_name=credential_set_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + registry_name: str, + credential_set_name: str, + credential_set_create_parameters: _models.CredentialSet, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CredentialSet]: + """Creates a credential set for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param credential_set_name: The name of the credential set. Required. + :type credential_set_name: str + :param credential_set_create_parameters: The parameters for creating a credential set. + Required. + :type credential_set_create_parameters: + ~container_registry_management_client.models.CredentialSet + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns CredentialSet + :rtype: + ~azure.core.polling.LROPoller[~container_registry_management_client.models.CredentialSet] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + registry_name: str, + credential_set_name: str, + credential_set_create_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CredentialSet]: + """Creates a credential set for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param credential_set_name: The name of the credential set. Required. + :type credential_set_name: str + :param credential_set_create_parameters: The parameters for creating a credential set. + Required. + :type credential_set_create_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns CredentialSet + :rtype: + ~azure.core.polling.LROPoller[~container_registry_management_client.models.CredentialSet] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create( + self, + resource_group_name: str, + registry_name: str, + credential_set_name: str, + credential_set_create_parameters: Union[_models.CredentialSet, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.CredentialSet]: + """Creates a credential set for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param credential_set_name: The name of the credential set. Required. + :type credential_set_name: str + :param credential_set_create_parameters: The parameters for creating a credential set. Is + either a CredentialSet type or a IO[bytes] type. Required. + :type credential_set_create_parameters: + ~container_registry_management_client.models.CredentialSet or IO[bytes] + :return: An instance of LROPoller that returns CredentialSet + :rtype: + ~azure.core.polling.LROPoller[~container_registry_management_client.models.CredentialSet] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CredentialSet] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + credential_set_name=credential_set_name, + credential_set_create_parameters=credential_set_create_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("CredentialSet", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, + LROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.CredentialSet].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.CredentialSet]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + registry_name: str, + credential_set_name: str, + credential_set_update_parameters: Union[_models.CredentialSetUpdateParameters, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(credential_set_update_parameters, (IOBase, bytes)): + _content = credential_set_update_parameters + else: + _json = self._serialize.body(credential_set_update_parameters, "CredentialSetUpdateParameters") + + _request = build_credential_sets_update_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + credential_set_name=credential_set_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + registry_name: str, + credential_set_name: str, + credential_set_update_parameters: _models.CredentialSetUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CredentialSet]: + """Updates a credential set for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param credential_set_name: The name of the credential set. Required. + :type credential_set_name: str + :param credential_set_update_parameters: The parameters for updating a credential set. + Required. + :type credential_set_update_parameters: + ~container_registry_management_client.models.CredentialSetUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns CredentialSet + :rtype: + ~azure.core.polling.LROPoller[~container_registry_management_client.models.CredentialSet] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + registry_name: str, + credential_set_name: str, + credential_set_update_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CredentialSet]: + """Updates a credential set for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param credential_set_name: The name of the credential set. Required. + :type credential_set_name: str + :param credential_set_update_parameters: The parameters for updating a credential set. + Required. + :type credential_set_update_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns CredentialSet + :rtype: + ~azure.core.polling.LROPoller[~container_registry_management_client.models.CredentialSet] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + registry_name: str, + credential_set_name: str, + credential_set_update_parameters: Union[_models.CredentialSetUpdateParameters, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.CredentialSet]: + """Updates a credential set for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param credential_set_name: The name of the credential set. Required. + :type credential_set_name: str + :param credential_set_update_parameters: The parameters for updating a credential set. Is + either a CredentialSetUpdateParameters type or a IO[bytes] type. Required. + :type credential_set_update_parameters: + ~container_registry_management_client.models.CredentialSetUpdateParameters or IO[bytes] + :return: An instance of LROPoller that returns CredentialSet + :rtype: + ~azure.core.polling.LROPoller[~container_registry_management_client.models.CredentialSet] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CredentialSet] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + credential_set_name=credential_set_name, + credential_set_update_parameters=credential_set_update_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("CredentialSet", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, + LROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.CredentialSet].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.CredentialSet]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, resource_group_name: str, registry_name: str, credential_set_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_credential_sets_delete_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + credential_set_name=credential_set_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, resource_group_name: str, registry_name: str, credential_set_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes a credential set from a container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param credential_set_name: The name of the credential set. Required. + :type credential_set_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + credential_set_name=credential_set_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, LROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + +class ExportPipelinesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~container_registry_management_client.ContainerRegistryManagementClient`'s + :attr:`export_pipelines` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerRegistryManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> ItemPaged["_models.ExportPipeline"]: + """Lists all export pipelines for the specified container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :return: An iterator like instance of ExportPipeline + :rtype: + ~azure.core.paging.ItemPaged[~container_registry_management_client.models.ExportPipeline] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models._models.ExportPipelineListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_export_pipelines_list_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + + return _request + + def extract_data(pipeline_response): + deserialized = self._deserialize( + _models._models.ExportPipelineListResult, pipeline_response # pylint: disable=protected-access + ) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def get( + self, resource_group_name: str, registry_name: str, export_pipeline_name: str, **kwargs: Any + ) -> _models.ExportPipeline: + """Gets the properties of the export pipeline. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param export_pipeline_name: The name of the export pipeline. Required. + :type export_pipeline_name: str + :return: ExportPipeline + :rtype: ~container_registry_management_client.models.ExportPipeline + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ExportPipeline] = kwargs.pop("cls", None) + + _request = build_export_pipelines_get_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + export_pipeline_name=export_pipeline_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("ExportPipeline", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, + resource_group_name: str, + registry_name: str, + export_pipeline_name: str, + export_pipeline_create_parameters: Union[_models.ExportPipeline, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(export_pipeline_create_parameters, (IOBase, bytes)): + _content = export_pipeline_create_parameters + else: + _json = self._serialize.body(export_pipeline_create_parameters, "ExportPipeline") + + _request = build_export_pipelines_create_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + export_pipeline_name=export_pipeline_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + registry_name: str, + export_pipeline_name: str, + export_pipeline_create_parameters: _models.ExportPipeline, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ExportPipeline]: + """Creates an export pipeline for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param export_pipeline_name: The name of the export pipeline. Required. + :type export_pipeline_name: str + :param export_pipeline_create_parameters: The parameters for creating an export pipeline. + Required. + :type export_pipeline_create_parameters: + ~container_registry_management_client.models.ExportPipeline + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ExportPipeline + :rtype: + ~azure.core.polling.LROPoller[~container_registry_management_client.models.ExportPipeline] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + registry_name: str, + export_pipeline_name: str, + export_pipeline_create_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ExportPipeline]: + """Creates an export pipeline for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param export_pipeline_name: The name of the export pipeline. Required. + :type export_pipeline_name: str + :param export_pipeline_create_parameters: The parameters for creating an export pipeline. + Required. + :type export_pipeline_create_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ExportPipeline + :rtype: + ~azure.core.polling.LROPoller[~container_registry_management_client.models.ExportPipeline] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create( + self, + resource_group_name: str, + registry_name: str, + export_pipeline_name: str, + export_pipeline_create_parameters: Union[_models.ExportPipeline, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.ExportPipeline]: + """Creates an export pipeline for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param export_pipeline_name: The name of the export pipeline. Required. + :type export_pipeline_name: str + :param export_pipeline_create_parameters: The parameters for creating an export pipeline. Is + either a ExportPipeline type or a IO[bytes] type. Required. + :type export_pipeline_create_parameters: + ~container_registry_management_client.models.ExportPipeline or IO[bytes] + :return: An instance of LROPoller that returns ExportPipeline + :rtype: + ~azure.core.polling.LROPoller[~container_registry_management_client.models.ExportPipeline] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ExportPipeline] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + export_pipeline_name=export_pipeline_name, + export_pipeline_create_parameters=export_pipeline_create_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("ExportPipeline", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, + LROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ExportPipeline].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ExportPipeline]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, resource_group_name: str, registry_name: str, export_pipeline_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_export_pipelines_delete_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + export_pipeline_name=export_pipeline_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, resource_group_name: str, registry_name: str, export_pipeline_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes an export pipeline from a container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param export_pipeline_name: The name of the export pipeline. Required. + :type export_pipeline_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + export_pipeline_name=export_pipeline_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, LROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + +class ImportPipelinesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~container_registry_management_client.ContainerRegistryManagementClient`'s + :attr:`import_pipelines` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerRegistryManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> ItemPaged["_models.ImportPipeline"]: + """Lists all import pipelines for the specified container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :return: An iterator like instance of ImportPipeline + :rtype: + ~azure.core.paging.ItemPaged[~container_registry_management_client.models.ImportPipeline] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models._models.ImportPipelineListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_import_pipelines_list_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + + return _request + + def extract_data(pipeline_response): + deserialized = self._deserialize( + _models._models.ImportPipelineListResult, pipeline_response # pylint: disable=protected-access + ) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def get( + self, resource_group_name: str, registry_name: str, import_pipeline_name: str, **kwargs: Any + ) -> _models.ImportPipeline: + """Gets the properties of the import pipeline. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param import_pipeline_name: The name of the import pipeline. Required. + :type import_pipeline_name: str + :return: ImportPipeline + :rtype: ~container_registry_management_client.models.ImportPipeline + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ImportPipeline] = kwargs.pop("cls", None) + + _request = build_import_pipelines_get_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + import_pipeline_name=import_pipeline_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("ImportPipeline", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, + resource_group_name: str, + registry_name: str, + import_pipeline_name: str, + import_pipeline_create_parameters: Union[_models.ImportPipeline, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(import_pipeline_create_parameters, (IOBase, bytes)): + _content = import_pipeline_create_parameters + else: + _json = self._serialize.body(import_pipeline_create_parameters, "ImportPipeline") + + _request = build_import_pipelines_create_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + import_pipeline_name=import_pipeline_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + registry_name: str, + import_pipeline_name: str, + import_pipeline_create_parameters: _models.ImportPipeline, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ImportPipeline]: + """Creates an import pipeline for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param import_pipeline_name: The name of the import pipeline. Required. + :type import_pipeline_name: str + :param import_pipeline_create_parameters: The parameters for creating an import pipeline. + Required. + :type import_pipeline_create_parameters: + ~container_registry_management_client.models.ImportPipeline + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ImportPipeline + :rtype: + ~azure.core.polling.LROPoller[~container_registry_management_client.models.ImportPipeline] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + registry_name: str, + import_pipeline_name: str, + import_pipeline_create_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ImportPipeline]: + """Creates an import pipeline for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param import_pipeline_name: The name of the import pipeline. Required. + :type import_pipeline_name: str + :param import_pipeline_create_parameters: The parameters for creating an import pipeline. + Required. + :type import_pipeline_create_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ImportPipeline + :rtype: + ~azure.core.polling.LROPoller[~container_registry_management_client.models.ImportPipeline] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create( + self, + resource_group_name: str, + registry_name: str, + import_pipeline_name: str, + import_pipeline_create_parameters: Union[_models.ImportPipeline, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.ImportPipeline]: + """Creates an import pipeline for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param import_pipeline_name: The name of the import pipeline. Required. + :type import_pipeline_name: str + :param import_pipeline_create_parameters: The parameters for creating an import pipeline. Is + either a ImportPipeline type or a IO[bytes] type. Required. + :type import_pipeline_create_parameters: + ~container_registry_management_client.models.ImportPipeline or IO[bytes] + :return: An instance of LROPoller that returns ImportPipeline + :rtype: + ~azure.core.polling.LROPoller[~container_registry_management_client.models.ImportPipeline] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ImportPipeline] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + import_pipeline_name=import_pipeline_name, + import_pipeline_create_parameters=import_pipeline_create_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("ImportPipeline", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, + LROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ImportPipeline].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ImportPipeline]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, resource_group_name: str, registry_name: str, import_pipeline_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_import_pipelines_delete_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + import_pipeline_name=import_pipeline_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, resource_group_name: str, registry_name: str, import_pipeline_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes an import pipeline from a container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param import_pipeline_name: The name of the import pipeline. Required. + :type import_pipeline_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + import_pipeline_name=import_pipeline_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, LROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + +class ArchivesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~container_registry_management_client.ContainerRegistryManagementClient`'s + :attr:`archives` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerRegistryManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, resource_group_name: str, registry_name: str, package_type: str, **kwargs: Any + ) -> ItemPaged["_models.Archive"]: + """Lists all archives for the specified container registry and package type. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param package_type: The package type. Required. + :type package_type: str + :return: An iterator like instance of Archive + :rtype: ~azure.core.paging.ItemPaged[~container_registry_management_client.models.Archive] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models._models.ArchiveListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_archives_list_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + package_type=package_type, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + + return _request + + def extract_data(pipeline_response): + deserialized = self._deserialize( + _models._models.ArchiveListResult, pipeline_response # pylint: disable=protected-access + ) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def get( + self, resource_group_name: str, registry_name: str, package_type: str, archive_name: str, **kwargs: Any + ) -> _models.Archive: + """Gets the properties of the archive. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param package_type: The package type. Required. + :type package_type: str + :param archive_name: The name of the archive resource. Required. + :type archive_name: str + :return: Archive + :rtype: ~container_registry_management_client.models.Archive + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Archive] = kwargs.pop("cls", None) + + _request = build_archives_get_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + package_type=package_type, + archive_name=archive_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("Archive", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, + resource_group_name: str, + registry_name: str, + package_type: str, + archive_name: str, + archive_create_parameters: Union[_models.Archive, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(archive_create_parameters, (IOBase, bytes)): + _content = archive_create_parameters + else: + _json = self._serialize.body(archive_create_parameters, "Archive") + + _request = build_archives_create_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + package_type=package_type, + archive_name=archive_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + registry_name: str, + package_type: str, + archive_name: str, + archive_create_parameters: _models.Archive, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Archive]: + """Creates a archive for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param package_type: The package type. Required. + :type package_type: str + :param archive_name: The name of the archive resource. Required. + :type archive_name: str + :param archive_create_parameters: The parameters for creating a archive. Required. + :type archive_create_parameters: ~container_registry_management_client.models.Archive + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Archive + :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Archive] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + registry_name: str, + package_type: str, + archive_name: str, + archive_create_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Archive]: + """Creates a archive for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param package_type: The package type. Required. + :type package_type: str + :param archive_name: The name of the archive resource. Required. + :type archive_name: str + :param archive_create_parameters: The parameters for creating a archive. Required. + :type archive_create_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Archive + :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Archive] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create( + self, + resource_group_name: str, + registry_name: str, + package_type: str, + archive_name: str, + archive_create_parameters: Union[_models.Archive, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.Archive]: + """Creates a archive for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param package_type: The package type. Required. + :type package_type: str + :param archive_name: The name of the archive resource. Required. + :type archive_name: str + :param archive_create_parameters: The parameters for creating a archive. Is either a Archive + type or a IO[bytes] type. Required. + :type archive_create_parameters: ~container_registry_management_client.models.Archive or + IO[bytes] + :return: An instance of LROPoller that returns Archive + :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Archive] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Archive] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + package_type=package_type, + archive_name=archive_name, + archive_create_parameters=archive_create_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("Archive", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, + LROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.Archive].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.Archive]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @overload + def update( + self, + resource_group_name: str, + registry_name: str, + package_type: str, + archive_name: str, + archive_update_parameters: _models.ArchiveUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Archive: + """Updates a archive for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param package_type: The package type. Required. + :type package_type: str + :param archive_name: The name of the archive resource. Required. + :type archive_name: str + :param archive_update_parameters: The parameters for updating a archive. Required. + :type archive_update_parameters: + ~container_registry_management_client.models.ArchiveUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: Archive + :rtype: ~container_registry_management_client.models.Archive + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + registry_name: str, + package_type: str, + archive_name: str, + archive_update_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Archive: + """Updates a archive for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param package_type: The package type. Required. + :type package_type: str + :param archive_name: The name of the archive resource. Required. + :type archive_name: str + :param archive_update_parameters: The parameters for updating a archive. Required. + :type archive_update_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: Archive + :rtype: ~container_registry_management_client.models.Archive + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + registry_name: str, + package_type: str, + archive_name: str, + archive_update_parameters: Union[_models.ArchiveUpdateParameters, IO[bytes]], + **kwargs: Any + ) -> _models.Archive: + """Updates a archive for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param package_type: The package type. Required. + :type package_type: str + :param archive_name: The name of the archive resource. Required. + :type archive_name: str + :param archive_update_parameters: The parameters for updating a archive. Is either a + ArchiveUpdateParameters type or a IO[bytes] type. Required. + :type archive_update_parameters: + ~container_registry_management_client.models.ArchiveUpdateParameters or IO[bytes] + :return: Archive + :rtype: ~container_registry_management_client.models.Archive + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Archive] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(archive_update_parameters, (IOBase, bytes)): + _content = archive_update_parameters + else: + _json = self._serialize.body(archive_update_parameters, "ArchiveUpdateParameters") + + _request = build_archives_update_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + package_type=package_type, + archive_name=archive_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("Archive", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _delete_initial( + self, resource_group_name: str, registry_name: str, package_type: str, archive_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_archives_delete_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + package_type=package_type, + archive_name=archive_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, resource_group_name: str, registry_name: str, package_type: str, archive_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes a archive from a container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param package_type: The package type. Required. + :type package_type: str + :param archive_name: The name of the archive resource. Required. + :type archive_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + package_type=package_type, + archive_name=archive_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, LROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + +class ArchiveVersionsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~container_registry_management_client.ContainerRegistryManagementClient`'s + :attr:`archive_versions` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerRegistryManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, resource_group_name: str, registry_name: str, package_type: str, archive_name: str, **kwargs: Any + ) -> ItemPaged["_models.ArchiveVersion"]: + """Lists all archive versions for the specified container registry, repository type and archive + name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param package_type: The package type. Required. + :type package_type: str + :param archive_name: The name of the archive resource. Required. + :type archive_name: str + :return: An iterator like instance of ArchiveVersion + :rtype: + ~azure.core.paging.ItemPaged[~container_registry_management_client.models.ArchiveVersion] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models._models.ArchiveVersionListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_archive_versions_list_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + package_type=package_type, + archive_name=archive_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + + return _request + + def extract_data(pipeline_response): + deserialized = self._deserialize( + _models._models.ArchiveVersionListResult, pipeline_response # pylint: disable=protected-access + ) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def get( + self, + resource_group_name: str, + registry_name: str, + package_type: str, + archive_name: str, + archive_version_name: str, + **kwargs: Any + ) -> _models.ArchiveVersion: + """Gets the properties of the archive version. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param package_type: The package type. Required. + :type package_type: str + :param archive_name: The name of the archive resource. Required. + :type archive_name: str + :param archive_version_name: The name of the archive version resource. Required. + :type archive_version_name: str + :return: ArchiveVersion + :rtype: ~container_registry_management_client.models.ArchiveVersion + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ArchiveVersion] = kwargs.pop("cls", None) + + _request = build_archive_versions_get_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + package_type=package_type, + archive_name=archive_name, + archive_version_name=archive_version_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("ArchiveVersion", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, + resource_group_name: str, + registry_name: str, + package_type: str, + archive_name: str, + archive_version_name: str, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_archive_versions_create_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + package_type=package_type, + archive_name=archive_name, + archive_version_name=archive_version_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_create( + self, + resource_group_name: str, + registry_name: str, + package_type: str, + archive_name: str, + archive_version_name: str, + **kwargs: Any + ) -> LROPoller[_models.ArchiveVersion]: + """Creates a archive version for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param package_type: The package type. Required. + :type package_type: str + :param archive_name: The name of the archive resource. Required. + :type archive_name: str + :param archive_version_name: The name of the archive version resource. Required. + :type archive_version_name: str + :return: An instance of LROPoller that returns ArchiveVersion + :rtype: + ~azure.core.polling.LROPoller[~container_registry_management_client.models.ArchiveVersion] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ArchiveVersion] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + package_type=package_type, + archive_name=archive_name, + archive_version_name=archive_version_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("ArchiveVersion", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, + LROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ArchiveVersion].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ArchiveVersion]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, + resource_group_name: str, + registry_name: str, + package_type: str, + archive_name: str, + archive_version_name: str, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_archive_versions_delete_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + package_type=package_type, + archive_name=archive_name, + archive_version_name=archive_version_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, + resource_group_name: str, + registry_name: str, + package_type: str, + archive_name: str, + archive_version_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes a archive version from a container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param package_type: The package type. Required. + :type package_type: str + :param archive_name: The name of the archive resource. Required. + :type archive_name: str + :param archive_version_name: The name of the archive version resource. Required. + :type archive_version_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + package_type=package_type, + archive_name=archive_name, + archive_version_name=archive_version_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, LROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + +class PipelineRunsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~container_registry_management_client.ContainerRegistryManagementClient`'s + :attr:`pipeline_runs` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerRegistryManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> ItemPaged["_models.PipelineRun"]: + """Lists all the pipeline runs for the specified container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :return: An iterator like instance of PipelineRun + :rtype: ~azure.core.paging.ItemPaged[~container_registry_management_client.models.PipelineRun] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models._models.PipelineRunListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_pipeline_runs_list_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + + return _request + + def extract_data(pipeline_response): + deserialized = self._deserialize( + _models._models.PipelineRunListResult, pipeline_response # pylint: disable=protected-access + ) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def get( + self, resource_group_name: str, registry_name: str, pipeline_run_name: str, **kwargs: Any + ) -> _models.PipelineRun: + """Gets the detailed information for a given pipeline run. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param pipeline_run_name: The name of the pipeline run. Required. + :type pipeline_run_name: str + :return: PipelineRun + :rtype: ~container_registry_management_client.models.PipelineRun + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PipelineRun] = kwargs.pop("cls", None) + + _request = build_pipeline_runs_get_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + pipeline_run_name=pipeline_run_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("PipelineRun", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, + resource_group_name: str, + registry_name: str, + pipeline_run_name: str, + pipeline_run_create_parameters: Union[_models.PipelineRun, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(pipeline_run_create_parameters, (IOBase, bytes)): + _content = pipeline_run_create_parameters + else: + _json = self._serialize.body(pipeline_run_create_parameters, "PipelineRun") + + _request = build_pipeline_runs_create_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + pipeline_run_name=pipeline_run_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + registry_name: str, + pipeline_run_name: str, + pipeline_run_create_parameters: _models.PipelineRun, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.PipelineRun]: + """Creates a pipeline run for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param pipeline_run_name: The name of the pipeline run. Required. + :type pipeline_run_name: str + :param pipeline_run_create_parameters: The parameters for creating a pipeline run. Required. + :type pipeline_run_create_parameters: ~container_registry_management_client.models.PipelineRun + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns PipelineRun + :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.PipelineRun] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + registry_name: str, + pipeline_run_name: str, + pipeline_run_create_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.PipelineRun]: + """Creates a pipeline run for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param pipeline_run_name: The name of the pipeline run. Required. + :type pipeline_run_name: str + :param pipeline_run_create_parameters: The parameters for creating a pipeline run. Required. + :type pipeline_run_create_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns PipelineRun + :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.PipelineRun] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create( + self, + resource_group_name: str, + registry_name: str, + pipeline_run_name: str, + pipeline_run_create_parameters: Union[_models.PipelineRun, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.PipelineRun]: + """Creates a pipeline run for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param pipeline_run_name: The name of the pipeline run. Required. + :type pipeline_run_name: str + :param pipeline_run_create_parameters: The parameters for creating a pipeline run. Is either a + PipelineRun type or a IO[bytes] type. Required. + :type pipeline_run_create_parameters: ~container_registry_management_client.models.PipelineRun + or IO[bytes] + :return: An instance of LROPoller that returns PipelineRun + :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.PipelineRun] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PipelineRun] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + pipeline_run_name=pipeline_run_name, + pipeline_run_create_parameters=pipeline_run_create_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("PipelineRun", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, + LROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.PipelineRun].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.PipelineRun]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, resource_group_name: str, registry_name: str, pipeline_run_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_pipeline_runs_delete_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + pipeline_run_name=pipeline_run_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, resource_group_name: str, registry_name: str, pipeline_run_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes a pipeline run from a container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param pipeline_run_name: The name of the pipeline run. Required. + :type pipeline_run_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + pipeline_run_name=pipeline_run_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, LROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + +class PrivateEndpointConnectionsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~container_registry_management_client.ContainerRegistryManagementClient`'s + :attr:`private_endpoint_connections` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerRegistryManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list( + self, resource_group_name: str, registry_name: str, **kwargs: Any + ) -> ItemPaged["_models.PrivateEndpointConnection"]: + """List all private endpoint connections in a container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :return: An iterator like instance of PrivateEndpointConnection + :rtype: + ~azure.core.paging.ItemPaged[~container_registry_management_client.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models._models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_private_endpoint_connections_list_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + + return _request + + def extract_data(pipeline_response): + deserialized = self._deserialize( + _models._models.PrivateEndpointConnectionListResult, # pylint: disable=protected-access + pipeline_response, + ) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def get( + self, resource_group_name: str, registry_name: str, private_endpoint_connection_name: str, **kwargs: Any + ) -> _models.PrivateEndpointConnection: + """Get the specified private endpoint connection associated with the container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :return: PrivateEndpointConnection + :rtype: ~container_registry_management_client.models.PrivateEndpointConnection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) + + _request = build_private_endpoint_connections_get_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + private_endpoint_connection_name=private_endpoint_connection_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_or_update_initial( + self, + resource_group_name: str, + registry_name: str, + private_endpoint_connection_name: str, + private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(private_endpoint_connection, (IOBase, bytes)): + _content = private_endpoint_connection + else: + _json = self._serialize.body(private_endpoint_connection, "PrivateEndpointConnection") + + _request = build_private_endpoint_connections_create_or_update_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + private_endpoint_connection_name=private_endpoint_connection_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + registry_name: str, + private_endpoint_connection_name: str, + private_endpoint_connection: _models.PrivateEndpointConnection, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.PrivateEndpointConnection]: + """Update the state of specified private endpoint connection associated with the container + registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :param private_endpoint_connection: The parameters for creating a private endpoint connection. + Required. + :type private_endpoint_connection: + ~container_registry_management_client.models.PrivateEndpointConnection + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns PrivateEndpointConnection + :rtype: + ~azure.core.polling.LROPoller[~container_registry_management_client.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + registry_name: str, + private_endpoint_connection_name: str, + private_endpoint_connection: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.PrivateEndpointConnection]: + """Update the state of specified private endpoint connection associated with the container + registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :param private_endpoint_connection: The parameters for creating a private endpoint connection. + Required. + :type private_endpoint_connection: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns PrivateEndpointConnection + :rtype: + ~azure.core.polling.LROPoller[~container_registry_management_client.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + registry_name: str, + private_endpoint_connection_name: str, + private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.PrivateEndpointConnection]: + """Update the state of specified private endpoint connection associated with the container + registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :param private_endpoint_connection: The parameters for creating a private endpoint connection. + Is either a PrivateEndpointConnection type or a IO[bytes] type. Required. + :type private_endpoint_connection: + ~container_registry_management_client.models.PrivateEndpointConnection or IO[bytes] + :return: An instance of LROPoller that returns PrivateEndpointConnection + :rtype: + ~azure.core.polling.LROPoller[~container_registry_management_client.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + private_endpoint_connection_name=private_endpoint_connection_name, + private_endpoint_connection=private_endpoint_connection, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, + LROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.PrivateEndpointConnection].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.PrivateEndpointConnection]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, resource_group_name: str, registry_name: str, private_endpoint_connection_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_private_endpoint_connections_delete_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + private_endpoint_connection_name=private_endpoint_connection_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, resource_group_name: str, registry_name: str, private_endpoint_connection_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified private endpoint connection associated with the container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + private_endpoint_connection_name=private_endpoint_connection_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, LROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + +class ReplicationsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~container_registry_management_client.ContainerRegistryManagementClient`'s + :attr:`replications` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerRegistryManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> ItemPaged["_models.Replication"]: + """Lists all the replications for the specified container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :return: An iterator like instance of Replication + :rtype: ~azure.core.paging.ItemPaged[~container_registry_management_client.models.Replication] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models._models.ReplicationListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_replications_list_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + + return _request + + def extract_data(pipeline_response): + deserialized = self._deserialize( + _models._models.ReplicationListResult, pipeline_response # pylint: disable=protected-access + ) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def get( + self, resource_group_name: str, registry_name: str, replication_name: str, **kwargs: Any + ) -> _models.Replication: + """Gets the properties of the specified replication. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param replication_name: The name of the replication. Required. + :type replication_name: str + :return: Replication + :rtype: ~container_registry_management_client.models.Replication + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Replication] = kwargs.pop("cls", None) + + _request = build_replications_get_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + replication_name=replication_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("Replication", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, + resource_group_name: str, + registry_name: str, + replication_name: str, + replication: Union[_models.Replication, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(replication, (IOBase, bytes)): + _content = replication + else: + _json = self._serialize.body(replication, "Replication") + + _request = build_replications_create_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + replication_name=replication_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + registry_name: str, + replication_name: str, + replication: _models.Replication, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Replication]: + """Creates a replication for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param replication_name: The name of the replication. Required. + :type replication_name: str + :param replication: The parameters for creating a replication. Required. + :type replication: ~container_registry_management_client.models.Replication + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Replication + :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Replication] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + registry_name: str, + replication_name: str, + replication: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Replication]: + """Creates a replication for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param replication_name: The name of the replication. Required. + :type replication_name: str + :param replication: The parameters for creating a replication. Required. + :type replication: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Replication + :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Replication] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create( + self, + resource_group_name: str, + registry_name: str, + replication_name: str, + replication: Union[_models.Replication, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.Replication]: + """Creates a replication for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param replication_name: The name of the replication. Required. + :type replication_name: str + :param replication: The parameters for creating a replication. Is either a Replication type or + a IO[bytes] type. Required. + :type replication: ~container_registry_management_client.models.Replication or IO[bytes] + :return: An instance of LROPoller that returns Replication + :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Replication] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Replication] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + replication_name=replication_name, + replication=replication, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("Replication", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, + LROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.Replication].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.Replication]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + registry_name: str, + replication_name: str, + replication_update_parameters: Union[_models.ReplicationUpdateParameters, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(replication_update_parameters, (IOBase, bytes)): + _content = replication_update_parameters + else: + _json = self._serialize.body(replication_update_parameters, "ReplicationUpdateParameters") + + _request = build_replications_update_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + replication_name=replication_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + registry_name: str, + replication_name: str, + replication_update_parameters: _models.ReplicationUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Replication]: + """Updates a replication for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param replication_name: The name of the replication. Required. + :type replication_name: str + :param replication_update_parameters: The parameters for updating a replication. Required. + :type replication_update_parameters: + ~container_registry_management_client.models.ReplicationUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Replication + :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Replication] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + registry_name: str, + replication_name: str, + replication_update_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Replication]: + """Updates a replication for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param replication_name: The name of the replication. Required. + :type replication_name: str + :param replication_update_parameters: The parameters for updating a replication. Required. + :type replication_update_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Replication + :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Replication] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + registry_name: str, + replication_name: str, + replication_update_parameters: Union[_models.ReplicationUpdateParameters, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.Replication]: + """Updates a replication for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param replication_name: The name of the replication. Required. + :type replication_name: str + :param replication_update_parameters: The parameters for updating a replication. Is either a + ReplicationUpdateParameters type or a IO[bytes] type. Required. + :type replication_update_parameters: + ~container_registry_management_client.models.ReplicationUpdateParameters or IO[bytes] + :return: An instance of LROPoller that returns Replication + :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Replication] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Replication] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + replication_name=replication_name, + replication_update_parameters=replication_update_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("Replication", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, + LROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.Replication].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.Replication]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, resource_group_name: str, registry_name: str, replication_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_replications_delete_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + replication_name=replication_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, resource_group_name: str, registry_name: str, replication_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes a replication from a container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param replication_name: The name of the replication. Required. + :type replication_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + replication_name=replication_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, LROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + +class ScopeMapsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~container_registry_management_client.ContainerRegistryManagementClient`'s + :attr:`scope_maps` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerRegistryManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> ItemPaged["_models.ScopeMap"]: + """Lists all the scope maps for the specified container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :return: An iterator like instance of ScopeMap + :rtype: ~azure.core.paging.ItemPaged[~container_registry_management_client.models.ScopeMap] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models._models.ScopeMapListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_scope_maps_list_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + + return _request + + def extract_data(pipeline_response): + deserialized = self._deserialize( + _models._models.ScopeMapListResult, pipeline_response # pylint: disable=protected-access + ) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def get(self, resource_group_name: str, registry_name: str, scope_map_name: str, **kwargs: Any) -> _models.ScopeMap: + """Gets the properties of the specified scope map. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param scope_map_name: The name of the scope map. Required. + :type scope_map_name: str + :return: ScopeMap + :rtype: ~container_registry_management_client.models.ScopeMap + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ScopeMap] = kwargs.pop("cls", None) + + _request = build_scope_maps_get_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + scope_map_name=scope_map_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("ScopeMap", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, + resource_group_name: str, + registry_name: str, + scope_map_name: str, + scope_map_create_parameters: Union[_models.ScopeMap, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(scope_map_create_parameters, (IOBase, bytes)): + _content = scope_map_create_parameters + else: + _json = self._serialize.body(scope_map_create_parameters, "ScopeMap") + + _request = build_scope_maps_create_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + scope_map_name=scope_map_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + registry_name: str, + scope_map_name: str, + scope_map_create_parameters: _models.ScopeMap, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ScopeMap]: + """Creates a scope map for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param scope_map_name: The name of the scope map. Required. + :type scope_map_name: str + :param scope_map_create_parameters: The parameters for creating a scope map. Required. + :type scope_map_create_parameters: ~container_registry_management_client.models.ScopeMap + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ScopeMap + :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.ScopeMap] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + registry_name: str, + scope_map_name: str, + scope_map_create_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ScopeMap]: + """Creates a scope map for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param scope_map_name: The name of the scope map. Required. + :type scope_map_name: str + :param scope_map_create_parameters: The parameters for creating a scope map. Required. + :type scope_map_create_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ScopeMap + :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.ScopeMap] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create( + self, + resource_group_name: str, + registry_name: str, + scope_map_name: str, + scope_map_create_parameters: Union[_models.ScopeMap, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.ScopeMap]: + """Creates a scope map for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param scope_map_name: The name of the scope map. Required. + :type scope_map_name: str + :param scope_map_create_parameters: The parameters for creating a scope map. Is either a + ScopeMap type or a IO[bytes] type. Required. + :type scope_map_create_parameters: ~container_registry_management_client.models.ScopeMap or + IO[bytes] + :return: An instance of LROPoller that returns ScopeMap + :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.ScopeMap] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ScopeMap] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + scope_map_name=scope_map_name, + scope_map_create_parameters=scope_map_create_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("ScopeMap", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, + LROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ScopeMap].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ScopeMap]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + registry_name: str, + scope_map_name: str, + scope_map_update_parameters: Union[_models.ScopeMapUpdateParameters, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(scope_map_update_parameters, (IOBase, bytes)): + _content = scope_map_update_parameters + else: + _json = self._serialize.body(scope_map_update_parameters, "ScopeMapUpdateParameters") + + _request = build_scope_maps_update_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + scope_map_name=scope_map_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + registry_name: str, + scope_map_name: str, + scope_map_update_parameters: _models.ScopeMapUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ScopeMap]: + """Updates a scope map with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param scope_map_name: The name of the scope map. Required. + :type scope_map_name: str + :param scope_map_update_parameters: The parameters for updating a scope map. Required. + :type scope_map_update_parameters: + ~container_registry_management_client.models.ScopeMapUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ScopeMap + :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.ScopeMap] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + registry_name: str, + scope_map_name: str, + scope_map_update_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ScopeMap]: + """Updates a scope map with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param scope_map_name: The name of the scope map. Required. + :type scope_map_name: str + :param scope_map_update_parameters: The parameters for updating a scope map. Required. + :type scope_map_update_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ScopeMap + :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.ScopeMap] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + registry_name: str, + scope_map_name: str, + scope_map_update_parameters: Union[_models.ScopeMapUpdateParameters, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.ScopeMap]: + """Updates a scope map with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param scope_map_name: The name of the scope map. Required. + :type scope_map_name: str + :param scope_map_update_parameters: The parameters for updating a scope map. Is either a + ScopeMapUpdateParameters type or a IO[bytes] type. Required. + :type scope_map_update_parameters: + ~container_registry_management_client.models.ScopeMapUpdateParameters or IO[bytes] + :return: An instance of LROPoller that returns ScopeMap + :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.ScopeMap] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ScopeMap] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + scope_map_name=scope_map_name, + scope_map_update_parameters=scope_map_update_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("ScopeMap", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, + LROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ScopeMap].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ScopeMap]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, resource_group_name: str, registry_name: str, scope_map_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_scope_maps_delete_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + scope_map_name=scope_map_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, resource_group_name: str, registry_name: str, scope_map_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes a scope map from a container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param scope_map_name: The name of the scope map. Required. + :type scope_map_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + scope_map_name=scope_map_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, LROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + +class TokensOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~container_registry_management_client.ContainerRegistryManagementClient`'s + :attr:`tokens` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerRegistryManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> ItemPaged["_models.Token"]: + """Lists all the tokens for the specified container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :return: An iterator like instance of Token + :rtype: ~azure.core.paging.ItemPaged[~container_registry_management_client.models.Token] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models._models.TokenListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_tokens_list_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + + return _request + + def extract_data(pipeline_response): + deserialized = self._deserialize( + _models._models.TokenListResult, pipeline_response # pylint: disable=protected-access + ) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def get(self, resource_group_name: str, registry_name: str, token_name: str, **kwargs: Any) -> _models.Token: + """Gets the properties of the specified token. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param token_name: The name of the token. Required. + :type token_name: str + :return: Token + :rtype: ~container_registry_management_client.models.Token + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Token] = kwargs.pop("cls", None) + + _request = build_tokens_get_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + token_name=token_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("Token", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, + resource_group_name: str, + registry_name: str, + token_name: str, + token_create_parameters: Union[_models.Token, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(token_create_parameters, (IOBase, bytes)): + _content = token_create_parameters + else: + _json = self._serialize.body(token_create_parameters, "Token") + + _request = build_tokens_create_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + token_name=token_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + registry_name: str, + token_name: str, + token_create_parameters: _models.Token, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Token]: + """Creates a token for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param token_name: The name of the token. Required. + :type token_name: str + :param token_create_parameters: The parameters for creating a token. Required. + :type token_create_parameters: ~container_registry_management_client.models.Token + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Token + :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Token] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + registry_name: str, + token_name: str, + token_create_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Token]: + """Creates a token for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param token_name: The name of the token. Required. + :type token_name: str + :param token_create_parameters: The parameters for creating a token. Required. + :type token_create_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Token + :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Token] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create( + self, + resource_group_name: str, + registry_name: str, + token_name: str, + token_create_parameters: Union[_models.Token, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.Token]: + """Creates a token for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param token_name: The name of the token. Required. + :type token_name: str + :param token_create_parameters: The parameters for creating a token. Is either a Token type or + a IO[bytes] type. Required. + :type token_create_parameters: ~container_registry_management_client.models.Token or IO[bytes] + :return: An instance of LROPoller that returns Token + :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Token] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Token] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + token_name=token_name, + token_create_parameters=token_create_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("Token", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, + LROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.Token].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.Token]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + registry_name: str, + token_name: str, + token_update_parameters: Union[_models.TokenUpdateParameters, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(token_update_parameters, (IOBase, bytes)): + _content = token_update_parameters + else: + _json = self._serialize.body(token_update_parameters, "TokenUpdateParameters") + + _request = build_tokens_update_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + token_name=token_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + registry_name: str, + token_name: str, + token_update_parameters: _models.TokenUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Token]: + """Updates a token with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param token_name: The name of the token. Required. + :type token_name: str + :param token_update_parameters: The parameters for updating a token. Required. + :type token_update_parameters: + ~container_registry_management_client.models.TokenUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Token + :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Token] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + registry_name: str, + token_name: str, + token_update_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Token]: + """Updates a token with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param token_name: The name of the token. Required. + :type token_name: str + :param token_update_parameters: The parameters for updating a token. Required. + :type token_update_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Token + :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Token] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + registry_name: str, + token_name: str, + token_update_parameters: Union[_models.TokenUpdateParameters, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.Token]: + """Updates a token with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param token_name: The name of the token. Required. + :type token_name: str + :param token_update_parameters: The parameters for updating a token. Is either a + TokenUpdateParameters type or a IO[bytes] type. Required. + :type token_update_parameters: + ~container_registry_management_client.models.TokenUpdateParameters or IO[bytes] + :return: An instance of LROPoller that returns Token + :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Token] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Token] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + token_name=token_name, + token_update_parameters=token_update_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("Token", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, + LROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.Token].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.Token]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, resource_group_name: str, registry_name: str, token_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_tokens_delete_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + token_name=token_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, resource_group_name: str, registry_name: str, token_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes a token from a container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param token_name: The name of the token. Required. + :type token_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + token_name=token_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, LROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + +class WebhooksOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~container_registry_management_client.ContainerRegistryManagementClient`'s + :attr:`webhooks` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerRegistryManagementClientConfiguration = ( + input_args.pop(0) if input_args else kwargs.pop("config") + ) + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> ItemPaged["_models.Webhook"]: + """Lists all the webhooks for the specified container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :return: An iterator like instance of Webhook + :rtype: ~azure.core.paging.ItemPaged[~container_registry_management_client.models.Webhook] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models._models.WebhookListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_webhooks_list_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + + return _request + + def extract_data(pipeline_response): + deserialized = self._deserialize( + _models._models.WebhookListResult, pipeline_response # pylint: disable=protected-access + ) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def get(self, resource_group_name: str, registry_name: str, webhook_name: str, **kwargs: Any) -> _models.Webhook: + """Gets the properties of the specified webhook. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param webhook_name: The name of the webhook. Required. + :type webhook_name: str + :return: Webhook + :rtype: ~container_registry_management_client.models.Webhook + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Webhook] = kwargs.pop("cls", None) + + _request = build_webhooks_get_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + webhook_name=webhook_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("Webhook", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, + resource_group_name: str, + registry_name: str, + webhook_name: str, + webhook_create_parameters: Union[_models.WebhookCreateParameters, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(webhook_create_parameters, (IOBase, bytes)): + _content = webhook_create_parameters + else: + _json = self._serialize.body(webhook_create_parameters, "WebhookCreateParameters") + + _request = build_webhooks_create_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + webhook_name=webhook_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create( + self, + resource_group_name: str, + registry_name: str, + webhook_name: str, + webhook_create_parameters: _models.WebhookCreateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Webhook]: + """Creates a webhook for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param webhook_name: The name of the webhook. Required. + :type webhook_name: str + :param webhook_create_parameters: The parameters for creating a webhook. Required. + :type webhook_create_parameters: + ~container_registry_management_client.models.WebhookCreateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Webhook + :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Webhook] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + registry_name: str, + webhook_name: str, + webhook_create_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Webhook]: + """Creates a webhook for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param webhook_name: The name of the webhook. Required. + :type webhook_name: str + :param webhook_create_parameters: The parameters for creating a webhook. Required. + :type webhook_create_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Webhook + :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Webhook] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create( + self, + resource_group_name: str, + registry_name: str, + webhook_name: str, + webhook_create_parameters: Union[_models.WebhookCreateParameters, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.Webhook]: + """Creates a webhook for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param webhook_name: The name of the webhook. Required. + :type webhook_name: str + :param webhook_create_parameters: The parameters for creating a webhook. Is either a + WebhookCreateParameters type or a IO[bytes] type. Required. + :type webhook_create_parameters: + ~container_registry_management_client.models.WebhookCreateParameters or IO[bytes] + :return: An instance of LROPoller that returns Webhook + :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Webhook] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Webhook] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + webhook_name=webhook_name, + webhook_create_parameters=webhook_create_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("Webhook", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, + LROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.Webhook].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.Webhook]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + registry_name: str, + webhook_name: str, + webhook_update_parameters: Union[_models.WebhookUpdateParameters, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(webhook_update_parameters, (IOBase, bytes)): + _content = webhook_update_parameters + else: + _json = self._serialize.body(webhook_update_parameters, "WebhookUpdateParameters") + + _request = build_webhooks_update_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + webhook_name=webhook_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + registry_name: str, + webhook_name: str, + webhook_update_parameters: _models.WebhookUpdateParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Webhook]: + """Updates a webhook with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param webhook_name: The name of the webhook. Required. + :type webhook_name: str + :param webhook_update_parameters: The parameters for updating a webhook. Required. + :type webhook_update_parameters: + ~container_registry_management_client.models.WebhookUpdateParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Webhook + :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Webhook] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + registry_name: str, + webhook_name: str, + webhook_update_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Webhook]: + """Updates a webhook with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param webhook_name: The name of the webhook. Required. + :type webhook_name: str + :param webhook_update_parameters: The parameters for updating a webhook. Required. + :type webhook_update_parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Webhook + :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Webhook] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + registry_name: str, + webhook_name: str, + webhook_update_parameters: Union[_models.WebhookUpdateParameters, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.Webhook]: + """Updates a webhook with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param webhook_name: The name of the webhook. Required. + :type webhook_name: str + :param webhook_update_parameters: The parameters for updating a webhook. Is either a + WebhookUpdateParameters type or a IO[bytes] type. Required. + :type webhook_update_parameters: + ~container_registry_management_client.models.WebhookUpdateParameters or IO[bytes] + :return: An instance of LROPoller that returns Webhook + :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Webhook] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Webhook] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + webhook_name=webhook_name, + webhook_update_parameters=webhook_update_parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("Webhook", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, + LROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.Webhook].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.Webhook]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, resource_group_name: str, registry_name: str, webhook_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_webhooks_delete_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + webhook_name=webhook_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, resource_group_name: str, registry_name: str, webhook_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes a webhook from a container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param webhook_name: The name of the webhook. Required. + :type webhook_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + webhook_name=webhook_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, LROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def get_callback_config( + self, resource_group_name: str, registry_name: str, webhook_name: str, **kwargs: Any + ) -> _models.CallbackConfig: + """Gets the configuration of service URI and custom headers for the webhook. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param webhook_name: The name of the webhook. Required. + :type webhook_name: str + :return: CallbackConfig + :rtype: ~container_registry_management_client.models.CallbackConfig + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.CallbackConfig] = kwargs.pop("cls", None) + + _request = build_webhooks_get_callback_config_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + webhook_name=webhook_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("CallbackConfig", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_events( + self, resource_group_name: str, registry_name: str, webhook_name: str, **kwargs: Any + ) -> ItemPaged["_models.Event"]: + """Lists recent events for the specified webhook. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param webhook_name: The name of the webhook. Required. + :type webhook_name: str + :return: An iterator like instance of Event + :rtype: ~azure.core.paging.ItemPaged[~container_registry_management_client.models.Event] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models._models.EventListResult] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_webhooks_list_events_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + webhook_name=webhook_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + + return _request + + def extract_data(pipeline_response): + deserialized = self._deserialize( + _models._models.EventListResult, pipeline_response # pylint: disable=protected-access + ) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def ping(self, resource_group_name: str, registry_name: str, webhook_name: str, **kwargs: Any) -> _models.EventInfo: + """Triggers a ping event to be sent to the webhook. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param registry_name: The name of the container registry. Required. + :type registry_name: str + :param webhook_name: The name of the webhook. Required. + :type webhook_name: str + :return: EventInfo + :rtype: ~container_registry_management_client.models.EventInfo + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.EventInfo] = kwargs.pop("cls", None) + + _request = build_webhooks_ping_request( + resource_group_name=resource_group_name, + registry_name=registry_name, + webhook_name=webhook_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("EventInfo", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/operations/_patch.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/operations/_patch.py new file mode 100644 index 00000000000..87676c65a8f --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/operations/_patch.py @@ -0,0 +1,21 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" + + +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/py.typed b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/py.typed new file mode 100644 index 00000000000..e5aff4f83af --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/readme.md b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/readme.md new file mode 100644 index 00000000000..537cddb5a31 --- /dev/null +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/readme.md @@ -0,0 +1,9 @@ +```yaml +openapi-type: arm +tag: package-2026-01-preview + +# Tag: package-2026-01-preview + +input-file: + - ./containerregistry.json +``` \ No newline at end of file From 53e27a4d06a89f33651848a5a91e1b949c6d0c89 Mon Sep 17 00:00:00 2001 From: mabelegba Date: Fri, 13 Mar 2026 20:26:47 -0400 Subject: [PATCH 2/7] acr to acr managed identity --- .../command_modules/acr/_client_factory.py | 8 +- .../cli/command_modules/acr/_constants.py | 2 + .../azure/cli/command_modules/acr/_params.py | 5 +- .../cli/command_modules/acr/_validators.py | 29 ++++- .../azure/cli/command_modules/acr/cache.py | 101 +++++++++++++----- .../containerregistry.json | 0 .../examples/ArchiveCreate.json | 0 .../examples/ArchiveDelete.json | 0 .../examples/ArchiveGet.json | 0 .../examples/ArchiveList.json | 0 .../examples/ArchiveUpdate.json | 0 .../examples/ArchiveVersionCreate.json | 0 .../examples/ArchiveVersionDelete.json | 0 .../examples/ArchiveVersionGet.json | 0 .../examples/ArchiveVersionList.json | 0 .../examples/CacheRuleCreate.json | 0 ...uleCreateUserAssignedMIAuthentication.json | 0 .../examples/CacheRuleDelete.json | 0 .../examples/CacheRuleGet.json | 0 .../examples/CacheRuleList.json | 0 .../examples/CacheRuleUpdate.json | 0 .../examples/ConnectedRegistryCreate.json | 0 .../examples/ConnectedRegistryDeactivate.json | 0 .../examples/ConnectedRegistryDelete.json | 0 .../examples/ConnectedRegistryGet.json | 0 .../examples/ConnectedRegistryList.json | 0 .../examples/ConnectedRegistryResync.json | 0 .../examples/ConnectedRegistryUpdate.json | 0 .../examples/CredentialSetCreate.json | 0 .../examples/CredentialSetDelete.json | 0 .../examples/CredentialSetGet.json | 0 .../examples/CredentialSetList.json | 0 .../examples/CredentialSetUpdate.json | 0 .../examples/ExportPipelineCreate.json | 0 .../examples/ExportPipelineDelete.json | 0 .../examples/ExportPipelineGet.json | 0 .../examples/ExportPipelineList.json | 0 .../examples/ImportImageByManifestDigest.json | 0 .../examples/ImportImageByTag.json | 0 .../ImportImageFromPublicRegistry.json | 0 .../examples/ImportPipelineCreate.json | 0 .../examples/ImportPipelineDelete.json | 0 .../examples/ImportPipelineGet.json | 0 .../examples/ImportPipelineList.json | 0 .../examples/OperationList.json | 0 .../examples/PipelineRunCreate_Export.json | 0 .../examples/PipelineRunCreate_Import.json | 0 .../examples/PipelineRunDelete.json | 0 .../examples/PipelineRunGet.json | 0 .../examples/PipelineRunList.json | 0 ...ivateEndpointConnectionCreateOrUpdate.json | 0 .../PrivateEndpointConnectionDelete.json | 0 .../PrivateEndpointConnectionGet.json | 0 .../PrivateEndpointConnectionList.json | 0 .../examples/RegistryCheckNameAvailable.json | 0 .../RegistryCheckNameNotAvailable.json | 0 .../examples/RegistryCreate.json | 0 .../examples/RegistryCreateAbac.json | 0 .../RegistryCreateDomainNameLabelScope.json | 0 .../examples/RegistryCreateZoneRedundant.json | 0 .../examples/RegistryDelete.json | 0 .../examples/RegistryGenerateCredentials.json | 0 .../examples/RegistryGet.json | 0 .../RegistryGetPrivateLinkResource.json | 0 .../examples/RegistryList.json | 0 .../examples/RegistryListByResourceGroup.json | 0 .../examples/RegistryListCredentials.json | 0 .../RegistryListPrivateLinkResources.json | 0 .../examples/RegistryListUsages.json | 0 .../RegistryRegenerateCredential.json | 0 .../examples/RegistryUpdate.json | 0 .../examples/ReplicationCreate.json | 0 .../ReplicationCreateZoneRedundant.json | 0 .../examples/ReplicationDelete.json | 0 .../examples/ReplicationGet.json | 0 .../examples/ReplicationList.json | 0 .../examples/ReplicationUpdate.json | 0 .../examples/ScopeMapCreate.json | 0 .../examples/ScopeMapDelete.json | 0 .../examples/ScopeMapGet.json | 0 .../examples/ScopeMapList.json | 0 .../examples/ScopeMapUpdate.json | 0 .../examples/TokenCreate.json | 0 .../examples/TokenDelete.json | 0 .../examples/TokenGet.json | 0 .../examples/TokenList.json | 0 .../examples/TokenUpdate.json | 0 .../examples/WebhookCreate.json | 0 .../examples/WebhookDelete.json | 0 .../examples/WebhookGet.json | 0 .../examples/WebhookGetCallbackConfig.json | 0 .../examples/WebhookList.json | 0 .../examples/WebhookListEvents.json | 0 .../examples/WebhookPing.json | 0 .../examples/WebhookUpdate.json | 0 .../generated/apiview-properties.json | 0 .../__init__.py | 0 .../_client.py | 4 +- .../_configuration.py | 0 .../_patch.py | 0 .../_utils/__init__.py | 0 .../_utils/serialization.py | 0 .../aio/__init__.py | 0 .../aio/_client.py | 0 .../aio/_configuration.py | 0 .../aio/_patch.py | 0 .../aio/operations/__init__.py | 0 .../aio/operations/_operations.py | 0 .../aio/operations/_patch.py | 0 .../models/__init__.py | 0 .../models/_enums.py | 0 .../models/_models.py | 0 .../models/_patch.py | 0 .../operations/__init__.py | 0 .../operations/_operations.py | 0 .../operations/_patch.py | 0 .../py.typed | 0 .../readme.md | 0 118 files changed, 116 insertions(+), 33 deletions(-) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/containerregistry.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/ArchiveCreate.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/ArchiveDelete.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/ArchiveGet.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/ArchiveList.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/ArchiveUpdate.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/ArchiveVersionCreate.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/ArchiveVersionDelete.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/ArchiveVersionGet.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/ArchiveVersionList.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/CacheRuleCreate.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/CacheRuleCreateUserAssignedMIAuthentication.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/CacheRuleDelete.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/CacheRuleGet.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/CacheRuleList.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/CacheRuleUpdate.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/ConnectedRegistryCreate.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/ConnectedRegistryDeactivate.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/ConnectedRegistryDelete.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/ConnectedRegistryGet.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/ConnectedRegistryList.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/ConnectedRegistryResync.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/ConnectedRegistryUpdate.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/CredentialSetCreate.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/CredentialSetDelete.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/CredentialSetGet.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/CredentialSetList.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/CredentialSetUpdate.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/ExportPipelineCreate.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/ExportPipelineDelete.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/ExportPipelineGet.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/ExportPipelineList.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/ImportImageByManifestDigest.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/ImportImageByTag.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/ImportImageFromPublicRegistry.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/ImportPipelineCreate.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/ImportPipelineDelete.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/ImportPipelineGet.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/ImportPipelineList.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/OperationList.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/PipelineRunCreate_Export.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/PipelineRunCreate_Import.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/PipelineRunDelete.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/PipelineRunGet.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/PipelineRunList.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/PrivateEndpointConnectionCreateOrUpdate.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/PrivateEndpointConnectionDelete.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/PrivateEndpointConnectionGet.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/PrivateEndpointConnectionList.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/RegistryCheckNameAvailable.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/RegistryCheckNameNotAvailable.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/RegistryCreate.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/RegistryCreateAbac.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/RegistryCreateDomainNameLabelScope.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/RegistryCreateZoneRedundant.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/RegistryDelete.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/RegistryGenerateCredentials.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/RegistryGet.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/RegistryGetPrivateLinkResource.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/RegistryList.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/RegistryListByResourceGroup.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/RegistryListCredentials.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/RegistryListPrivateLinkResources.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/RegistryListUsages.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/RegistryRegenerateCredential.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/RegistryUpdate.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/ReplicationCreate.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/ReplicationCreateZoneRedundant.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/ReplicationDelete.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/ReplicationGet.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/ReplicationList.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/ReplicationUpdate.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/ScopeMapCreate.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/ScopeMapDelete.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/ScopeMapGet.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/ScopeMapList.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/ScopeMapUpdate.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/TokenCreate.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/TokenDelete.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/TokenGet.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/TokenList.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/TokenUpdate.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/WebhookCreate.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/WebhookDelete.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/WebhookGet.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/WebhookGetCallbackConfig.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/WebhookList.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/WebhookListEvents.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/WebhookPing.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/examples/WebhookUpdate.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/generated/apiview-properties.json (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/generated/container_registry_management_client/__init__.py (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/generated/container_registry_management_client/_client.py (98%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/generated/container_registry_management_client/_configuration.py (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/generated/container_registry_management_client/_patch.py (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/generated/container_registry_management_client/_utils/__init__.py (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/generated/container_registry_management_client/_utils/serialization.py (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/generated/container_registry_management_client/aio/__init__.py (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/generated/container_registry_management_client/aio/_client.py (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/generated/container_registry_management_client/aio/_configuration.py (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/generated/container_registry_management_client/aio/_patch.py (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/generated/container_registry_management_client/aio/operations/__init__.py (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/generated/container_registry_management_client/aio/operations/_operations.py (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/generated/container_registry_management_client/aio/operations/_patch.py (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/generated/container_registry_management_client/models/__init__.py (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/generated/container_registry_management_client/models/_enums.py (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/generated/container_registry_management_client/models/_models.py (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/generated/container_registry_management_client/models/_patch.py (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/generated/container_registry_management_client/operations/__init__.py (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/generated/container_registry_management_client/operations/_operations.py (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/generated/container_registry_management_client/operations/_patch.py (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/generated/container_registry_management_client/py.typed (100%) rename src/azure-cli/azure/cli/vendored_sdks/containerregistry/{v2026-01-01-preview => v2026_01_01_preview}/readme.md (100%) diff --git a/src/azure-cli/azure/cli/command_modules/acr/_client_factory.py b/src/azure-cli/azure/cli/command_modules/acr/_client_factory.py index 060b6ca389b..312f09b9998 100644 --- a/src/azure-cli/azure/cli/command_modules/acr/_client_factory.py +++ b/src/azure-cli/azure/cli/command_modules/acr/_client_factory.py @@ -14,6 +14,7 @@ VERSION_2024_11_01_PREVIEW = "2024-11-01-preview" VERSION_2025_03_01_PREVIEW = "2025-03-01-preview" VERSION_2025_04_01 = "2025-04-01" +VERSION_2026_01_01_PREVIEW = "2026-01-01-preview" def get_acr_service_client(cli_ctx, api_version=None): @@ -28,7 +29,12 @@ def cf_acr_registries(cli_ctx, *_): def cf_acr_cache(cli_ctx, *_): - return get_acr_service_client(cli_ctx, api_version=VERSION_2023_01_01_PREVIEW).cache_rules + from azure.cli.core.commands.client_factory import get_mgmt_service_client + # Use 2026-01-01-preview vendored SDK directly + from azure.cli.vendored_sdks.containerregistry.v2026_01_01_preview.generated.container_registry_management_client import ( + ContainerRegistryManagementClient + ) + return get_mgmt_service_client(cli_ctx, ContainerRegistryManagementClient, api_version=VERSION_2026_01_01_PREVIEW).cache_rules def cf_acr_cred_sets(cli_ctx, *_): diff --git a/src/azure-cli/azure/cli/command_modules/acr/_constants.py b/src/azure-cli/azure/cli/command_modules/acr/_constants.py index abdd6c354c6..008cb283363 100644 --- a/src/azure-cli/azure/cli/command_modules/acr/_constants.py +++ b/src/azure-cli/azure/cli/command_modules/acr/_constants.py @@ -14,6 +14,8 @@ CREDENTIAL_SET_RESOURCE_ID_TEMPLATE = '/subscriptions/{sub_id}/resourceGroups/{rg}/providers/Microsoft.ContainerRegistry/registries/{reg_name}/credentialSets/{cred_set_name}' +USER_ASSIGNED_IDENTITY_RESOURCE_ID_TEMPLATE = '/subscriptions/{sub_id}/resourcegroups/{rg}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identity_name}' + TASK_RESOURCE_TYPE = REGISTRY_RESOURCE_TYPE + '/tasks' TASK_VALID_VSTS_URLS = ['visualstudio.com', 'dev.azure.com'] TASK_RESOURCE_ID_TEMPLATE = '/subscriptions/{sub_id}/resourceGroups/{rg}/providers/Microsoft.ContainerRegistry/registries/{reg}/tasks/{name}' diff --git a/src/azure-cli/azure/cli/command_modules/acr/_params.py b/src/azure-cli/azure/cli/command_modules/acr/_params.py index fbbffdf384c..c33cea48222 100644 --- a/src/azure-cli/azure/cli/command_modules/acr/_params.py +++ b/src/azure-cli/azure/cli/command_modules/acr/_params.py @@ -41,7 +41,8 @@ validate_manifest_id, validate_repo_id, validate_repository, - validate_permissive_repo_id + validate_permissive_repo_id, + validate_cache_credentials ) from .scope_map import RepoScopeMapActions, GatewayScopeMapActions @@ -257,6 +258,8 @@ def load_arguments(self, _): # pylint: disable=too-many-statements c.argument('source_repo', options_list=['--source-repo', '-s'], help="The full source repository path such as 'docker.io/library/ubuntu'.") c.argument('target_repo', options_list=['--target-repo', '-t'], help="The target repository namespace such as 'ubuntu'.") c.argument('remove_cred_set', action="store_true", help='Optional boolean indicating whether to remove the credential set from the cache rule. False by default.') + c.argument('identity', options_list=['--identity'], validator=validate_cache_credentials, + help='User-assigned managed identity resource ID for ACR to authenticate with the upstream registry. Format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. Cannot be used with --cred-set.') with self.argument_context('acr credential-set') as c: c.argument('registry_name', options_list=['--registry', '-r']) diff --git a/src/azure-cli/azure/cli/command_modules/acr/_validators.py b/src/azure-cli/azure/cli/command_modules/acr/_validators.py index fb26703c2bf..8196be22c4a 100644 --- a/src/azure-cli/azure/cli/command_modules/acr/_validators.py +++ b/src/azure-cli/azure/cli/command_modules/acr/_validators.py @@ -8,7 +8,7 @@ from knack.util import CLIError from knack.log import get_logger from azure.cli.core.azclierror import FileOperationError, InvalidArgumentValueError -from ._constants import ACR_NAME_VALIDATION_REGEX +from ._constants import ACR_NAME_VALIDATION_REGEX, USER_ASSIGNED_IDENTITY_RESOURCE_ID_TEMPLATE BAD_REPO_FQDN = "The positional parameter 'repo_id' must be a fully qualified repository specifier such"\ " as 'myregistry.azurecr.io/hello-world'." @@ -192,3 +192,30 @@ def validate_repository(namespace): def validate_docker_file_path(docker_file_path): if not os.path.isfile(docker_file_path): raise FileOperationError("Unable to find '{}'.".format(docker_file_path)) + + +def validate_cache_credentials(namespace): + """Validate cache credential options - allow both --identity and --cred-set, but --remove-cred-set is exclusive.""" + has_identity = namespace.identity is not None + has_cred_set = namespace.cred_set is not None + has_remove_cred_set = getattr(namespace, 'remove_cred_set', False) + + if has_remove_cred_set and (has_identity or has_cred_set): + raise InvalidArgumentValueError( + "Cannot specify --remove-cred-set with other credential options. Use --remove-cred-set alone to remove credentials." + ) + + # Validate identity format if provided + if has_identity: + identity_pattern = r'^/subscriptions/[^/]+/resource[Gg]roups/[^/]+/providers/Microsoft\.ManagedIdentity/userAssignedIdentities/[^/]+$' + + if not re.match(identity_pattern, namespace.identity): + example_format = USER_ASSIGNED_IDENTITY_RESOURCE_ID_TEMPLATE.format( + sub_id='{subscriptionId}', + rg='{resourceGroupName}', + identity_name='{identityName}' + ) + raise InvalidArgumentValueError( + f"The --identity parameter must be a valid ARM resource ID for a user-assigned managed identity. " + f"Format: {example_format}" + ) diff --git a/src/azure-cli/azure/cli/command_modules/acr/cache.py b/src/azure-cli/azure/cli/command_modules/acr/cache.py index 44617cd65af..2c5d2c87b95 100644 --- a/src/azure-cli/azure/cli/command_modules/acr/cache.py +++ b/src/azure-cli/azure/cli/command_modules/acr/cache.py @@ -8,6 +8,13 @@ from azure.cli.core.azclierror import InvalidArgumentValueError from azure.cli.core.commands.client_factory import get_subscription_id from azure.core.serialization import NULL as AzureCoreNull +from azure.cli.vendored_sdks.containerregistry.v2026_01_01_preview.generated.container_registry_management_client.models import ( + CacheRule, + CacheRuleProperties, + CacheRuleUpdateParameters, + IdentityProperties, + UserIdentityProperties +) def acr_cache_show(cmd, @@ -54,9 +61,12 @@ def acr_cache_create(cmd, source_repo, target_repo, resource_group_name=None, - cred_set=None): + cred_set=None, + identity=None): rg = get_resource_group_name_by_registry_name(cmd.cli_ctx, registry_name, resource_group_name) + + # Handle credential set if cred_set: sub_id = get_subscription_id(cmd.cli_ctx) # Format the credential set ID using subscription ID, resource group, registry name, and credential set name @@ -68,14 +78,30 @@ def acr_cache_create(cmd, ) else: cred_set_id = AzureCoreNull + + # Handle identity + identity_properties = None + if identity: + # Create IdentityProperties with UserAssigned type + identity_properties = IdentityProperties( + type="UserAssigned", + user_assigned_identities={ + identity: UserIdentityProperties() + } + ) - CacheRuleCreateParameters = cmd.get_models('CacheRule', operation_group='cache_rules') + # Create cache rule properties + cache_rule_properties = CacheRuleProperties( + source_repository=source_repo, + target_repository=target_repo, + credential_set_resource_id=cred_set_id + ) - cache_rule_create_params = CacheRuleCreateParameters() - cache_rule_create_params.name = name - cache_rule_create_params.source_repository = source_repo - cache_rule_create_params.target_repository = target_repo - cache_rule_create_params.credential_set_resource_id = cred_set_id + # Create cache rule with direct SDK model + cache_rule_create_params = CacheRule( + properties=cache_rule_properties, + identity=identity_properties + ) return client.begin_create(resource_group_name=rg, registry_name=registry_name, @@ -88,25 +114,46 @@ def acr_cache_update_custom(cmd, registry_name, resource_group_name=None, cred_set=None, - remove_cred_set=False): - - if cred_set is None and remove_cred_set is False: - raise InvalidArgumentValueError("You must either update the credential set ID or remove it.") - - if remove_cred_set: - cred_set_id = AzureCoreNull - else: - sub_id = get_subscription_id(cmd.cli_ctx) - rg = get_resource_group_name_by_registry_name(cmd.cli_ctx, registry_name, resource_group_name) - # Format the credential set ID using subscription ID, resource group, registry name, and credential set name - cred_set_id = CREDENTIAL_SET_RESOURCE_ID_TEMPLATE.format( - sub_id=sub_id, - rg=rg, - reg_name=registry_name, - cred_set_name=cred_set - ) - - instance.credential_set_resource_id = cred_set_id + remove_cred_set=False, + identity=None): + + # Check if any update parameters are provided + has_cred_update = cred_set is not None or remove_cred_set + has_identity_update = identity is not None + + if not has_cred_update and not has_identity_update: + raise InvalidArgumentValueError("You must provide at least one parameter to update (credential set, identity, or removal flag).") + + # Handle credential set updates + if has_cred_update: + if remove_cred_set: + cred_set_id = AzureCoreNull + else: + sub_id = get_subscription_id(cmd.cli_ctx) + rg = get_resource_group_name_by_registry_name(cmd.cli_ctx, registry_name, resource_group_name) + # Format the credential set ID using subscription ID, resource group, registry name, and credential set name + cred_set_id = CREDENTIAL_SET_RESOURCE_ID_TEMPLATE.format( + sub_id=sub_id, + rg=rg, + reg_name=registry_name, + cred_set_name=cred_set + ) + instance.credential_set_resource_id = cred_set_id + + # Handle identity updates + if has_identity_update: + if identity: + # Create IdentityProperties with UserAssigned type + identity_properties = IdentityProperties( + type="UserAssigned", + user_assigned_identities={ + identity: UserIdentityProperties() + } + ) + instance.identity = identity_properties + else: + # Remove identity by setting to None + instance.identity = None return instance @@ -115,8 +162,6 @@ def acr_cache_update_get(cmd): """Returns an empty CacheRuleUpdateParameters object. """ - CacheRuleUpdateParameters = cmd.get_models('CacheRuleUpdateParameters', operation_group='cache_rules') - return CacheRuleUpdateParameters() diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/containerregistry.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/containerregistry.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/containerregistry.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/containerregistry.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveCreate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveCreate.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveCreate.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveCreate.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveDelete.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveDelete.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveDelete.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveDelete.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveGet.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveGet.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveGet.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveGet.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveList.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveList.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveList.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveList.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveUpdate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveUpdate.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveUpdate.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveUpdate.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveVersionCreate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveVersionCreate.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveVersionCreate.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveVersionCreate.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveVersionDelete.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveVersionDelete.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveVersionDelete.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveVersionDelete.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveVersionGet.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveVersionGet.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveVersionGet.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveVersionGet.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveVersionList.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveVersionList.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ArchiveVersionList.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveVersionList.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CacheRuleCreate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CacheRuleCreate.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CacheRuleCreate.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CacheRuleCreate.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CacheRuleCreateUserAssignedMIAuthentication.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CacheRuleCreateUserAssignedMIAuthentication.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CacheRuleCreateUserAssignedMIAuthentication.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CacheRuleCreateUserAssignedMIAuthentication.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CacheRuleDelete.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CacheRuleDelete.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CacheRuleDelete.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CacheRuleDelete.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CacheRuleGet.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CacheRuleGet.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CacheRuleGet.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CacheRuleGet.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CacheRuleList.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CacheRuleList.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CacheRuleList.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CacheRuleList.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CacheRuleUpdate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CacheRuleUpdate.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CacheRuleUpdate.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CacheRuleUpdate.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ConnectedRegistryCreate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ConnectedRegistryCreate.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ConnectedRegistryCreate.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ConnectedRegistryCreate.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ConnectedRegistryDeactivate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ConnectedRegistryDeactivate.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ConnectedRegistryDeactivate.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ConnectedRegistryDeactivate.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ConnectedRegistryDelete.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ConnectedRegistryDelete.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ConnectedRegistryDelete.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ConnectedRegistryDelete.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ConnectedRegistryGet.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ConnectedRegistryGet.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ConnectedRegistryGet.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ConnectedRegistryGet.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ConnectedRegistryList.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ConnectedRegistryList.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ConnectedRegistryList.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ConnectedRegistryList.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ConnectedRegistryResync.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ConnectedRegistryResync.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ConnectedRegistryResync.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ConnectedRegistryResync.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ConnectedRegistryUpdate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ConnectedRegistryUpdate.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ConnectedRegistryUpdate.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ConnectedRegistryUpdate.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CredentialSetCreate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CredentialSetCreate.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CredentialSetCreate.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CredentialSetCreate.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CredentialSetDelete.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CredentialSetDelete.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CredentialSetDelete.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CredentialSetDelete.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CredentialSetGet.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CredentialSetGet.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CredentialSetGet.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CredentialSetGet.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CredentialSetList.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CredentialSetList.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CredentialSetList.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CredentialSetList.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CredentialSetUpdate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CredentialSetUpdate.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/CredentialSetUpdate.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CredentialSetUpdate.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ExportPipelineCreate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ExportPipelineCreate.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ExportPipelineCreate.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ExportPipelineCreate.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ExportPipelineDelete.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ExportPipelineDelete.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ExportPipelineDelete.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ExportPipelineDelete.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ExportPipelineGet.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ExportPipelineGet.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ExportPipelineGet.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ExportPipelineGet.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ExportPipelineList.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ExportPipelineList.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ExportPipelineList.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ExportPipelineList.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ImportImageByManifestDigest.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ImportImageByManifestDigest.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ImportImageByManifestDigest.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ImportImageByManifestDigest.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ImportImageByTag.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ImportImageByTag.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ImportImageByTag.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ImportImageByTag.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ImportImageFromPublicRegistry.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ImportImageFromPublicRegistry.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ImportImageFromPublicRegistry.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ImportImageFromPublicRegistry.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ImportPipelineCreate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ImportPipelineCreate.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ImportPipelineCreate.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ImportPipelineCreate.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ImportPipelineDelete.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ImportPipelineDelete.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ImportPipelineDelete.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ImportPipelineDelete.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ImportPipelineGet.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ImportPipelineGet.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ImportPipelineGet.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ImportPipelineGet.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ImportPipelineList.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ImportPipelineList.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ImportPipelineList.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ImportPipelineList.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/OperationList.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/OperationList.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/OperationList.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/OperationList.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PipelineRunCreate_Export.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PipelineRunCreate_Export.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PipelineRunCreate_Export.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PipelineRunCreate_Export.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PipelineRunCreate_Import.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PipelineRunCreate_Import.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PipelineRunCreate_Import.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PipelineRunCreate_Import.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PipelineRunDelete.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PipelineRunDelete.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PipelineRunDelete.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PipelineRunDelete.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PipelineRunGet.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PipelineRunGet.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PipelineRunGet.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PipelineRunGet.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PipelineRunList.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PipelineRunList.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PipelineRunList.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PipelineRunList.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PrivateEndpointConnectionCreateOrUpdate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PrivateEndpointConnectionCreateOrUpdate.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PrivateEndpointConnectionCreateOrUpdate.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PrivateEndpointConnectionCreateOrUpdate.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PrivateEndpointConnectionDelete.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PrivateEndpointConnectionDelete.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PrivateEndpointConnectionDelete.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PrivateEndpointConnectionDelete.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PrivateEndpointConnectionGet.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PrivateEndpointConnectionGet.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PrivateEndpointConnectionGet.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PrivateEndpointConnectionGet.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PrivateEndpointConnectionList.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PrivateEndpointConnectionList.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/PrivateEndpointConnectionList.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PrivateEndpointConnectionList.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryCheckNameAvailable.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryCheckNameAvailable.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryCheckNameAvailable.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryCheckNameAvailable.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryCheckNameNotAvailable.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryCheckNameNotAvailable.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryCheckNameNotAvailable.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryCheckNameNotAvailable.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryCreate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryCreate.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryCreate.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryCreate.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryCreateAbac.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryCreateAbac.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryCreateAbac.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryCreateAbac.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryCreateDomainNameLabelScope.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryCreateDomainNameLabelScope.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryCreateDomainNameLabelScope.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryCreateDomainNameLabelScope.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryCreateZoneRedundant.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryCreateZoneRedundant.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryCreateZoneRedundant.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryCreateZoneRedundant.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryDelete.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryDelete.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryDelete.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryDelete.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryGenerateCredentials.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryGenerateCredentials.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryGenerateCredentials.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryGenerateCredentials.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryGet.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryGet.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryGet.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryGet.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryGetPrivateLinkResource.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryGetPrivateLinkResource.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryGetPrivateLinkResource.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryGetPrivateLinkResource.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryList.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryList.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryList.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryList.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryListByResourceGroup.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryListByResourceGroup.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryListByResourceGroup.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryListByResourceGroup.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryListCredentials.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryListCredentials.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryListCredentials.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryListCredentials.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryListPrivateLinkResources.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryListPrivateLinkResources.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryListPrivateLinkResources.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryListPrivateLinkResources.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryListUsages.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryListUsages.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryListUsages.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryListUsages.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryRegenerateCredential.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryRegenerateCredential.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryRegenerateCredential.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryRegenerateCredential.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryUpdate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryUpdate.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/RegistryUpdate.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryUpdate.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ReplicationCreate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ReplicationCreate.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ReplicationCreate.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ReplicationCreate.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ReplicationCreateZoneRedundant.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ReplicationCreateZoneRedundant.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ReplicationCreateZoneRedundant.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ReplicationCreateZoneRedundant.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ReplicationDelete.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ReplicationDelete.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ReplicationDelete.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ReplicationDelete.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ReplicationGet.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ReplicationGet.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ReplicationGet.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ReplicationGet.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ReplicationList.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ReplicationList.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ReplicationList.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ReplicationList.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ReplicationUpdate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ReplicationUpdate.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ReplicationUpdate.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ReplicationUpdate.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ScopeMapCreate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ScopeMapCreate.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ScopeMapCreate.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ScopeMapCreate.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ScopeMapDelete.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ScopeMapDelete.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ScopeMapDelete.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ScopeMapDelete.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ScopeMapGet.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ScopeMapGet.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ScopeMapGet.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ScopeMapGet.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ScopeMapList.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ScopeMapList.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ScopeMapList.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ScopeMapList.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ScopeMapUpdate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ScopeMapUpdate.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/ScopeMapUpdate.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ScopeMapUpdate.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/TokenCreate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/TokenCreate.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/TokenCreate.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/TokenCreate.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/TokenDelete.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/TokenDelete.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/TokenDelete.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/TokenDelete.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/TokenGet.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/TokenGet.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/TokenGet.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/TokenGet.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/TokenList.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/TokenList.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/TokenList.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/TokenList.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/TokenUpdate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/TokenUpdate.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/TokenUpdate.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/TokenUpdate.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/WebhookCreate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/WebhookCreate.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/WebhookCreate.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/WebhookCreate.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/WebhookDelete.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/WebhookDelete.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/WebhookDelete.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/WebhookDelete.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/WebhookGet.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/WebhookGet.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/WebhookGet.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/WebhookGet.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/WebhookGetCallbackConfig.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/WebhookGetCallbackConfig.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/WebhookGetCallbackConfig.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/WebhookGetCallbackConfig.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/WebhookList.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/WebhookList.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/WebhookList.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/WebhookList.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/WebhookListEvents.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/WebhookListEvents.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/WebhookListEvents.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/WebhookListEvents.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/WebhookPing.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/WebhookPing.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/WebhookPing.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/WebhookPing.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/WebhookUpdate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/WebhookUpdate.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/examples/WebhookUpdate.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/WebhookUpdate.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/apiview-properties.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/apiview-properties.json similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/apiview-properties.json rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/apiview-properties.json diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/__init__.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/__init__.py similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/__init__.py rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/__init__.py diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/_client.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/_client.py similarity index 98% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/_client.py rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/_client.py index 09461f61a99..587ce1fa3d8 100644 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/_client.py +++ b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/_client.py @@ -93,8 +93,8 @@ class ContainerRegistryManagementClient: # pylint: disable=too-many-instance-at def __init__( self, - subscription_id: str, credential: "TokenCredential", + subscription_id: str, *, endpoint: str = "https://management.azure.com", **kwargs: Any @@ -120,7 +120,7 @@ def __init__( policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, self._config.http_logging_policy, ] - self._client: PipelineClient = PipelineClient(base_url=endpoint, policies=_policies, **kwargs) + self._client: PipelineClient = PipelineClient(policies=_policies, **kwargs) client_models = {k: v for k, v in _models._models.__dict__.items() if isinstance(v, type)} client_models |= {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/_configuration.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/_configuration.py similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/_configuration.py rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/_configuration.py diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/_patch.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/_patch.py similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/_patch.py rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/_patch.py diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/_utils/__init__.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/_utils/__init__.py similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/_utils/__init__.py rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/_utils/__init__.py diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/_utils/serialization.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/_utils/serialization.py similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/_utils/serialization.py rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/_utils/serialization.py diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/aio/__init__.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/aio/__init__.py similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/aio/__init__.py rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/aio/__init__.py diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/aio/_client.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/aio/_client.py similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/aio/_client.py rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/aio/_client.py diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/aio/_configuration.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/aio/_configuration.py similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/aio/_configuration.py rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/aio/_configuration.py diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/aio/_patch.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/aio/_patch.py similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/aio/_patch.py rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/aio/_patch.py diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/aio/operations/__init__.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/aio/operations/__init__.py similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/aio/operations/__init__.py rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/aio/operations/__init__.py diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/aio/operations/_operations.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/aio/operations/_operations.py similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/aio/operations/_operations.py rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/aio/operations/_operations.py diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/aio/operations/_patch.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/aio/operations/_patch.py similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/aio/operations/_patch.py rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/aio/operations/_patch.py diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/models/__init__.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/models/__init__.py similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/models/__init__.py rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/models/__init__.py diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/models/_enums.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/models/_enums.py similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/models/_enums.py rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/models/_enums.py diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/models/_models.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/models/_models.py similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/models/_models.py rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/models/_models.py diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/models/_patch.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/models/_patch.py similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/models/_patch.py rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/models/_patch.py diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/operations/__init__.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/operations/__init__.py similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/operations/__init__.py rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/operations/__init__.py diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/operations/_operations.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/operations/_operations.py similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/operations/_operations.py rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/operations/_operations.py diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/operations/_patch.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/operations/_patch.py similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/operations/_patch.py rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/operations/_patch.py diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/py.typed b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/py.typed similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/generated/container_registry_management_client/py.typed rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/py.typed diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/readme.md b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/readme.md similarity index 100% rename from src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026-01-01-preview/readme.md rename to src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/readme.md From 937b29870695bbec29544972a8c153e40859237e Mon Sep 17 00:00:00 2001 From: mabelegba Date: Fri, 13 Mar 2026 20:53:34 -0400 Subject: [PATCH 3/7] add tests --- .../acr/tests/latest/test_acr_commands.py | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands.py b/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands.py index 1a5366c3b2d..124f41e78a8 100644 --- a/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands.py +++ b/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands.py @@ -273,6 +273,58 @@ def test_acr_cache(self, resource_group, resource_group_location): self.cmd('acr delete -n {registry_name} -g {rg} -y') + @AllowLargeResponse() + @ResourceGroupPreparer() + def test_acr_cache_managed_identity(self, resource_group, resource_group_location): + registry_name = self.create_random_name('clireg', 20) + + self.kwargs.update({ + 'registry_name': registry_name, + 'rg_loc': resource_group_location, + 'sku': 'Standard', + 'cr_name': 'test-mi', + 'source_repo': 'mcr.microsoft.com/mcr/hello-world', + 'target_repo': 'hello-world-mi', + 'identity_name': self.create_random_name('cache-identity', 20), + 'identity_name2': self.create_random_name('cache-identity2', 20) + }) + + # Create registry + self.cmd('acr create -n {registry_name} -g {rg} -l {rg_loc} --sku {sku}', + checks=[self.check('name', '{registry_name}'), + self.check('location', '{rg_loc}'), + self.check('sku.name', 'Standard'), + self.check('provisioningState', 'Succeeded')]) + + # Create user-assigned managed identities + result = self.cmd('identity create --name {identity_name} -g {rg}') + self.kwargs['identity_id'] = result.get_output_in_json()['id'] + + result = self.cmd('identity create --name {identity_name2} -g {rg}') + self.kwargs['identity_id2'] = result.get_output_in_json()['id'] + + # Test cache create with managed identity + self.cmd('acr cache create -n {cr_name} -r {registry_name} -s {source_repo} -t {target_repo} --identity {identity_id}', + checks=[self.check('name', '{cr_name}'), + self.check('provisioningState', 'Succeeded'), + self.check('identity.type', 'UserAssigned')]) + + # Test cache show includes identity + self.cmd('acr cache show -n {cr_name} -r {registry_name} -g {rg}', + checks=[self.check('name', '{cr_name}'), + self.check('provisioningState', 'Succeeded'), + self.check('identity.type', 'UserAssigned')]) + + # Test cache update with different managed identity + self.cmd('acr cache update -n {cr_name} -r {registry_name} --identity {identity_id2}', + checks=[self.check('name', '{cr_name}'), + self.check('provisioningState', 'Succeeded'), + self.check('identity.type', 'UserAssigned')]) + + # Clean up + self.cmd('acr cache delete -n {cr_name} -r {registry_name} -y') + self.cmd('acr delete -n {registry_name} -g {rg} -y') + @AllowLargeResponse() @ResourceGroupPreparer() def test_acr_create_replication(self, resource_group, resource_group_location): From 5285debd83295612b3a99a57d9d67392f3451259 Mon Sep 17 00:00:00 2001 From: mabelegba Date: Fri, 13 Mar 2026 21:40:53 -0400 Subject: [PATCH 4/7] update history.rst with new changes to ACR --- src/azure-cli/HISTORY.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/azure-cli/HISTORY.rst b/src/azure-cli/HISTORY.rst index cdcaec7ae19..0de8c041e44 100644 --- a/src/azure-cli/HISTORY.rst +++ b/src/azure-cli/HISTORY.rst @@ -6,6 +6,10 @@ Release History 2.84.0 ++++++ +**ACR** + +* `az acr cache create/update`: Add `--identity` parameter to support using user-assigned managed identity for cache rules + **AKS** * `az aks create`: Add `--enable-container-network-logs` parameter to enable container network logs (#32700) From 7a3cbda212155cceceb85a82014c647f61e3a1cb Mon Sep 17 00:00:00 2001 From: mabelegba Date: Fri, 20 Mar 2026 15:34:11 -0400 Subject: [PATCH 5/7] fix --- src/azure-cli/azure/cli/command_modules/acr/_params.py | 2 +- src/azure-cli/azure/cli/command_modules/acr/cache.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/azure-cli/azure/cli/command_modules/acr/_params.py b/src/azure-cli/azure/cli/command_modules/acr/_params.py index c33cea48222..a285ce0ee5e 100644 --- a/src/azure-cli/azure/cli/command_modules/acr/_params.py +++ b/src/azure-cli/azure/cli/command_modules/acr/_params.py @@ -259,7 +259,7 @@ def load_arguments(self, _): # pylint: disable=too-many-statements c.argument('target_repo', options_list=['--target-repo', '-t'], help="The target repository namespace such as 'ubuntu'.") c.argument('remove_cred_set', action="store_true", help='Optional boolean indicating whether to remove the credential set from the cache rule. False by default.') c.argument('identity', options_list=['--identity'], validator=validate_cache_credentials, - help='User-assigned managed identity resource ID for ACR to authenticate with the upstream registry. Format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. Cannot be used with --cred-set.') + help='User-assigned managed identity resource ID for ACR to authenticate with the upstream registry. Format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.') with self.argument_context('acr credential-set') as c: c.argument('registry_name', options_list=['--registry', '-r']) diff --git a/src/azure-cli/azure/cli/command_modules/acr/cache.py b/src/azure-cli/azure/cli/command_modules/acr/cache.py index 2c5d2c87b95..3f67a3ccd33 100644 --- a/src/azure-cli/azure/cli/command_modules/acr/cache.py +++ b/src/azure-cli/azure/cli/command_modules/acr/cache.py @@ -124,6 +124,10 @@ def acr_cache_update_custom(cmd, if not has_cred_update and not has_identity_update: raise InvalidArgumentValueError("You must provide at least one parameter to update (credential set, identity, or removal flag).") + #initilize properties if not already set + if instance.properties is None: + instance.properties = CacheRuleProperties() + # Handle credential set updates if has_cred_update: if remove_cred_set: From 4166bea4f4ee840e4e29e4619be81f635c46348d Mon Sep 17 00:00:00 2001 From: Tony Vargas Date: Mon, 23 Mar 2026 14:54:43 -0700 Subject: [PATCH 6/7] Replace vendored SDK with official azure-mgmt-containerregistry 15.1.0b1 - Update azure-mgmt-containerregistry dependency to 15.1.0b1 - Remove vendored v2026_01_01_preview SDK (~48K lines) - Revert cf_acr_cache to standard get_acr_service_client pattern - Import models from azure.mgmt.containerregistry.models - Update SDK profile: cache_rules -> 2026-01-01-preview - Fix credential_set_resource_id nesting under properties Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../azure/cli/core/profiles/_shared.py | 9 +- .../command_modules/acr/_client_factory.py | 7 +- .../azure/cli/command_modules/acr/cache.py | 9 +- .../containerregistry.json | 9947 ------------ .../examples/ArchiveCreate.json | 61 - .../examples/ArchiveDelete.json | 20 - .../examples/ArchiveGet.json | 37 - .../examples/ArchiveList.json | 41 - .../examples/ArchiveUpdate.json | 44 - .../examples/ArchiveVersionCreate.json | 38 - .../examples/ArchiveVersionDelete.json | 21 - .../examples/ArchiveVersionGet.json | 34 - .../examples/ArchiveVersionList.json | 38 - .../examples/CacheRuleCreate.json | 51 - ...uleCreateUserAssignedMIAuthentication.json | 72 - .../examples/CacheRuleDelete.json | 19 - .../examples/CacheRuleGet.json | 27 - .../examples/CacheRuleList.json | 30 - .../examples/CacheRuleUpdate.json | 49 - .../examples/ConnectedRegistryCreate.json | 112 - .../examples/ConnectedRegistryDeactivate.json | 19 - .../examples/ConnectedRegistryDelete.json | 20 - .../examples/ConnectedRegistryGet.json | 56 - .../examples/ConnectedRegistryList.json | 59 - .../examples/ConnectedRegistryResync.json | 54 - .../examples/ConnectedRegistryUpdate.json | 123 - .../examples/CredentialSetCreate.json | 85 - .../examples/CredentialSetDelete.json | 19 - .../examples/CredentialSetGet.json | 40 - .../examples/CredentialSetList.json | 43 - .../examples/CredentialSetUpdate.json | 81 - .../examples/ExportPipelineCreate.json | 83 - .../examples/ExportPipelineDelete.json | 20 - .../examples/ExportPipelineGet.json | 38 - .../examples/ExportPipelineList.json | 41 - .../examples/ImportImageByManifestDigest.json | 31 - .../examples/ImportImageByTag.json | 31 - .../ImportImageFromPublicRegistry.json | 31 - .../examples/ImportPipelineCreate.json | 110 - .../examples/ImportPipelineDelete.json | 20 - .../examples/ImportPipelineGet.json | 49 - .../examples/ImportPipelineList.json | 52 - .../examples/OperationList.json | 24 - .../examples/PipelineRunCreate_Export.json | 93 - .../examples/PipelineRunCreate_Import.json | 92 - .../examples/PipelineRunDelete.json | 20 - .../examples/PipelineRunGet.json | 44 - .../examples/PipelineRunList.json | 76 - ...ivateEndpointConnectionCreateOrUpdate.json | 60 - .../PrivateEndpointConnectionDelete.json | 20 - .../PrivateEndpointConnectionGet.json | 31 - .../PrivateEndpointConnectionList.json | 34 - .../examples/RegistryCheckNameAvailable.json | 22 - .../RegistryCheckNameNotAvailable.json | 23 - .../examples/RegistryCreate.json | 144 - .../examples/RegistryCreateAbac.json | 144 - .../RegistryCreateDomainNameLabelScope.json | 144 - .../examples/RegistryCreateZoneRedundant.json | 147 - .../examples/RegistryDelete.json | 19 - .../examples/RegistryGenerateCredentials.json | 38 - .../examples/RegistryGet.json | 72 - .../RegistryGetPrivateLinkResource.json | 30 - .../examples/RegistryList.json | 74 - .../examples/RegistryListByResourceGroup.json | 75 - .../examples/RegistryListCredentials.json | 27 - .../RegistryListPrivateLinkResources.json | 33 - .../examples/RegistryListUsages.json | 30 - .../RegistryRegenerateCredential.json | 30 - .../examples/RegistryUpdate.json | 147 - .../examples/ReplicationCreate.json | 64 - .../ReplicationCreateZoneRedundant.json | 68 - .../examples/ReplicationDelete.json | 20 - .../examples/ReplicationGet.json | 34 - .../examples/ReplicationList.json | 37 - .../examples/ReplicationUpdate.json | 63 - .../examples/ScopeMapCreate.json | 57 - .../examples/ScopeMapDelete.json | 20 - .../examples/ScopeMapGet.json | 29 - .../examples/ScopeMapList.json | 32 - .../examples/ScopeMapUpdate.json | 57 - .../examples/TokenCreate.json | 74 - .../examples/TokenDelete.json | 20 - .../examples/TokenGet.json | 26 - .../examples/TokenList.json | 29 - .../examples/TokenUpdate.json | 71 - .../examples/WebhookCreate.json | 71 - .../examples/WebhookDelete.json | 20 - .../examples/WebhookGet.json | 32 - .../examples/WebhookGetCallbackConfig.json | 21 - .../examples/WebhookList.json | 35 - .../examples/WebhookListEvents.json | 65 - .../examples/WebhookPing.json | 18 - .../examples/WebhookUpdate.json | 70 - .../generated/apiview-properties.json | 345 - .../__init__.py | 27 - .../_client.py | 186 - .../_configuration.py | 61 - .../_patch.py | 21 - .../_utils/__init__.py | 4 - .../_utils/serialization.py | 2039 --- .../aio/__init__.py | 27 - .../aio/_client.py | 190 - .../aio/_configuration.py | 61 - .../aio/_patch.py | 21 - .../aio/operations/__init__.py | 51 - .../aio/operations/_operations.py | 10536 ------------ .../aio/operations/_patch.py | 21 - .../models/__init__.py | 386 - .../models/_enums.py | 391 - .../models/_models.py | 6514 -------- .../models/_patch.py | 21 - .../operations/__init__.py | 51 - .../operations/_operations.py | 13281 ---------------- .../operations/_patch.py | 21 - .../py.typed | 1 - .../v2026_01_01_preview/readme.md | 9 - src/azure-cli/setup.py | 2 +- 117 files changed, 14 insertions(+), 48750 deletions(-) delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/containerregistry.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveCreate.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveDelete.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveGet.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveList.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveUpdate.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveVersionCreate.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveVersionDelete.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveVersionGet.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveVersionList.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CacheRuleCreate.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CacheRuleCreateUserAssignedMIAuthentication.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CacheRuleDelete.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CacheRuleGet.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CacheRuleList.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CacheRuleUpdate.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ConnectedRegistryCreate.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ConnectedRegistryDeactivate.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ConnectedRegistryDelete.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ConnectedRegistryGet.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ConnectedRegistryList.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ConnectedRegistryResync.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ConnectedRegistryUpdate.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CredentialSetCreate.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CredentialSetDelete.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CredentialSetGet.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CredentialSetList.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CredentialSetUpdate.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ExportPipelineCreate.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ExportPipelineDelete.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ExportPipelineGet.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ExportPipelineList.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ImportImageByManifestDigest.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ImportImageByTag.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ImportImageFromPublicRegistry.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ImportPipelineCreate.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ImportPipelineDelete.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ImportPipelineGet.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ImportPipelineList.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/OperationList.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PipelineRunCreate_Export.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PipelineRunCreate_Import.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PipelineRunDelete.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PipelineRunGet.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PipelineRunList.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PrivateEndpointConnectionCreateOrUpdate.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PrivateEndpointConnectionDelete.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PrivateEndpointConnectionGet.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PrivateEndpointConnectionList.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryCheckNameAvailable.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryCheckNameNotAvailable.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryCreate.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryCreateAbac.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryCreateDomainNameLabelScope.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryCreateZoneRedundant.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryDelete.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryGenerateCredentials.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryGet.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryGetPrivateLinkResource.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryList.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryListByResourceGroup.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryListCredentials.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryListPrivateLinkResources.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryListUsages.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryRegenerateCredential.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryUpdate.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ReplicationCreate.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ReplicationCreateZoneRedundant.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ReplicationDelete.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ReplicationGet.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ReplicationList.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ReplicationUpdate.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ScopeMapCreate.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ScopeMapDelete.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ScopeMapGet.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ScopeMapList.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ScopeMapUpdate.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/TokenCreate.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/TokenDelete.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/TokenGet.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/TokenList.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/TokenUpdate.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/WebhookCreate.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/WebhookDelete.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/WebhookGet.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/WebhookGetCallbackConfig.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/WebhookList.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/WebhookListEvents.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/WebhookPing.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/WebhookUpdate.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/apiview-properties.json delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/__init__.py delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/_client.py delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/_configuration.py delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/_patch.py delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/_utils/__init__.py delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/_utils/serialization.py delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/aio/__init__.py delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/aio/_client.py delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/aio/_configuration.py delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/aio/_patch.py delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/aio/operations/__init__.py delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/aio/operations/_operations.py delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/aio/operations/_patch.py delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/models/__init__.py delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/models/_enums.py delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/models/_models.py delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/models/_patch.py delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/operations/__init__.py delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/operations/_operations.py delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/operations/_patch.py delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/py.typed delete mode 100644 src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/readme.md diff --git a/src/azure-cli-core/azure/cli/core/profiles/_shared.py b/src/azure-cli-core/azure/cli/core/profiles/_shared.py index 22f467fa407..d385c0aaaf4 100644 --- a/src/azure-cli-core/azure/cli/core/profiles/_shared.py +++ b/src/azure-cli-core/azure/cli/core/profiles/_shared.py @@ -193,7 +193,7 @@ def default_api_version(self): 'task_runs': '2025-03-01-preview', 'runs': '2025-03-01-preview', 'network_rule': '2021-08-01-preview', - 'cache_rules': '2023-01-01-preview', + 'cache_rules': '2026-01-01-preview', 'credential_sets': '2023-01-01-preview' }), # The order does make things different. @@ -244,7 +244,8 @@ def default_api_version(self): 'VERSION_2023_11_01_PREVIEW': "2023-11-01-preview", 'VERSION_2024_11_01_PREVIEW': "2024-11-01-preview", 'VERSION_2025_03_01_PREVIEW': "2025-03-01-preview", - 'VERSION_2025_04_01': "2025-04-01" + 'VERSION_2025_04_01': "2025-04-01", + 'VERSION_2026_01_01_PREVIEW': "2026-01-01-preview" }, ResourceType.MGMT_MSI: { 'user_assigned_identities': '2022-01-31-preview', @@ -281,6 +282,10 @@ def __getattr__(self, item): self._resolve() return self._operations_groups_value[item] except KeyError: + # For new-style SDKs without property-based operation groups, + # return the default API version for any unlisted group. + if self._sdk_profile and self._sdk_profile.default_api_version: + return self._post_process(self._sdk_profile.default_api_version) raise AttributeError('Attribute {} does not exist.'.format(item)) diff --git a/src/azure-cli/azure/cli/command_modules/acr/_client_factory.py b/src/azure-cli/azure/cli/command_modules/acr/_client_factory.py index 312f09b9998..b68dcf068c1 100644 --- a/src/azure-cli/azure/cli/command_modules/acr/_client_factory.py +++ b/src/azure-cli/azure/cli/command_modules/acr/_client_factory.py @@ -29,12 +29,7 @@ def cf_acr_registries(cli_ctx, *_): def cf_acr_cache(cli_ctx, *_): - from azure.cli.core.commands.client_factory import get_mgmt_service_client - # Use 2026-01-01-preview vendored SDK directly - from azure.cli.vendored_sdks.containerregistry.v2026_01_01_preview.generated.container_registry_management_client import ( - ContainerRegistryManagementClient - ) - return get_mgmt_service_client(cli_ctx, ContainerRegistryManagementClient, api_version=VERSION_2026_01_01_PREVIEW).cache_rules + return get_acr_service_client(cli_ctx, api_version=VERSION_2026_01_01_PREVIEW).cache_rules def cf_acr_cred_sets(cli_ctx, *_): diff --git a/src/azure-cli/azure/cli/command_modules/acr/cache.py b/src/azure-cli/azure/cli/command_modules/acr/cache.py index 3f67a3ccd33..2d783ba9c81 100644 --- a/src/azure-cli/azure/cli/command_modules/acr/cache.py +++ b/src/azure-cli/azure/cli/command_modules/acr/cache.py @@ -8,10 +8,11 @@ from azure.cli.core.azclierror import InvalidArgumentValueError from azure.cli.core.commands.client_factory import get_subscription_id from azure.core.serialization import NULL as AzureCoreNull -from azure.cli.vendored_sdks.containerregistry.v2026_01_01_preview.generated.container_registry_management_client.models import ( +from azure.mgmt.containerregistry.models import ( CacheRule, CacheRuleProperties, CacheRuleUpdateParameters, + CacheRuleUpdateProperties, IdentityProperties, UserIdentityProperties ) @@ -126,12 +127,12 @@ def acr_cache_update_custom(cmd, #initilize properties if not already set if instance.properties is None: - instance.properties = CacheRuleProperties() + instance.properties = CacheRuleUpdateProperties() # Handle credential set updates if has_cred_update: if remove_cred_set: - cred_set_id = AzureCoreNull + instance.properties.credential_set_resource_id = AzureCoreNull else: sub_id = get_subscription_id(cmd.cli_ctx) rg = get_resource_group_name_by_registry_name(cmd.cli_ctx, registry_name, resource_group_name) @@ -142,7 +143,7 @@ def acr_cache_update_custom(cmd, reg_name=registry_name, cred_set_name=cred_set ) - instance.credential_set_resource_id = cred_set_id + instance.properties.credential_set_resource_id = cred_set_id # Handle identity updates if has_identity_update: diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/containerregistry.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/containerregistry.json deleted file mode 100644 index 625540160a6..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/containerregistry.json +++ /dev/null @@ -1,9947 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "ContainerRegistryManagementClient", - "version": "2026-01-01-preview", - "description": "The Microsoft Azure Container Registry management API provides create, read, update, and delete functionality for Azure Container Registry resources including registries, replications, webhooks, tasks, runs, and other registry components.", - "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": "Registries" - }, - { - "name": "Archives" - }, - { - "name": "ArchiveVersions" - }, - { - "name": "CacheRules" - }, - { - "name": "CredentialSets" - }, - { - "name": "ConnectedRegistries" - }, - { - "name": "PrivateLinkResources" - }, - { - "name": "PrivateEndpointConnections" - }, - { - "name": "Replications" - }, - { - "name": "ScopeMaps" - }, - { - "name": "Tokens" - }, - { - "name": "ExportPipelines" - }, - { - "name": "ImportPipelines" - }, - { - "name": "PipelineRuns" - }, - { - "name": "Webhooks" - } - ], - "paths": { - "/providers/Microsoft.ContainerRegistry/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": "#/definitions/OperationListResult" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "OperationList": { - "$ref": "./examples/OperationList.json" - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerRegistry/checkNameAvailability": { - "post": { - "operationId": "Registries_CheckNameAvailability", - "tags": [ - "Registries" - ], - "description": "Checks whether the container registry name is available for use. The name must contain only alphanumeric characters, be globally unique, and between 5 and 50 characters in length.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "name": "registryNameCheckRequest", - "in": "body", - "description": "The request body", - "required": true, - "schema": { - "$ref": "#/definitions/RegistryNameCheckRequest" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "schema": { - "$ref": "#/definitions/RegistryNameStatus" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "RegistryCheckNameAvailable": { - "$ref": "./examples/RegistryCheckNameAvailable.json" - }, - "RegistryCheckNameNotAvailable": { - "$ref": "./examples/RegistryCheckNameNotAvailable.json" - } - } - } - }, - "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerRegistry/registries": { - "get": { - "operationId": "Registries_List", - "tags": [ - "Registries" - ], - "description": "Lists all the container registries under the specified subscription.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/RegistryListResult" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "RegistryList": { - "$ref": "./examples/RegistryList.json" - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries": { - "get": { - "operationId": "Registries_ListByResourceGroup", - "tags": [ - "Registries" - ], - "description": "Lists all the container registries under the specified resource group.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/RegistryListResult" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "RegistryListByResourceGroup": { - "$ref": "./examples/RegistryListByResourceGroup.json" - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}": { - "get": { - "operationId": "Registries_Get", - "tags": [ - "Registries" - ], - "description": "Gets the properties of the specified container registry.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/Registry" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "RegistryGet": { - "$ref": "./examples/RegistryGet.json" - } - } - }, - "put": { - "operationId": "Registries_Create", - "tags": [ - "Registries" - ], - "description": "Creates a container registry with the specified parameters.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "registry", - "in": "body", - "description": "The parameters for creating a container registry.", - "required": true, - "schema": { - "$ref": "#/definitions/Registry" - } - } - ], - "responses": { - "200": { - "description": "Resource 'Registry' update operation succeeded", - "schema": { - "$ref": "#/definitions/Registry" - } - }, - "201": { - "description": "Resource 'Registry' create operation succeeded", - "schema": { - "$ref": "#/definitions/Registry" - }, - "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": { - "RegistryCreate": { - "$ref": "./examples/RegistryCreate.json" - }, - "RegistryCreateAbac": { - "$ref": "./examples/RegistryCreateAbac.json" - }, - "RegistryCreateDomainNameLabelScope": { - "$ref": "./examples/RegistryCreateDomainNameLabelScope.json" - }, - "RegistryCreateZoneRedundant": { - "$ref": "./examples/RegistryCreateZoneRedundant.json" - } - }, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation", - "final-state-schema": "#/definitions/Registry" - }, - "x-ms-long-running-operation": true - }, - "patch": { - "operationId": "Registries_Update", - "tags": [ - "Registries" - ], - "description": "Updates a container registry with the specified parameters.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "registryUpdateParameters", - "in": "body", - "description": "The parameters for updating a container registry.", - "required": true, - "schema": { - "$ref": "#/definitions/RegistryUpdateParameters" - } - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/Registry" - } - }, - "201": { - "description": "Resource 'Registry' create operation succeeded", - "schema": { - "$ref": "#/definitions/Registry" - }, - "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": { - "RegistryUpdate": { - "$ref": "./examples/RegistryUpdate.json" - } - }, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation", - "final-state-schema": "#/definitions/Registry" - }, - "x-ms-long-running-operation": true - }, - "delete": { - "operationId": "Registries_Delete", - "tags": [ - "Registries" - ], - "description": "Deletes a container registry.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - } - ], - "responses": { - "200": { - "description": "Resource deleted successfully." - }, - "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": { - "RegistryDelete": { - "$ref": "./examples/RegistryDelete.json" - } - }, - "x-ms-long-running-operation-options": { - "final-state-via": "location" - }, - "x-ms-long-running-operation": true - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules": { - "get": { - "operationId": "CacheRules_List", - "tags": [ - "CacheRules" - ], - "description": "Lists all cache rule resources for the specified container registry.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/CacheRulesListResult" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "CacheRuleList": { - "$ref": "./examples/CacheRuleList.json" - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules/{cacheRuleName}": { - "get": { - "operationId": "CacheRules_Get", - "tags": [ - "CacheRules" - ], - "description": "Gets the properties of the specified cache rule resource.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "cacheRuleName", - "in": "path", - "description": "The name of the cache rule.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9-]*$" - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/CacheRule" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "CacheRuleGet": { - "$ref": "./examples/CacheRuleGet.json" - } - } - }, - "put": { - "operationId": "CacheRules_Create", - "tags": [ - "CacheRules" - ], - "description": "Creates a cache rule for a container registry with the specified parameters.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "cacheRuleName", - "in": "path", - "description": "The name of the cache rule.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9-]*$" - }, - { - "name": "cacheRuleCreateParameters", - "in": "body", - "description": "The parameters for creating a cache rule.", - "required": true, - "schema": { - "$ref": "#/definitions/CacheRule" - } - } - ], - "responses": { - "200": { - "description": "Resource 'CacheRule' update operation succeeded", - "schema": { - "$ref": "#/definitions/CacheRule" - } - }, - "201": { - "description": "Resource 'CacheRule' create operation succeeded", - "schema": { - "$ref": "#/definitions/CacheRule" - }, - "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": { - "CacheRuleCreate": { - "$ref": "./examples/CacheRuleCreate.json" - }, - "CacheRuleCreateUserAssignedMIAuthentication": { - "$ref": "./examples/CacheRuleCreateUserAssignedMIAuthentication.json" - } - }, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation", - "final-state-schema": "#/definitions/CacheRule" - }, - "x-ms-long-running-operation": true - }, - "patch": { - "operationId": "CacheRules_Update", - "tags": [ - "CacheRules" - ], - "description": "Updates a cache rule for a container registry with the specified parameters.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "cacheRuleName", - "in": "path", - "description": "The name of the cache rule.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9-]*$" - }, - { - "name": "cacheRuleUpdateParameters", - "in": "body", - "description": "The parameters for updating a cache rule.", - "required": true, - "schema": { - "$ref": "#/definitions/CacheRuleUpdateParameters" - } - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/CacheRule" - } - }, - "201": { - "description": "Resource 'CacheRule' create operation succeeded", - "schema": { - "$ref": "#/definitions/CacheRule" - }, - "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": { - "CacheRuleUpdate": { - "$ref": "./examples/CacheRuleUpdate.json" - } - }, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation", - "final-state-schema": "#/definitions/CacheRule" - }, - "x-ms-long-running-operation": true - }, - "delete": { - "operationId": "CacheRules_Delete", - "tags": [ - "CacheRules" - ], - "description": "Deletes a cache rule resource from a container registry.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "cacheRuleName", - "in": "path", - "description": "The name of the cache rule.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9-]*$" - } - ], - "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": { - "CacheRuleDelete": { - "$ref": "./examples/CacheRuleDelete.json" - } - }, - "x-ms-long-running-operation-options": { - "final-state-via": "location" - }, - "x-ms-long-running-operation": true - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries": { - "get": { - "operationId": "ConnectedRegistries_List", - "tags": [ - "ConnectedRegistries" - ], - "description": "Lists all connected registries for the specified container registry.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "$filter", - "in": "query", - "description": "An OData filter expression that describes a subset of connectedRegistries to return. The parameters that can be filtered are parent.id (the resource id of the connectedRegistry parent), mode, and connectionState. The supported operator is eq.", - "required": false, - "type": "string" - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/ConnectedRegistryListResult" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "ConnectedRegistryList": { - "$ref": "./examples/ConnectedRegistryList.json" - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}": { - "get": { - "operationId": "ConnectedRegistries_Get", - "tags": [ - "ConnectedRegistries" - ], - "description": "Gets the properties of the connected registry.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "connectedRegistryName", - "in": "path", - "description": "The name of the connected registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/ConnectedRegistry" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "ConnectedRegistryGet": { - "$ref": "./examples/ConnectedRegistryGet.json" - } - } - }, - "put": { - "operationId": "ConnectedRegistries_Create", - "tags": [ - "ConnectedRegistries" - ], - "description": "Creates a connected registry for a container registry with the specified parameters.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "connectedRegistryName", - "in": "path", - "description": "The name of the connected registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "connectedRegistryCreateParameters", - "in": "body", - "description": "The parameters for creating a connectedRegistry.", - "required": true, - "schema": { - "$ref": "#/definitions/ConnectedRegistry" - } - } - ], - "responses": { - "200": { - "description": "Resource 'ConnectedRegistry' update operation succeeded", - "schema": { - "$ref": "#/definitions/ConnectedRegistry" - } - }, - "201": { - "description": "Resource 'ConnectedRegistry' create operation succeeded", - "schema": { - "$ref": "#/definitions/ConnectedRegistry" - }, - "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": { - "ConnectedRegistryCreate": { - "$ref": "./examples/ConnectedRegistryCreate.json" - } - }, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation", - "final-state-schema": "#/definitions/ConnectedRegistry" - }, - "x-ms-long-running-operation": true - }, - "patch": { - "operationId": "ConnectedRegistries_Update", - "tags": [ - "ConnectedRegistries" - ], - "description": "Updates a connected registry with the specified parameters.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "connectedRegistryName", - "in": "path", - "description": "The name of the connected registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "connectedRegistryUpdateParameters", - "in": "body", - "description": "The parameters for updating a connectedRegistry.", - "required": true, - "schema": { - "$ref": "#/definitions/ConnectedRegistryUpdateParameters" - } - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/ConnectedRegistry" - } - }, - "201": { - "description": "Resource 'ConnectedRegistry' create operation succeeded", - "schema": { - "$ref": "#/definitions/ConnectedRegistry" - }, - "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": { - "ConnectedRegistryUpdate": { - "$ref": "./examples/ConnectedRegistryUpdate.json" - } - }, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation", - "final-state-schema": "#/definitions/ConnectedRegistry" - }, - "x-ms-long-running-operation": true - }, - "delete": { - "operationId": "ConnectedRegistries_Delete", - "tags": [ - "ConnectedRegistries" - ], - "description": "Deletes a connected registry from a container registry.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "connectedRegistryName", - "in": "path", - "description": "The name of the connected registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - } - ], - "responses": { - "200": { - "description": "Resource deleted successfully." - }, - "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": { - "ConnectedRegistryDelete": { - "$ref": "./examples/ConnectedRegistryDelete.json" - } - }, - "x-ms-long-running-operation-options": { - "final-state-via": "location" - }, - "x-ms-long-running-operation": true - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}/deactivate": { - "post": { - "operationId": "ConnectedRegistries_Deactivate", - "tags": [ - "ConnectedRegistries" - ], - "description": "Deactivates the connected registry instance.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "connectedRegistryName", - "in": "path", - "description": "The name of the connected registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully." - }, - "202": { - "description": "Resource operation 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." - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "ConnectedRegistryDeactivate": { - "$ref": "./examples/ConnectedRegistryDeactivate.json" - } - }, - "x-ms-long-running-operation-options": { - "final-state-via": "location" - }, - "x-ms-long-running-operation": true - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}/resync": { - "post": { - "operationId": "ConnectedRegistries_Resync", - "tags": [ - "ConnectedRegistries" - ], - "description": "Resync the connected registry instance.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "connectedRegistryName", - "in": "path", - "description": "The name of the connected registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/ConnectedRegistry" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "ConnectedRegistryResync": { - "$ref": "./examples/ConnectedRegistryResync.json" - } - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets": { - "get": { - "operationId": "CredentialSets_List", - "tags": [ - "CredentialSets" - ], - "description": "Lists all credential set resources for the specified container registry.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/CredentialSetListResult" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "CredentialSetList": { - "$ref": "./examples/CredentialSetList.json" - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets/{credentialSetName}": { - "get": { - "operationId": "CredentialSets_Get", - "tags": [ - "CredentialSets" - ], - "description": "Gets the properties of the specified credential set resource.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "credentialSetName", - "in": "path", - "description": "The name of the credential set.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9-]*$" - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/CredentialSet" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "CredentialSetGet": { - "$ref": "./examples/CredentialSetGet.json" - } - } - }, - "put": { - "operationId": "CredentialSets_Create", - "tags": [ - "CredentialSets" - ], - "description": "Creates a credential set for a container registry with the specified parameters.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "credentialSetName", - "in": "path", - "description": "The name of the credential set.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9-]*$" - }, - { - "name": "credentialSetCreateParameters", - "in": "body", - "description": "The parameters for creating a credential set.", - "required": true, - "schema": { - "$ref": "#/definitions/CredentialSet" - } - } - ], - "responses": { - "200": { - "description": "Resource 'CredentialSet' update operation succeeded", - "schema": { - "$ref": "#/definitions/CredentialSet" - } - }, - "201": { - "description": "Resource 'CredentialSet' create operation succeeded", - "schema": { - "$ref": "#/definitions/CredentialSet" - }, - "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": { - "CredentialSetCreate": { - "$ref": "./examples/CredentialSetCreate.json" - } - }, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation", - "final-state-schema": "#/definitions/CredentialSet" - }, - "x-ms-long-running-operation": true - }, - "patch": { - "operationId": "CredentialSets_Update", - "tags": [ - "CredentialSets" - ], - "description": "Updates a credential set for a container registry with the specified parameters.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "credentialSetName", - "in": "path", - "description": "The name of the credential set.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9-]*$" - }, - { - "name": "credentialSetUpdateParameters", - "in": "body", - "description": "The parameters for updating a credential set.", - "required": true, - "schema": { - "$ref": "#/definitions/CredentialSetUpdateParameters" - } - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/CredentialSet" - } - }, - "201": { - "description": "Resource 'CredentialSet' create operation succeeded", - "schema": { - "$ref": "#/definitions/CredentialSet" - }, - "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": { - "CredentialSetUpdate": { - "$ref": "./examples/CredentialSetUpdate.json" - } - }, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation", - "final-state-schema": "#/definitions/CredentialSet" - }, - "x-ms-long-running-operation": true - }, - "delete": { - "operationId": "CredentialSets_Delete", - "tags": [ - "CredentialSets" - ], - "description": "Deletes a credential set from a container registry.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "credentialSetName", - "in": "path", - "description": "The name of the credential set.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9-]*$" - } - ], - "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": { - "CredentialSetDelete": { - "$ref": "./examples/CredentialSetDelete.json" - } - }, - "x-ms-long-running-operation-options": { - "final-state-via": "location" - }, - "x-ms-long-running-operation": true - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines": { - "get": { - "operationId": "ExportPipelines_List", - "tags": [ - "ExportPipelines" - ], - "description": "Lists all export pipelines for the specified container registry.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/ExportPipelineListResult" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "ExportPipelineList": { - "$ref": "./examples/ExportPipelineList.json" - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines/{exportPipelineName}": { - "get": { - "operationId": "ExportPipelines_Get", - "tags": [ - "ExportPipelines" - ], - "description": "Gets the properties of the export pipeline.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "exportPipelineName", - "in": "path", - "description": "The name of the export pipeline.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/ExportPipeline" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "ExportPipelineGet": { - "$ref": "./examples/ExportPipelineGet.json" - } - } - }, - "put": { - "operationId": "ExportPipelines_Create", - "tags": [ - "ExportPipelines" - ], - "description": "Creates an export pipeline for a container registry with the specified parameters.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "exportPipelineName", - "in": "path", - "description": "The name of the export pipeline.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "exportPipelineCreateParameters", - "in": "body", - "description": "The parameters for creating an export pipeline.", - "required": true, - "schema": { - "$ref": "#/definitions/ExportPipeline" - } - } - ], - "responses": { - "200": { - "description": "Resource 'ExportPipeline' update operation succeeded", - "schema": { - "$ref": "#/definitions/ExportPipeline" - } - }, - "201": { - "description": "Resource 'ExportPipeline' create operation succeeded", - "schema": { - "$ref": "#/definitions/ExportPipeline" - }, - "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": { - "ExportPipelineCreate": { - "$ref": "./examples/ExportPipelineCreate.json" - } - }, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation", - "final-state-schema": "#/definitions/ExportPipeline" - }, - "x-ms-long-running-operation": true - }, - "delete": { - "operationId": "ExportPipelines_Delete", - "tags": [ - "ExportPipelines" - ], - "description": "Deletes an export pipeline from a container registry.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "exportPipelineName", - "in": "path", - "description": "The name of the export pipeline.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - } - ], - "responses": { - "200": { - "description": "Resource deleted successfully." - }, - "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": { - "ExportPipelineDelete": { - "$ref": "./examples/ExportPipelineDelete.json" - } - }, - "x-ms-long-running-operation-options": { - "final-state-via": "location" - }, - "x-ms-long-running-operation": true - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/generateCredentials": { - "post": { - "operationId": "Registries_GenerateCredentials", - "tags": [ - "Registries" - ], - "description": "Generate keys for a token of a specified container registry.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "generateCredentialsParameters", - "in": "body", - "description": "The parameters for generating credentials.", - "required": true, - "schema": { - "$ref": "#/definitions/GenerateCredentialsParameters" - } - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/GenerateCredentialsResult" - } - }, - "202": { - "description": "Resource operation 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." - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "RegistryGenerateCredentials": { - "$ref": "./examples/RegistryGenerateCredentials.json" - } - }, - "x-ms-long-running-operation-options": { - "final-state-via": "location", - "final-state-schema": "#/definitions/GenerateCredentialsResult" - }, - "x-ms-long-running-operation": true - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importImage": { - "post": { - "operationId": "Registries_ImportImage", - "tags": [ - "Registries" - ], - "description": "Copies an image to this container registry from the specified container registry.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "parameters", - "in": "body", - "description": "The parameters specifying the image to copy and the source container registry.", - "required": true, - "schema": { - "$ref": "#/definitions/ImportImageParameters" - } - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully." - }, - "202": { - "description": "Resource operation 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." - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "ImportImageByManifestDigest": { - "$ref": "./examples/ImportImageByManifestDigest.json" - }, - "ImportImageByTag": { - "$ref": "./examples/ImportImageByTag.json" - }, - "ImportImageFromPublicRegistry": { - "$ref": "./examples/ImportImageFromPublicRegistry.json" - } - }, - "x-ms-long-running-operation-options": { - "final-state-via": "location" - }, - "x-ms-long-running-operation": true - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines": { - "get": { - "operationId": "ImportPipelines_List", - "tags": [ - "ImportPipelines" - ], - "description": "Lists all import pipelines for the specified container registry.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/ImportPipelineListResult" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "ImportPipelineList": { - "$ref": "./examples/ImportPipelineList.json" - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines/{importPipelineName}": { - "get": { - "operationId": "ImportPipelines_Get", - "tags": [ - "ImportPipelines" - ], - "description": "Gets the properties of the import pipeline.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "importPipelineName", - "in": "path", - "description": "The name of the import pipeline.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/ImportPipeline" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "ImportPipelineGet": { - "$ref": "./examples/ImportPipelineGet.json" - } - } - }, - "put": { - "operationId": "ImportPipelines_Create", - "tags": [ - "ImportPipelines" - ], - "description": "Creates an import pipeline for a container registry with the specified parameters.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "importPipelineName", - "in": "path", - "description": "The name of the import pipeline.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "importPipelineCreateParameters", - "in": "body", - "description": "The parameters for creating an import pipeline.", - "required": true, - "schema": { - "$ref": "#/definitions/ImportPipeline" - } - } - ], - "responses": { - "200": { - "description": "Resource 'ImportPipeline' update operation succeeded", - "schema": { - "$ref": "#/definitions/ImportPipeline" - } - }, - "201": { - "description": "Resource 'ImportPipeline' create operation succeeded", - "schema": { - "$ref": "#/definitions/ImportPipeline" - }, - "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": { - "ImportPipelineCreate": { - "$ref": "./examples/ImportPipelineCreate.json" - } - }, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation", - "final-state-schema": "#/definitions/ImportPipeline" - }, - "x-ms-long-running-operation": true - }, - "delete": { - "operationId": "ImportPipelines_Delete", - "tags": [ - "ImportPipelines" - ], - "description": "Deletes an import pipeline from a container registry.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "importPipelineName", - "in": "path", - "description": "The name of the import pipeline.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - } - ], - "responses": { - "200": { - "description": "Resource deleted successfully." - }, - "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": { - "ImportPipelineDelete": { - "$ref": "./examples/ImportPipelineDelete.json" - } - }, - "x-ms-long-running-operation-options": { - "final-state-via": "location" - }, - "x-ms-long-running-operation": true - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listCredentials": { - "post": { - "operationId": "Registries_ListCredentials", - "tags": [ - "Registries" - ], - "description": "Lists the login credentials for the specified container registry.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/RegistryListCredentialsResult" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "RegistryListCredentials": { - "$ref": "./examples/RegistryListCredentials.json" - } - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listUsages": { - "get": { - "operationId": "Registries_ListUsages", - "tags": [ - "Registries" - ], - "description": "Gets the quota usages for the specified container registry.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/RegistryUsageListResult" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "RegistryListUsages": { - "$ref": "./examples/RegistryListUsages.json" - } - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives": { - "get": { - "operationId": "Archives_List", - "tags": [ - "Archives" - ], - "description": "Lists all archives for the specified container registry and package type.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "packageType", - "in": "path", - "description": "The package type.", - "required": true, - "type": "string", - "minLength": 3, - "maxLength": 50, - "pattern": "^[a-zA-Z]*$" - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/ArchiveListResult" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "ArchiveList": { - "$ref": "./examples/ArchiveList.json" - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}": { - "get": { - "operationId": "Archives_Get", - "tags": [ - "Archives" - ], - "description": "Gets the properties of the archive.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "packageType", - "in": "path", - "description": "The package type.", - "required": true, - "type": "string", - "minLength": 3, - "maxLength": 50, - "pattern": "^[a-zA-Z]*$" - }, - { - "name": "archiveName", - "in": "path", - "description": "The name of the archive resource.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 200, - "pattern": "^[a-zA-Z0-9-]*$" - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/Archive" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "ArchiveGet": { - "$ref": "./examples/ArchiveGet.json" - } - } - }, - "put": { - "operationId": "Archives_Create", - "tags": [ - "Archives" - ], - "description": "Creates a archive for a container registry with the specified parameters.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "packageType", - "in": "path", - "description": "The package type.", - "required": true, - "type": "string", - "minLength": 3, - "maxLength": 50, - "pattern": "^[a-zA-Z]*$" - }, - { - "name": "archiveName", - "in": "path", - "description": "The name of the archive resource.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 200, - "pattern": "^[a-zA-Z0-9-]*$" - }, - { - "name": "archiveCreateParameters", - "in": "body", - "description": "The parameters for creating a archive.", - "required": true, - "schema": { - "$ref": "#/definitions/Archive" - } - } - ], - "responses": { - "200": { - "description": "Resource 'Archive' update operation succeeded", - "schema": { - "$ref": "#/definitions/Archive" - } - }, - "201": { - "description": "Resource 'Archive' create operation succeeded", - "schema": { - "$ref": "#/definitions/Archive" - }, - "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": { - "ArchiveCreate": { - "$ref": "./examples/ArchiveCreate.json" - } - }, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation", - "final-state-schema": "#/definitions/Archive" - }, - "x-ms-long-running-operation": true - }, - "patch": { - "operationId": "Archives_Update", - "tags": [ - "Archives" - ], - "description": "Updates a archive for a container registry with the specified parameters.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "packageType", - "in": "path", - "description": "The package type.", - "required": true, - "type": "string", - "minLength": 3, - "maxLength": 50, - "pattern": "^[a-zA-Z]*$" - }, - { - "name": "archiveName", - "in": "path", - "description": "The name of the archive resource.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 200, - "pattern": "^[a-zA-Z0-9-]*$" - }, - { - "name": "archiveUpdateParameters", - "in": "body", - "description": "The parameters for updating a archive.", - "required": true, - "schema": { - "$ref": "#/definitions/ArchiveUpdateParameters" - } - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/Archive" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "ArchiveUpdate": { - "$ref": "./examples/ArchiveUpdate.json" - } - } - }, - "delete": { - "operationId": "Archives_Delete", - "tags": [ - "Archives" - ], - "description": "Deletes a archive from a container registry.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "packageType", - "in": "path", - "description": "The package type.", - "required": true, - "type": "string", - "minLength": 3, - "maxLength": 50, - "pattern": "^[a-zA-Z]*$" - }, - { - "name": "archiveName", - "in": "path", - "description": "The name of the archive resource.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 200, - "pattern": "^[a-zA-Z0-9-]*$" - } - ], - "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": { - "ArchiveDelete": { - "$ref": "./examples/ArchiveDelete.json" - } - }, - "x-ms-long-running-operation-options": { - "final-state-via": "location" - }, - "x-ms-long-running-operation": true - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}/versions": { - "get": { - "operationId": "ArchiveVersions_List", - "tags": [ - "ArchiveVersions" - ], - "description": "Lists all archive versions for the specified container registry, repository type and archive name.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "packageType", - "in": "path", - "description": "The package type.", - "required": true, - "type": "string", - "minLength": 3, - "maxLength": 50, - "pattern": "^[a-zA-Z]*$" - }, - { - "name": "archiveName", - "in": "path", - "description": "The name of the archive resource.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 200, - "pattern": "^[a-zA-Z0-9-]*$" - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/ArchiveVersionListResult" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "ArchiveVersionList": { - "$ref": "./examples/ArchiveVersionList.json" - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}/versions/{archiveVersionName}": { - "get": { - "operationId": "ArchiveVersions_Get", - "tags": [ - "ArchiveVersions" - ], - "description": "Gets the properties of the archive version.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "packageType", - "in": "path", - "description": "The package type.", - "required": true, - "type": "string", - "minLength": 3, - "maxLength": 50, - "pattern": "^[a-zA-Z]*$" - }, - { - "name": "archiveName", - "in": "path", - "description": "The name of the archive resource.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 200, - "pattern": "^[a-zA-Z0-9-]*$" - }, - { - "name": "archiveVersionName", - "in": "path", - "description": "The name of the archive version resource.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 200, - "pattern": "^[a-zA-Z0-9-]*$" - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/ArchiveVersion" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "ArchiveVersionGet": { - "$ref": "./examples/ArchiveVersionGet.json" - } - } - }, - "put": { - "operationId": "ArchiveVersions_Create", - "tags": [ - "ArchiveVersions" - ], - "description": "Creates a archive version for a container registry with the specified parameters.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "packageType", - "in": "path", - "description": "The package type.", - "required": true, - "type": "string", - "minLength": 3, - "maxLength": 50, - "pattern": "^[a-zA-Z]*$" - }, - { - "name": "archiveName", - "in": "path", - "description": "The name of the archive resource.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 200, - "pattern": "^[a-zA-Z0-9-]*$" - }, - { - "name": "archiveVersionName", - "in": "path", - "description": "The name of the archive version resource.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 200, - "pattern": "^[a-zA-Z0-9-]*$" - } - ], - "responses": { - "200": { - "description": "Resource 'ArchiveVersion' update operation succeeded", - "schema": { - "$ref": "#/definitions/ArchiveVersion" - } - }, - "201": { - "description": "Resource 'ArchiveVersion' create operation succeeded", - "schema": { - "$ref": "#/definitions/ArchiveVersion" - }, - "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": { - "ArchiveVersionCreate": { - "$ref": "./examples/ArchiveVersionCreate.json" - } - }, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation", - "final-state-schema": "#/definitions/ArchiveVersion" - }, - "x-ms-long-running-operation": true - }, - "delete": { - "operationId": "ArchiveVersions_Delete", - "tags": [ - "ArchiveVersions" - ], - "description": "Deletes a archive version from a container registry.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "packageType", - "in": "path", - "description": "The package type.", - "required": true, - "type": "string", - "minLength": 3, - "maxLength": 50, - "pattern": "^[a-zA-Z]*$" - }, - { - "name": "archiveName", - "in": "path", - "description": "The name of the archive resource.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 200, - "pattern": "^[a-zA-Z0-9-]*$" - }, - { - "name": "archiveVersionName", - "in": "path", - "description": "The name of the archive version resource.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 200, - "pattern": "^[a-zA-Z0-9-]*$" - } - ], - "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": { - "ArchiveVersionDelete": { - "$ref": "./examples/ArchiveVersionDelete.json" - } - }, - "x-ms-long-running-operation-options": { - "final-state-via": "location" - }, - "x-ms-long-running-operation": true - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns": { - "get": { - "operationId": "PipelineRuns_List", - "tags": [ - "PipelineRuns" - ], - "description": "Lists all the pipeline runs for the specified container registry.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/PipelineRunListResult" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "PipelineRunList": { - "$ref": "./examples/PipelineRunList.json" - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns/{pipelineRunName}": { - "get": { - "operationId": "PipelineRuns_Get", - "tags": [ - "PipelineRuns" - ], - "description": "Gets the detailed information for a given pipeline run.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "pipelineRunName", - "in": "path", - "description": "The name of the pipeline run.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/PipelineRun" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "PipelineRunGet": { - "$ref": "./examples/PipelineRunGet.json" - } - } - }, - "put": { - "operationId": "PipelineRuns_Create", - "tags": [ - "PipelineRuns" - ], - "description": "Creates a pipeline run for a container registry with the specified parameters", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "pipelineRunName", - "in": "path", - "description": "The name of the pipeline run.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "pipelineRunCreateParameters", - "in": "body", - "description": "The parameters for creating a pipeline run.", - "required": true, - "schema": { - "$ref": "#/definitions/PipelineRun" - } - } - ], - "responses": { - "200": { - "description": "Resource 'PipelineRun' update operation succeeded", - "schema": { - "$ref": "#/definitions/PipelineRun" - } - }, - "201": { - "description": "Resource 'PipelineRun' create operation succeeded", - "schema": { - "$ref": "#/definitions/PipelineRun" - }, - "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": { - "PipelineRunCreate_Export": { - "$ref": "./examples/PipelineRunCreate_Export.json" - }, - "PipelineRunCreate_Import": { - "$ref": "./examples/PipelineRunCreate_Import.json" - } - }, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation", - "final-state-schema": "#/definitions/PipelineRun" - }, - "x-ms-long-running-operation": true - }, - "delete": { - "operationId": "PipelineRuns_Delete", - "tags": [ - "PipelineRuns" - ], - "description": "Deletes a pipeline run from a container registry.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "pipelineRunName", - "in": "path", - "description": "The name of the pipeline run.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - } - ], - "responses": { - "200": { - "description": "Resource deleted successfully." - }, - "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": { - "PipelineRunDelete": { - "$ref": "./examples/PipelineRunDelete.json" - } - }, - "x-ms-long-running-operation-options": { - "final-state-via": "location" - }, - "x-ms-long-running-operation": true - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateEndpointConnections": { - "get": { - "operationId": "PrivateEndpointConnections_List", - "tags": [ - "PrivateEndpointConnections" - ], - "description": "List all private endpoint connections in a container registry.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/PrivateEndpointConnectionListResult" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "PrivateEndpointConnectionList": { - "$ref": "./examples/PrivateEndpointConnectionList.json" - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateEndpointConnections/{privateEndpointConnectionName}": { - "get": { - "operationId": "PrivateEndpointConnections_Get", - "tags": [ - "PrivateEndpointConnections" - ], - "description": "Get the specified private endpoint connection associated with the container registry.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "privateEndpointConnectionName", - "in": "path", - "description": "The name of the private endpoint connection.", - "required": true, - "type": "string" - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/PrivateEndpointConnection" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "PrivateEndpointConnectionGet": { - "$ref": "./examples/PrivateEndpointConnectionGet.json" - } - } - }, - "put": { - "operationId": "PrivateEndpointConnections_CreateOrUpdate", - "tags": [ - "PrivateEndpointConnections" - ], - "description": "Update the state of specified private endpoint connection associated with the container registry.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "privateEndpointConnectionName", - "in": "path", - "description": "The name of the private endpoint connection.", - "required": true, - "type": "string" - }, - { - "name": "privateEndpointConnection", - "in": "body", - "description": "The parameters for creating a private endpoint connection.", - "required": true, - "schema": { - "$ref": "#/definitions/PrivateEndpointConnection" - } - } - ], - "responses": { - "200": { - "description": "Resource 'PrivateEndpointConnection' update operation succeeded", - "schema": { - "$ref": "#/definitions/PrivateEndpointConnection" - } - }, - "201": { - "description": "Resource 'PrivateEndpointConnection' create operation succeeded", - "schema": { - "$ref": "#/definitions/PrivateEndpointConnection" - }, - "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": { - "PrivateEndpointConnectionCreateOrUpdate": { - "$ref": "./examples/PrivateEndpointConnectionCreateOrUpdate.json" - } - }, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation", - "final-state-schema": "#/definitions/PrivateEndpointConnection" - }, - "x-ms-long-running-operation": true - }, - "delete": { - "operationId": "PrivateEndpointConnections_Delete", - "tags": [ - "PrivateEndpointConnections" - ], - "description": "Deletes the specified private endpoint connection associated with the container registry.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "privateEndpointConnectionName", - "in": "path", - "description": "The name of the private endpoint connection.", - "required": true, - "type": "string" - } - ], - "responses": { - "200": { - "description": "Resource deleted successfully." - }, - "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": { - "PrivateEndpointConnectionDelete": { - "$ref": "./examples/PrivateEndpointConnectionDelete.json" - } - }, - "x-ms-long-running-operation-options": { - "final-state-via": "location" - }, - "x-ms-long-running-operation": true - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateLinkResources": { - "get": { - "operationId": "Registries_ListPrivateLinkResources", - "tags": [ - "PrivateLinkResources" - ], - "description": "Lists the private link resources for a container registry.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/PrivateLinkResourceListResult" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "RegistryListPrivateLinkResources": { - "$ref": "./examples/RegistryListPrivateLinkResources.json" - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateLinkResources/{groupName}": { - "get": { - "operationId": "Registries_GetPrivateLinkResource", - "tags": [ - "PrivateLinkResources" - ], - "description": "Gets a private link resource by a specified group name for a container registry.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "groupName", - "in": "path", - "description": "The name of the private link associated with the Azure resource.", - "required": true, - "type": "string" - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "../../../../../../common-types/resource-management/v6/privatelinks.json#/definitions/PrivateLinkResource" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "RegistryGetPrivateLinkResource": { - "$ref": "./examples/RegistryGetPrivateLinkResource.json" - } - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/regenerateCredential": { - "post": { - "operationId": "Registries_RegenerateCredential", - "tags": [ - "Registries" - ], - "description": "Regenerates one of the login credentials for the specified container registry.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "regenerateCredentialParameters", - "in": "body", - "description": "Specifies name of the password which should be regenerated -- password or password2.", - "required": true, - "schema": { - "$ref": "#/definitions/RegenerateCredentialParameters" - } - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/RegistryListCredentialsResult" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "RegistryRegenerateCredential": { - "$ref": "./examples/RegistryRegenerateCredential.json" - } - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications": { - "get": { - "operationId": "Replications_List", - "tags": [ - "Replications" - ], - "description": "Lists all the replications for the specified container registry.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/ReplicationListResult" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "ReplicationList": { - "$ref": "./examples/ReplicationList.json" - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications/{replicationName}": { - "get": { - "operationId": "Replications_Get", - "tags": [ - "Replications" - ], - "description": "Gets the properties of the specified replication.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "replicationName", - "in": "path", - "description": "The name of the replication.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/Replication" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "ReplicationGet": { - "$ref": "./examples/ReplicationGet.json" - } - } - }, - "put": { - "operationId": "Replications_Create", - "tags": [ - "Replications" - ], - "description": "Creates a replication for a container registry with the specified parameters.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "replicationName", - "in": "path", - "description": "The name of the replication.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "replication", - "in": "body", - "description": "The parameters for creating a replication.", - "required": true, - "schema": { - "$ref": "#/definitions/Replication" - } - } - ], - "responses": { - "200": { - "description": "Resource 'Replication' update operation succeeded", - "schema": { - "$ref": "#/definitions/Replication" - } - }, - "201": { - "description": "Resource 'Replication' create operation succeeded", - "schema": { - "$ref": "#/definitions/Replication" - }, - "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": { - "ReplicationCreate": { - "$ref": "./examples/ReplicationCreate.json" - }, - "ReplicationCreateZoneRedundant": { - "$ref": "./examples/ReplicationCreateZoneRedundant.json" - } - }, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation", - "final-state-schema": "#/definitions/Replication" - }, - "x-ms-long-running-operation": true - }, - "patch": { - "operationId": "Replications_Update", - "tags": [ - "Replications" - ], - "description": "Updates a replication for a container registry with the specified parameters.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "replicationName", - "in": "path", - "description": "The name of the replication.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "replicationUpdateParameters", - "in": "body", - "description": "The parameters for updating a replication.", - "required": true, - "schema": { - "$ref": "#/definitions/ReplicationUpdateParameters" - } - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/Replication" - } - }, - "201": { - "description": "Resource 'Replication' create operation succeeded", - "schema": { - "$ref": "#/definitions/Replication" - }, - "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": { - "ReplicationUpdate": { - "$ref": "./examples/ReplicationUpdate.json" - } - }, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation", - "final-state-schema": "#/definitions/Replication" - }, - "x-ms-long-running-operation": true - }, - "delete": { - "operationId": "Replications_Delete", - "tags": [ - "Replications" - ], - "description": "Deletes a replication from a container registry.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "replicationName", - "in": "path", - "description": "The name of the replication.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - } - ], - "responses": { - "200": { - "description": "Resource deleted successfully." - }, - "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": { - "ReplicationDelete": { - "$ref": "./examples/ReplicationDelete.json" - } - }, - "x-ms-long-running-operation-options": { - "final-state-via": "location" - }, - "x-ms-long-running-operation": true - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps": { - "get": { - "operationId": "ScopeMaps_List", - "tags": [ - "ScopeMaps" - ], - "description": "Lists all the scope maps for the specified container registry.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/ScopeMapListResult" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "ScopeMapList": { - "$ref": "./examples/ScopeMapList.json" - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps/{scopeMapName}": { - "get": { - "operationId": "ScopeMaps_Get", - "tags": [ - "ScopeMaps" - ], - "description": "Gets the properties of the specified scope map.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "scopeMapName", - "in": "path", - "description": "The name of the scope map.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9-_]*$" - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/ScopeMap" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "ScopeMapGet": { - "$ref": "./examples/ScopeMapGet.json" - } - } - }, - "put": { - "operationId": "ScopeMaps_Create", - "tags": [ - "ScopeMaps" - ], - "description": "Creates a scope map for a container registry with the specified parameters.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "scopeMapName", - "in": "path", - "description": "The name of the scope map.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9-_]*$" - }, - { - "name": "scopeMapCreateParameters", - "in": "body", - "description": "The parameters for creating a scope map.", - "required": true, - "schema": { - "$ref": "#/definitions/ScopeMap" - } - } - ], - "responses": { - "200": { - "description": "Resource 'ScopeMap' update operation succeeded", - "schema": { - "$ref": "#/definitions/ScopeMap" - } - }, - "201": { - "description": "Resource 'ScopeMap' create operation succeeded", - "schema": { - "$ref": "#/definitions/ScopeMap" - }, - "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": { - "ScopeMapCreate": { - "$ref": "./examples/ScopeMapCreate.json" - } - }, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation", - "final-state-schema": "#/definitions/ScopeMap" - }, - "x-ms-long-running-operation": true - }, - "patch": { - "operationId": "ScopeMaps_Update", - "tags": [ - "ScopeMaps" - ], - "description": "Updates a scope map with the specified parameters.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "scopeMapName", - "in": "path", - "description": "The name of the scope map.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9-_]*$" - }, - { - "name": "scopeMapUpdateParameters", - "in": "body", - "description": "The parameters for updating a scope map.", - "required": true, - "schema": { - "$ref": "#/definitions/ScopeMapUpdateParameters" - } - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/ScopeMap" - } - }, - "201": { - "description": "Resource 'ScopeMap' create operation succeeded", - "schema": { - "$ref": "#/definitions/ScopeMap" - }, - "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": { - "ScopeMapUpdate": { - "$ref": "./examples/ScopeMapUpdate.json" - } - }, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation", - "final-state-schema": "#/definitions/ScopeMap" - }, - "x-ms-long-running-operation": true - }, - "delete": { - "operationId": "ScopeMaps_Delete", - "tags": [ - "ScopeMaps" - ], - "description": "Deletes a scope map from a container registry.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "scopeMapName", - "in": "path", - "description": "The name of the scope map.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9-_]*$" - } - ], - "responses": { - "200": { - "description": "Resource deleted successfully." - }, - "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": { - "ScopeMapDelete": { - "$ref": "./examples/ScopeMapDelete.json" - } - }, - "x-ms-long-running-operation-options": { - "final-state-via": "location" - }, - "x-ms-long-running-operation": true - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens": { - "get": { - "operationId": "Tokens_List", - "tags": [ - "Tokens" - ], - "description": "Lists all the tokens for the specified container registry.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/TokenListResult" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "TokenList": { - "$ref": "./examples/TokenList.json" - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens/{tokenName}": { - "get": { - "operationId": "Tokens_Get", - "tags": [ - "Tokens" - ], - "description": "Gets the properties of the specified token.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "tokenName", - "in": "path", - "description": "The name of the token.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9-]*$" - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/Token" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "TokenGet": { - "$ref": "./examples/TokenGet.json" - } - } - }, - "put": { - "operationId": "Tokens_Create", - "tags": [ - "Tokens" - ], - "description": "Creates a token for a container registry with the specified parameters.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "tokenName", - "in": "path", - "description": "The name of the token.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9-]*$" - }, - { - "name": "tokenCreateParameters", - "in": "body", - "description": "The parameters for creating a token.", - "required": true, - "schema": { - "$ref": "#/definitions/Token" - } - } - ], - "responses": { - "200": { - "description": "Resource 'Token' update operation succeeded", - "schema": { - "$ref": "#/definitions/Token" - } - }, - "201": { - "description": "Resource 'Token' create operation succeeded", - "schema": { - "$ref": "#/definitions/Token" - }, - "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": { - "TokenCreate": { - "$ref": "./examples/TokenCreate.json" - } - }, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation", - "final-state-schema": "#/definitions/Token" - }, - "x-ms-long-running-operation": true - }, - "patch": { - "operationId": "Tokens_Update", - "tags": [ - "Tokens" - ], - "description": "Updates a token with the specified parameters.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "tokenName", - "in": "path", - "description": "The name of the token.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9-]*$" - }, - { - "name": "tokenUpdateParameters", - "in": "body", - "description": "The parameters for updating a token.", - "required": true, - "schema": { - "$ref": "#/definitions/TokenUpdateParameters" - } - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/Token" - } - }, - "201": { - "description": "Resource 'Token' create operation succeeded", - "schema": { - "$ref": "#/definitions/Token" - }, - "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": { - "TokenUpdate": { - "$ref": "./examples/TokenUpdate.json" - } - }, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation", - "final-state-schema": "#/definitions/Token" - }, - "x-ms-long-running-operation": true - }, - "delete": { - "operationId": "Tokens_Delete", - "tags": [ - "Tokens" - ], - "description": "Deletes a token from a container registry.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "tokenName", - "in": "path", - "description": "The name of the token.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9-]*$" - } - ], - "responses": { - "200": { - "description": "Resource deleted successfully." - }, - "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": { - "TokenDelete": { - "$ref": "./examples/TokenDelete.json" - } - }, - "x-ms-long-running-operation-options": { - "final-state-via": "location" - }, - "x-ms-long-running-operation": true - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks": { - "get": { - "operationId": "Webhooks_List", - "tags": [ - "Webhooks" - ], - "description": "Lists all the webhooks for the specified container registry.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/WebhookListResult" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "WebhookList": { - "$ref": "./examples/WebhookList.json" - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}": { - "get": { - "operationId": "Webhooks_Get", - "tags": [ - "Webhooks" - ], - "description": "Gets the properties of the specified webhook.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "webhookName", - "in": "path", - "description": "The name of the webhook.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/Webhook" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "WebhookGet": { - "$ref": "./examples/WebhookGet.json" - } - } - }, - "put": { - "operationId": "Webhooks_Create", - "tags": [ - "Webhooks" - ], - "description": "Creates a webhook for a container registry with the specified parameters.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "webhookName", - "in": "path", - "description": "The name of the webhook.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "webhookCreateParameters", - "in": "body", - "description": "The parameters for creating a webhook.", - "required": true, - "schema": { - "$ref": "#/definitions/WebhookCreateParameters" - } - } - ], - "responses": { - "200": { - "description": "Resource 'Webhook' update operation succeeded", - "schema": { - "$ref": "#/definitions/Webhook" - } - }, - "201": { - "description": "Resource 'Webhook' create operation succeeded", - "schema": { - "$ref": "#/definitions/Webhook" - }, - "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": { - "WebhookCreate": { - "$ref": "./examples/WebhookCreate.json" - } - }, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation", - "final-state-schema": "#/definitions/Webhook" - }, - "x-ms-long-running-operation": true - }, - "patch": { - "operationId": "Webhooks_Update", - "tags": [ - "Webhooks" - ], - "description": "Updates a webhook with the specified parameters.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "webhookName", - "in": "path", - "description": "The name of the webhook.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "webhookUpdateParameters", - "in": "body", - "description": "The parameters for updating a webhook.", - "required": true, - "schema": { - "$ref": "#/definitions/WebhookUpdateParameters" - } - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/Webhook" - } - }, - "201": { - "description": "Resource 'Webhook' create operation succeeded", - "schema": { - "$ref": "#/definitions/Webhook" - }, - "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": { - "WebhookUpdate": { - "$ref": "./examples/WebhookUpdate.json" - } - }, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation", - "final-state-schema": "#/definitions/Webhook" - }, - "x-ms-long-running-operation": true - }, - "delete": { - "operationId": "Webhooks_Delete", - "tags": [ - "Webhooks" - ], - "description": "Deletes a webhook from a container registry.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "webhookName", - "in": "path", - "description": "The name of the webhook.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - } - ], - "responses": { - "200": { - "description": "Resource deleted successfully." - }, - "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": { - "WebhookDelete": { - "$ref": "./examples/WebhookDelete.json" - } - }, - "x-ms-long-running-operation-options": { - "final-state-via": "location" - }, - "x-ms-long-running-operation": true - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/getCallbackConfig": { - "post": { - "operationId": "Webhooks_GetCallbackConfig", - "tags": [ - "Webhooks" - ], - "description": "Gets the configuration of service URI and custom headers for the webhook.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "webhookName", - "in": "path", - "description": "The name of the webhook.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/CallbackConfig" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "WebhookGetCallbackConfig": { - "$ref": "./examples/WebhookGetCallbackConfig.json" - } - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/listEvents": { - "post": { - "operationId": "Webhooks_ListEvents", - "tags": [ - "Webhooks" - ], - "description": "Lists recent events for the specified webhook.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "webhookName", - "in": "path", - "description": "The name of the webhook.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/EventListResult" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "WebhookListEvents": { - "$ref": "./examples/WebhookListEvents.json" - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/ping": { - "post": { - "operationId": "Webhooks_Ping", - "tags": [ - "Webhooks" - ], - "description": "Triggers a ping event to be sent to the webhook.", - "parameters": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "registryName", - "in": "path", - "description": "The name of the container registry.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - { - "name": "webhookName", - "in": "path", - "description": "The name of the webhook.", - "required": true, - "type": "string", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/EventInfo" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "WebhookPing": { - "$ref": "./examples/WebhookPing.json" - } - } - } - } - }, - "definitions": { - "ActionsRequired": { - "type": "string", - "description": "A message indicating if changes on the service provider require any updates on the consumer.", - "enum": [ - "None", - "Recreate" - ], - "x-ms-enum": { - "name": "ActionsRequired", - "modelAsString": true, - "values": [ - { - "name": "None", - "value": "None" - }, - { - "name": "Recreate", - "value": "Recreate" - } - ] - } - }, - "ActivationProperties": { - "type": "object", - "description": "The activation properties of the connected registry.", - "properties": { - "status": { - "$ref": "#/definitions/ActivationStatus", - "description": "The activation status of the connected registry.", - "readOnly": true - } - } - }, - "ActivationStatus": { - "type": "string", - "description": "The activation status of the connected registry.", - "enum": [ - "Active", - "Inactive" - ], - "x-ms-enum": { - "name": "ActivationStatus", - "modelAsString": true, - "values": [ - { - "name": "Active", - "value": "Active" - }, - { - "name": "Inactive", - "value": "Inactive" - } - ] - } - }, - "Actor": { - "type": "object", - "description": "The agent that initiated the event. For most situations, this could be from the authorization context of the request.", - "properties": { - "name": { - "type": "string", - "description": "The subject or username associated with the request context that generated the event." - } - } - }, - "Archive": { - "type": "object", - "description": "An object that represents a archive for a container registry.", - "properties": { - "properties": { - "$ref": "#/definitions/ArchiveProperties", - "description": "The properties of the archive.", - "x-ms-client-flatten": true - } - }, - "allOf": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ProxyResource" - } - ] - }, - "ArchiveListResult": { - "type": "object", - "description": "The result of a request to list archives for a container registry.", - "properties": { - "value": { - "type": "array", - "description": "The list of archives. Since this list may be incomplete, the nextLink field should be used to request the next list of archives.", - "items": { - "$ref": "#/definitions/Archive" - } - }, - "nextLink": { - "type": "string", - "description": "The URI that can be used to request the next list of archives." - } - } - }, - "ArchivePackageSourceProperties": { - "type": "object", - "description": "The properties of the archive package source.", - "properties": { - "type": { - "$ref": "#/definitions/PackageSourceType", - "description": "The type of package source for a archive." - }, - "url": { - "type": "string", - "description": "The external repository url." - } - } - }, - "ArchiveProperties": { - "type": "object", - "description": "The properties of a archive.", - "properties": { - "packageSource": { - "$ref": "#/definitions/ArchivePackageSourceProperties", - "description": "The package source of the archive." - }, - "publishedVersion": { - "type": "string", - "description": "The published version of the archive." - }, - "repositoryEndpointPrefix": { - "type": "string" - }, - "repositoryEndpoint": { - "type": "string", - "readOnly": true - }, - "provisioningState": { - "$ref": "#/definitions/ProvisioningState", - "description": "The provisioning state of the archive at the time the operation was called.", - "readOnly": true - } - } - }, - "ArchiveUpdateParameters": { - "type": "object", - "description": "The parameters for updating a archive.", - "properties": { - "properties": { - "$ref": "#/definitions/ArchiveUpdateProperties", - "description": "The properties of the connected registry update parameters.", - "x-ms-client-flatten": true - } - } - }, - "ArchiveUpdateProperties": { - "type": "object", - "description": "The properties of a archive.", - "properties": { - "publishedVersion": { - "type": "string", - "description": "The published version of the archive." - } - } - }, - "ArchiveVersion": { - "type": "object", - "description": "An object that represents an export pipeline for a container registry.", - "properties": { - "properties": { - "$ref": "#/definitions/ArchiveVersionProperties", - "description": "The properties of the archive.", - "x-ms-client-flatten": true - } - }, - "allOf": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ProxyResource" - } - ] - }, - "ArchiveVersionListResult": { - "type": "object", - "description": "The result of a request to list archive versions for a container registry.", - "properties": { - "value": { - "type": "array", - "description": "The list of archive versions. Since this list may be incomplete, the nextLink field should be used to request the next list of archive versions.", - "items": { - "$ref": "#/definitions/ArchiveVersion" - } - }, - "nextLink": { - "type": "string", - "description": "The URI that can be used to request the next list of archive versions." - } - } - }, - "ArchiveVersionProperties": { - "type": "object", - "description": "The properties of an archive version.", - "properties": { - "provisioningState": { - "$ref": "#/definitions/ProvisioningState", - "description": "The provisioning state of the archive at the time the operation was called.", - "readOnly": true - }, - "archiveVersionErrorMessage": { - "type": "string", - "description": "The detailed error message for the archive version in the case of failure." - } - } - }, - "AuthCredential": { - "type": "object", - "description": "Authentication credential stored for an upstream.", - "properties": { - "name": { - "$ref": "#/definitions/CredentialName", - "description": "The name of the credential." - }, - "usernameSecretIdentifier": { - "type": "string", - "description": "KeyVault Secret URI for accessing the username." - }, - "passwordSecretIdentifier": { - "type": "string", - "description": "KeyVault Secret URI for accessing the password." - }, - "credentialHealth": { - "$ref": "#/definitions/CredentialHealth", - "description": "This provides data pertaining to the health of the auth credential.", - "readOnly": true - } - } - }, - "AzureADAuthenticationAsArmPolicy": { - "type": "object", - "description": "The policy for using Azure Resource Manager audience token for a container registry.", - "properties": { - "status": { - "type": "string", - "description": "The value that indicates whether the policy is enabled or not.", - "default": "enabled", - "enum": [ - "enabled", - "disabled" - ], - "x-ms-enum": { - "name": "AzureADAuthenticationAsArmPolicyStatus", - "modelAsString": true, - "values": [ - { - "name": "enabled", - "value": "enabled" - }, - { - "name": "disabled", - "value": "disabled" - } - ] - } - } - } - }, - "CacheRule": { - "type": "object", - "description": "An object that represents a cache rule for a container registry.", - "properties": { - "properties": { - "$ref": "#/definitions/CacheRuleProperties", - "description": "The properties of the cache rule.", - "x-ms-client-flatten": true - }, - "identity": { - "$ref": "#/definitions/IdentityProperties", - "description": "The identity of the cache rule." - } - }, - "allOf": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ProxyResource" - } - ] - }, - "CacheRuleProperties": { - "type": "object", - "description": "The properties of a cache rule.", - "properties": { - "credentialSetResourceId": { - "type": "string", - "description": "The ARM resource ID of the credential store which is associated with the cache rule." - }, - "sourceRepository": { - "type": "string", - "description": "Source repository pulled from upstream." - }, - "targetRepository": { - "type": "string", - "description": "Target repository specified in docker pull command.\nEg: docker pull myregistry.azurecr.io/{targetRepository}:{tag}" - }, - "creationDate": { - "type": "string", - "format": "date-time", - "description": "The creation date of the cache rule.", - "readOnly": true - }, - "provisioningState": { - "$ref": "#/definitions/ProvisioningState", - "description": "Provisioning state of the resource.", - "readOnly": true - } - } - }, - "CacheRuleUpdateParameters": { - "type": "object", - "description": "The parameters for updating a cache rule.", - "properties": { - "properties": { - "$ref": "#/definitions/CacheRuleUpdateProperties", - "description": "The properties of the cache rule update parameters.", - "x-ms-client-flatten": true - }, - "identity": { - "$ref": "#/definitions/IdentityProperties", - "description": "The identity of the cache rule." - } - } - }, - "CacheRuleUpdateProperties": { - "type": "object", - "description": "The parameters for updating cache rule properties.", - "properties": { - "credentialSetResourceId": { - "type": "string", - "description": "The ARM resource ID of the credential store which is associated with the Cache rule." - } - } - }, - "CacheRulesListResult": { - "type": "object", - "description": "The result of a request to list cache rules for a container registry.", - "properties": { - "value": { - "type": "array", - "description": "The list of cache rules. Since this list may be incomplete, the nextLink field should be used to request the next list of cache rules.", - "items": { - "$ref": "#/definitions/CacheRule" - } - }, - "nextLink": { - "type": "string", - "description": "The URI that can be used to request the next list of cache rules." - } - } - }, - "CallbackConfig": { - "type": "object", - "description": "The configuration of service URI and custom headers for the webhook.", - "properties": { - "serviceUri": { - "type": "string", - "description": "The service URI for the webhook to post notifications." - }, - "customHeaders": { - "type": "object", - "description": "Custom headers that will be added to the webhook notifications.", - "additionalProperties": { - "type": "string" - } - } - }, - "required": [ - "serviceUri" - ] - }, - "CertificateType": { - "type": "string", - "description": "The type of certificate location.", - "enum": [ - "LocalDirectory" - ], - "x-ms-enum": { - "name": "CertificateType", - "modelAsString": true, - "values": [ - { - "name": "LocalDirectory", - "value": "LocalDirectory" - } - ] - } - }, - "ConnectedRegistry": { - "type": "object", - "description": "An object that represents a connected registry for a container registry.", - "properties": { - "properties": { - "$ref": "#/definitions/ConnectedRegistryProperties", - "description": "The properties of the connected registry.", - "x-ms-client-flatten": true - } - }, - "allOf": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ProxyResource" - } - ] - }, - "ConnectedRegistryListResult": { - "type": "object", - "description": "The result of a request to list connected registries for a container registry.", - "properties": { - "value": { - "type": "array", - "description": "The list of connected registries. Since this list may be incomplete, the nextLink field should be used to request the next list of connected registries.", - "items": { - "$ref": "#/definitions/ConnectedRegistry" - } - }, - "nextLink": { - "type": "string", - "description": "The URI that can be used to request the next list of connected registries." - } - } - }, - "ConnectedRegistryMode": { - "type": "string", - "description": "The mode of the connected registry resource that indicates the permissions of the registry.", - "enum": [ - "ReadWrite", - "ReadOnly", - "Registry", - "Mirror" - ], - "x-ms-enum": { - "name": "ConnectedRegistryMode", - "modelAsString": true, - "values": [ - { - "name": "ReadWrite", - "value": "ReadWrite" - }, - { - "name": "ReadOnly", - "value": "ReadOnly" - }, - { - "name": "Registry", - "value": "Registry" - }, - { - "name": "Mirror", - "value": "Mirror" - } - ] - } - }, - "ConnectedRegistryProperties": { - "type": "object", - "description": "The properties of a connected registry.", - "properties": { - "provisioningState": { - "$ref": "#/definitions/ProvisioningState", - "description": "Provisioning state of the resource.", - "readOnly": true - }, - "mode": { - "$ref": "#/definitions/ConnectedRegistryMode", - "description": "The mode of the connected registry resource that indicates the permissions of the registry." - }, - "version": { - "type": "string", - "description": "The current version of ACR runtime on the connected registry.", - "readOnly": true - }, - "connectionState": { - "$ref": "#/definitions/ConnectionState", - "description": "The current connection state of the connected registry.", - "readOnly": true - }, - "lastActivityTime": { - "type": "string", - "format": "date-time", - "description": "The last activity time of the connected registry.", - "readOnly": true - }, - "activation": { - "$ref": "#/definitions/ActivationProperties", - "description": "The activation properties of the connected registry.", - "readOnly": true - }, - "parent": { - "$ref": "#/definitions/ParentProperties", - "description": "The parent of the connected registry." - }, - "clientTokenIds": { - "type": "array", - "description": "The list of the ACR token resource IDs used to authenticate clients to the connected registry.", - "items": { - "type": "string" - } - }, - "loginServer": { - "$ref": "#/definitions/LoginServerProperties", - "description": "The login server properties of the connected registry." - }, - "logging": { - "$ref": "#/definitions/LoggingProperties", - "description": "The logging properties of the connected registry." - }, - "statusDetails": { - "type": "array", - "description": "The list of current statuses of the connected registry.", - "items": { - "$ref": "#/definitions/StatusDetailProperties" - }, - "readOnly": true, - "x-ms-identifiers": [ - "correlationId" - ] - }, - "notificationsList": { - "type": "array", - "description": "The list of notifications subscription information for the connected registry.", - "items": { - "type": "string" - } - }, - "garbageCollection": { - "$ref": "#/definitions/GarbageCollectionProperties", - "description": "The garbage collection properties of the connected registry." - }, - "registrySyncResult": { - "$ref": "#/definitions/RegistrySyncResult", - "description": "The result of the connected registry's most recent sync with its parent." - } - }, - "required": [ - "mode", - "parent" - ] - }, - "ConnectedRegistryUpdateParameters": { - "type": "object", - "description": "The parameters for updating a connected registry.", - "properties": { - "properties": { - "$ref": "#/definitions/ConnectedRegistryUpdateProperties", - "description": "The properties of the connected registry update parameters.", - "x-ms-client-flatten": true - } - } - }, - "ConnectedRegistryUpdateProperties": { - "type": "object", - "description": "The parameters for updating token properties.", - "properties": { - "syncProperties": { - "$ref": "#/definitions/SyncUpdateProperties", - "description": "The sync properties of the connected registry with its parent." - }, - "logging": { - "$ref": "#/definitions/LoggingProperties", - "description": "The logging properties of the connected registry." - }, - "clientTokenIds": { - "type": "array", - "description": "The list of the ACR token resource IDs used to authenticate clients to the connected registry.", - "items": { - "type": "string" - } - }, - "notificationsList": { - "type": "array", - "description": "The list of notifications subscription information for the connected registry.", - "items": { - "type": "string" - } - }, - "garbageCollection": { - "$ref": "#/definitions/GarbageCollectionProperties", - "description": "The garbage collection properties of the connected registry." - } - } - }, - "ConnectionState": { - "type": "string", - "description": "The current connection state of the connected registry.", - "enum": [ - "Online", - "Offline", - "Syncing", - "Unhealthy" - ], - "x-ms-enum": { - "name": "ConnectionState", - "modelAsString": true, - "values": [ - { - "name": "Online", - "value": "Online" - }, - { - "name": "Offline", - "value": "Offline" - }, - { - "name": "Syncing", - "value": "Syncing" - }, - { - "name": "Unhealthy", - "value": "Unhealthy" - } - ] - } - }, - "ConnectionStatus": { - "type": "string", - "description": "The private link service connection status.", - "enum": [ - "Approved", - "Pending", - "Rejected", - "Disconnected" - ], - "x-ms-enum": { - "name": "ConnectionStatus", - "modelAsString": true, - "values": [ - { - "name": "Approved", - "value": "Approved" - }, - { - "name": "Pending", - "value": "Pending" - }, - { - "name": "Rejected", - "value": "Rejected" - }, - { - "name": "Disconnected", - "value": "Disconnected" - } - ] - } - }, - "ContainerRegistryResourceType": { - "type": "string", - "description": "The resource type for Container Registry.", - "enum": [ - "Microsoft.ContainerRegistry/registries" - ], - "x-ms-enum": { - "name": "ContainerRegistryResourceType", - "modelAsString": false - } - }, - "CredentialHealth": { - "type": "object", - "description": "The health of the auth credential.", - "properties": { - "status": { - "$ref": "#/definitions/CredentialHealthStatus", - "description": "The health status of credential." - }, - "errorCode": { - "type": "string", - "description": "Error code representing the health check error." - }, - "errorMessage": { - "type": "string", - "description": "Descriptive message representing the health check error." - } - } - }, - "CredentialHealthStatus": { - "type": "string", - "description": "The health status of credential.", - "enum": [ - "Healthy", - "Unhealthy" - ], - "x-ms-enum": { - "name": "CredentialHealthStatus", - "modelAsString": true, - "values": [ - { - "name": "Healthy", - "value": "Healthy" - }, - { - "name": "Unhealthy", - "value": "Unhealthy" - } - ] - } - }, - "CredentialName": { - "type": "string", - "description": "The name of the credential.", - "enum": [ - "Credential1" - ], - "x-ms-enum": { - "name": "CredentialName", - "modelAsString": true, - "values": [ - { - "name": "Credential1", - "value": "Credential1" - } - ] - } - }, - "CredentialSet": { - "type": "object", - "description": "An object that represents a credential set resource for a container registry.", - "properties": { - "properties": { - "$ref": "#/definitions/CredentialSetProperties", - "description": "The properties of the credential set.", - "x-ms-client-flatten": true - }, - "identity": { - "$ref": "#/definitions/IdentityProperties", - "description": "Identities associated with the resource. This is used to access the KeyVault secrets." - } - }, - "allOf": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ProxyResource" - } - ] - }, - "CredentialSetListResult": { - "type": "object", - "description": "The result of a request to list credential sets for a container registry.", - "properties": { - "value": { - "type": "array", - "description": "The list of credential sets. Since this list may be incomplete, the nextLink field should be used to request the next list of credential sets.", - "items": { - "$ref": "#/definitions/CredentialSet" - } - }, - "nextLink": { - "type": "string", - "description": "The URI that can be used to request the next list of credential sets." - } - } - }, - "CredentialSetProperties": { - "type": "object", - "description": "The properties of a credential set resource.", - "properties": { - "loginServer": { - "type": "string", - "description": "The credentials are stored for this upstream or login server." - }, - "authCredentials": { - "type": "array", - "description": "List of authentication credentials stored for an upstream.\nUsually consists of a primary and an optional secondary credential.", - "items": { - "$ref": "#/definitions/AuthCredential" - }, - "x-ms-identifiers": [ - "name" - ] - }, - "creationDate": { - "type": "string", - "format": "date-time", - "description": "The creation date of credential store resource.", - "readOnly": true - }, - "provisioningState": { - "$ref": "#/definitions/ProvisioningState", - "description": "Provisioning state of the resource.", - "readOnly": true - } - } - }, - "CredentialSetUpdateParameters": { - "type": "object", - "description": "The parameters for updating a credential set", - "properties": { - "properties": { - "$ref": "#/definitions/CredentialSetUpdateProperties", - "description": "The properties of the credential set update parameters", - "x-ms-client-flatten": true - }, - "identity": { - "$ref": "#/definitions/IdentityProperties", - "description": "Identities associated with the resource. This is used to access the KeyVault secrets." - } - } - }, - "CredentialSetUpdateProperties": { - "type": "object", - "description": "The parameters for updating credential set properties.", - "properties": { - "authCredentials": { - "type": "array", - "description": "List of authentication credentials stored for an upstream.\nUsually consists of a primary and an optional secondary credential.", - "items": { - "$ref": "#/definitions/AuthCredential" - }, - "x-ms-identifiers": [ - "name" - ] - } - } - }, - "DebianArchivePackageSourceProperties": { - "type": "object", - "description": "The properties of the archive package source.", - "properties": { - "distributionName": { - "type": "string", - "description": "Upstream Debian distribution Name." - } - }, - "allOf": [ - { - "$ref": "#/definitions/ArchivePackageSourceProperties" - } - ] - }, - "DebianArchiveProperties": { - "type": "object", - "description": "The properties of the Debian package Archive.", - "properties": { - "distributionName": { - "type": "string", - "description": "Debian distribution Name." - } - }, - "allOf": [ - { - "$ref": "#/definitions/ArchiveProperties" - } - ] - }, - "EncryptionProperty": { - "type": "object", - "properties": { - "status": { - "$ref": "#/definitions/EncryptionStatus", - "description": "Indicates whether or not the encryption is enabled for container registry." - }, - "keyVaultProperties": { - "$ref": "#/definitions/KeyVaultProperties", - "description": "Key vault properties." - } - } - }, - "EncryptionStatus": { - "type": "string", - "description": "Indicates whether or not the encryption is enabled for container registry.", - "enum": [ - "enabled", - "disabled" - ], - "x-ms-enum": { - "name": "EncryptionStatus", - "modelAsString": true, - "values": [ - { - "name": "enabled", - "value": "enabled" - }, - { - "name": "disabled", - "value": "disabled" - } - ] - } - }, - "EndpointProtocol": { - "type": "string", - "description": "The connectivity protocol for the registry.", - "enum": [ - "IPv4", - "IPv4AndIPv6" - ], - "x-ms-enum": { - "name": "EndpointProtocol", - "modelAsString": true, - "values": [ - { - "name": "IPv4", - "value": "IPv4", - "description": "IPv4 connectivity only" - }, - { - "name": "IPv4AndIPv6", - "value": "IPv4AndIPv6", - "description": "IPv4 and IPv6 (dual stack) connectivity" - } - ] - } - }, - "Event": { - "type": "object", - "description": "The event for a webhook.", - "properties": { - "eventRequestMessage": { - "$ref": "#/definitions/EventRequestMessage", - "description": "The event request message sent to the service URI." - }, - "eventResponseMessage": { - "$ref": "#/definitions/EventResponseMessage", - "description": "The event response message received from the service URI." - } - }, - "allOf": [ - { - "$ref": "#/definitions/EventInfo" - } - ] - }, - "EventContent": { - "type": "object", - "description": "The content of the event request message.", - "properties": { - "id": { - "type": "string", - "description": "The event ID." - }, - "timestamp": { - "type": "string", - "format": "date-time", - "description": "The time at which the event occurred." - }, - "action": { - "type": "string", - "description": "The action that encompasses the provided event." - }, - "target": { - "$ref": "#/definitions/Target", - "description": "The target of the event." - }, - "request": { - "$ref": "#/definitions/Request", - "description": "The request that generated the event." - }, - "actor": { - "$ref": "#/definitions/Actor", - "description": "The agent that initiated the event. For most situations, this could be from the authorization context of the request." - }, - "source": { - "$ref": "#/definitions/Source", - "description": "The registry node that generated the event. Put differently, while the actor initiates the event, the source generates it." - } - } - }, - "EventInfo": { - "type": "object", - "description": "The basic information of an event.", - "properties": { - "id": { - "type": "string", - "description": "The event ID." - } - } - }, - "EventListResult": { - "type": "object", - "description": "The result of a request to list events for a webhook.", - "properties": { - "value": { - "type": "array", - "description": "The list of events. Since this list may be incomplete, the nextLink field should be used to request the next list of events.", - "items": { - "$ref": "#/definitions/Event" - } - }, - "nextLink": { - "type": "string", - "description": "The URI that can be used to request the next list of events." - } - } - }, - "EventRequestMessage": { - "type": "object", - "description": "The event request message sent to the service URI.", - "properties": { - "content": { - "$ref": "#/definitions/EventContent", - "description": "The content of the event request message." - }, - "headers": { - "type": "object", - "description": "The headers of the event request message.", - "additionalProperties": { - "type": "string" - } - }, - "method": { - "type": "string", - "description": "The HTTP method used to send the event request message." - }, - "requestUri": { - "type": "string", - "description": "The URI used to send the event request message." - }, - "version": { - "type": "string", - "description": "The HTTP message version." - } - } - }, - "EventResponseMessage": { - "type": "object", - "description": "The event response message received from the service URI.", - "properties": { - "content": { - "type": "string", - "description": "The content of the event response message." - }, - "headers": { - "type": "object", - "description": "The headers of the event response message.", - "additionalProperties": { - "type": "string" - } - }, - "reasonPhrase": { - "type": "string", - "description": "The reason phrase of the event response message." - }, - "statusCode": { - "type": "string", - "description": "The status code of the event response message." - }, - "version": { - "type": "string", - "description": "The HTTP message version." - } - } - }, - "ExportPipeline": { - "type": "object", - "description": "An object that represents an export pipeline for a container registry.", - "properties": { - "properties": { - "$ref": "#/definitions/ExportPipelineProperties", - "description": "The properties of the export pipeline.", - "x-ms-client-flatten": true - }, - "location": { - "type": "string", - "description": "The location of the export pipeline." - }, - "identity": { - "$ref": "#/definitions/IdentityProperties", - "description": "The identity of the export pipeline." - } - }, - "allOf": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ProxyResource" - } - ] - }, - "ExportPipelineListResult": { - "type": "object", - "description": "The result of a request to list export pipelines for a container registry.", - "properties": { - "value": { - "type": "array", - "description": "The list of export pipelines. Since this list may be incomplete, the nextLink field should be used to request the next list of export pipelines.", - "items": { - "$ref": "#/definitions/ExportPipeline" - } - }, - "nextLink": { - "type": "string", - "description": "The URI that can be used to request the next list of export pipelines." - } - } - }, - "ExportPipelineProperties": { - "type": "object", - "description": "The properties of an export pipeline.", - "properties": { - "target": { - "$ref": "#/definitions/ExportPipelineTargetProperties", - "description": "The target properties of the export pipeline." - }, - "options": { - "type": "array", - "description": "The list of all options configured for the pipeline.", - "items": { - "$ref": "#/definitions/PipelineOptions" - } - }, - "provisioningState": { - "$ref": "#/definitions/ProvisioningState", - "description": "The provisioning state of the pipeline at the time the operation was called.", - "readOnly": true - } - }, - "required": [ - "target" - ] - }, - "ExportPipelineTargetProperties": { - "type": "object", - "description": "The properties of the export pipeline target.", - "properties": { - "type": { - "type": "string", - "description": "The type of target for the export pipeline." - }, - "uri": { - "type": "string", - "description": "The target uri of the export pipeline.\nWhen 'AzureStorageBlob': \"https://accountName.blob.core.windows.net/containerName/blobName\"\nWhen 'AzureStorageBlobContainer': \"https://accountName.blob.core.windows.net/containerName\"" - }, - "keyVaultUri": { - "type": "string", - "description": "They key vault secret uri to obtain the target storage SAS token." - }, - "storageAccessMode": { - "type": "string", - "description": "The storage access mode used for the customer storage account.", - "default": "SasToken", - "enum": [ - "ManagedIdentity", - "SasToken" - ], - "x-ms-enum": { - "name": "StorageAccessMode", - "modelAsString": true, - "values": [ - { - "name": "ManagedIdentity", - "value": "ManagedIdentity", - "description": "Managed Identity access mode" - }, - { - "name": "SasToken", - "value": "SasToken", - "description": "SAS Token access mode" - } - ] - } - } - } - }, - "ExportPolicy": { - "type": "object", - "description": "The export policy for a container registry.", - "properties": { - "status": { - "type": "string", - "description": "The value that indicates whether the policy is enabled or not.", - "default": "enabled", - "enum": [ - "enabled", - "disabled" - ], - "x-ms-enum": { - "name": "ExportPolicyStatus", - "modelAsString": true, - "values": [ - { - "name": "enabled", - "value": "enabled" - }, - { - "name": "disabled", - "value": "disabled" - } - ] - } - } - } - }, - "GarbageCollectionProperties": { - "type": "object", - "description": "The garbage collection properties of the connected registry.", - "properties": { - "enabled": { - "type": "boolean", - "description": "Indicates whether garbage collection is enabled for the connected registry." - }, - "schedule": { - "type": "string", - "description": "The cron expression indicating the schedule that the connected registry will run garbage collection." - } - } - }, - "GenerateCredentialsParameters": { - "type": "object", - "description": "The parameters used to generate credentials for a specified token or user of a container registry.", - "properties": { - "tokenId": { - "type": "string", - "description": "The resource ID of the token for which credentials have to be generated." - }, - "expiry": { - "type": "string", - "format": "date-time", - "description": "The expiry date of the generated credentials after which the credentials become invalid." - }, - "name": { - "$ref": "#/definitions/TokenPasswordName", - "description": "Specifies name of the password which should be regenerated if any -- password1 or password2." - } - } - }, - "GenerateCredentialsResult": { - "type": "object", - "description": "The response from the GenerateCredentials operation.", - "properties": { - "username": { - "type": "string", - "description": "The username for a container registry." - }, - "passwords": { - "type": "array", - "description": "The list of passwords for a container registry.", - "items": { - "$ref": "#/definitions/TokenPassword" - }, - "x-ms-identifiers": [] - } - } - }, - "IPRule": { - "type": "object", - "description": "IP rule with specific IP or IP range in CIDR format.", - "properties": { - "action": { - "type": "string", - "description": "The action of IP ACL rule.", - "default": "Allow", - "enum": [ - "Allow" - ], - "x-ms-enum": { - "name": "Action", - "modelAsString": true, - "values": [ - { - "name": "Allow", - "value": "Allow" - } - ] - } - }, - "value": { - "type": "string", - "description": "Specifies the IP or IP range in CIDR format. Only IPV4 address is allowed.", - "x-ms-client-name": "IPAddressOrRange" - } - }, - "required": [ - "value" - ] - }, - "IdentityProperties": { - "type": "object", - "description": "Managed identity for the resource.", - "properties": { - "principalId": { - "type": "string", - "description": "The principal ID of resource identity.", - "readOnly": true - }, - "tenantId": { - "type": "string", - "description": "The tenant ID of resource.", - "readOnly": true - }, - "type": { - "$ref": "#/definitions/ResourceIdentityType", - "description": "The identity type." - }, - "userAssignedIdentities": { - "type": "object", - "description": "The list of user identities associated with the resource. The user identity\ndictionary key references will be ARM resource ids in the form:\n'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/\nproviders/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.", - "additionalProperties": { - "$ref": "#/definitions/UserIdentityProperties" - } - } - } - }, - "ImportImageParameters": { - "type": "object", - "properties": { - "source": { - "$ref": "#/definitions/ImportSource", - "description": "The source of the image." - }, - "targetTags": { - "type": "array", - "description": "List of strings of the form repo[:tag]. When tag is omitted the source will be used (or 'latest' if source tag is also omitted).", - "items": { - "type": "string" - } - }, - "untaggedTargetRepositories": { - "type": "array", - "description": "List of strings of repository names to do a manifest only copy. No tag will be created.", - "items": { - "type": "string" - } - }, - "mode": { - "type": "string", - "description": "When Force, any existing target tags will be overwritten. When NoForce, any existing target tags will fail the operation before any copying begins.", - "default": "NoForce", - "enum": [ - "NoForce", - "Force" - ], - "x-ms-enum": { - "name": "ImportMode", - "modelAsString": true, - "values": [ - { - "name": "NoForce", - "value": "NoForce" - }, - { - "name": "Force", - "value": "Force" - } - ] - } - } - }, - "required": [ - "source" - ] - }, - "ImportPipeline": { - "type": "object", - "description": "An object that represents an import pipeline for a container registry.", - "properties": { - "properties": { - "$ref": "#/definitions/ImportPipelineProperties", - "description": "The properties of the import pipeline.", - "x-ms-client-flatten": true - }, - "location": { - "type": "string", - "description": "The location of the import pipeline." - }, - "identity": { - "$ref": "#/definitions/IdentityProperties", - "description": "The identity of the import pipeline." - } - }, - "allOf": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ProxyResource" - } - ] - }, - "ImportPipelineListResult": { - "type": "object", - "description": "The result of a request to list import pipelines for a container registry.", - "properties": { - "value": { - "type": "array", - "description": "The list of import pipelines. Since this list may be incomplete, the nextLink field should be used to request the next list of import pipelines.", - "items": { - "$ref": "#/definitions/ImportPipeline" - } - }, - "nextLink": { - "type": "string", - "description": "The URI that can be used to request the next list of import pipelines." - } - } - }, - "ImportPipelineProperties": { - "type": "object", - "description": "The properties of an import pipeline.", - "properties": { - "source": { - "$ref": "#/definitions/ImportPipelineSourceProperties", - "description": "The source properties of the import pipeline." - }, - "trigger": { - "$ref": "#/definitions/PipelineTriggerProperties", - "description": "The properties that describe the trigger of the import pipeline." - }, - "options": { - "type": "array", - "description": "The list of all options configured for the pipeline.", - "items": { - "$ref": "#/definitions/PipelineOptions" - } - }, - "provisioningState": { - "$ref": "#/definitions/ProvisioningState", - "description": "The provisioning state of the pipeline at the time the operation was called.", - "readOnly": true - } - }, - "required": [ - "source" - ] - }, - "ImportPipelineSourceProperties": { - "type": "object", - "description": "The properties of the import pipeline source.", - "properties": { - "type": { - "type": "string", - "description": "The type of source for the import pipeline.", - "default": "AzureStorageBlobContainer", - "enum": [ - "AzureStorageBlobContainer" - ], - "x-ms-enum": { - "name": "PipelineSourceType", - "modelAsString": true, - "values": [ - { - "name": "AzureStorageBlobContainer", - "value": "AzureStorageBlobContainer" - } - ] - } - }, - "uri": { - "type": "string", - "description": "The source uri of the import pipeline.\nWhen 'AzureStorageBlob': \"https://accountName.blob.core.windows.net/containerName/blobName\"\nWhen 'AzureStorageBlobContainer': \"https://accountName.blob.core.windows.net/containerName\"" - }, - "keyVaultUri": { - "type": "string", - "description": "They key vault secret uri to obtain the source storage SAS token." - }, - "storageAccessMode": { - "type": "string", - "description": "The storage access mode used for the customer storage account.", - "default": "SasToken", - "enum": [ - "ManagedIdentity", - "SasToken" - ], - "x-ms-enum": { - "name": "StorageAccessMode", - "modelAsString": true, - "values": [ - { - "name": "ManagedIdentity", - "value": "ManagedIdentity", - "description": "Managed Identity access mode" - }, - { - "name": "SasToken", - "value": "SasToken", - "description": "SAS Token access mode" - } - ] - } - } - } - }, - "ImportSource": { - "type": "object", - "properties": { - "resourceId": { - "type": "string", - "description": "The resource identifier of the source Azure Container Registry." - }, - "registryUri": { - "type": "string", - "description": "The address of the source registry (e.g. 'mcr.microsoft.com')." - }, - "credentials": { - "$ref": "#/definitions/ImportSourceCredentials", - "description": "Credentials used when importing from a registry uri." - }, - "sourceImage": { - "type": "string", - "description": "Repository name of the source image.\nSpecify an image by repository ('hello-world'). This will use the 'latest' tag.\nSpecify an image by tag ('hello-world:latest').\nSpecify an image by sha256-based manifest digest ('hello-world@sha256:abc123')." - } - }, - "required": [ - "sourceImage" - ] - }, - "ImportSourceCredentials": { - "type": "object", - "properties": { - "username": { - "type": "string", - "description": "The username to authenticate with the source registry." - }, - "password": { - "type": "string", - "description": "The password used to authenticate with the source registry." - } - }, - "required": [ - "password" - ] - }, - "KeyVaultProperties": { - "type": "object", - "properties": { - "keyIdentifier": { - "type": "string", - "description": "Key vault uri to access the encryption key." - }, - "versionedKeyIdentifier": { - "type": "string", - "description": "The fully qualified key identifier that includes the version of the key that is actually used for encryption.", - "readOnly": true - }, - "identity": { - "type": "string", - "description": "The client id of the identity which will be used to access key vault." - }, - "keyRotationEnabled": { - "type": "boolean", - "description": "Auto key rotation status for a CMK enabled registry.", - "readOnly": true - }, - "lastKeyRotationTimestamp": { - "type": "string", - "format": "date-time", - "description": "Timestamp of the last successful key rotation.", - "readOnly": true - } - } - }, - "LoggingProperties": { - "type": "object", - "description": "The logging properties of the connected registry.", - "properties": { - "logLevel": { - "type": "string", - "description": "The verbosity of logs persisted on the connected registry.", - "default": "Information", - "enum": [ - "Debug", - "Information", - "Warning", - "Error", - "None" - ], - "x-ms-enum": { - "name": "LogLevel", - "modelAsString": true, - "values": [ - { - "name": "Debug", - "value": "Debug" - }, - { - "name": "Information", - "value": "Information" - }, - { - "name": "Warning", - "value": "Warning" - }, - { - "name": "Error", - "value": "Error" - }, - { - "name": "None", - "value": "None" - } - ] - } - }, - "auditLogStatus": { - "type": "string", - "description": "Indicates whether audit logs are enabled on the connected registry.", - "default": "Disabled", - "enum": [ - "Enabled", - "Disabled" - ], - "x-ms-enum": { - "name": "AuditLogStatus", - "modelAsString": true, - "values": [ - { - "name": "Enabled", - "value": "Enabled" - }, - { - "name": "Disabled", - "value": "Disabled" - } - ] - } - } - } - }, - "LoginServerProperties": { - "type": "object", - "description": "The login server properties of the connected registry.", - "properties": { - "host": { - "type": "string", - "description": "The host of the connected registry. Can be FQDN or IP.", - "readOnly": true - }, - "tls": { - "$ref": "#/definitions/TlsProperties", - "description": "The TLS properties of the connected registry login server.", - "readOnly": true - } - } - }, - "NetworkRuleSet": { - "type": "object", - "description": "The network rule set for a container registry.", - "properties": { - "defaultAction": { - "type": "string", - "description": "The default action of allow or deny when no other rules match.", - "default": "Allow", - "enum": [ - "Allow", - "Deny" - ], - "x-ms-enum": { - "name": "DefaultAction", - "modelAsString": true, - "values": [ - { - "name": "Allow", - "value": "Allow" - }, - { - "name": "Deny", - "value": "Deny" - } - ] - } - }, - "ipRules": { - "type": "array", - "description": "The IP ACL rules.", - "items": { - "$ref": "#/definitions/IPRule" - }, - "x-ms-identifiers": [] - } - }, - "required": [ - "defaultAction" - ] - }, - "OperationDefinition": { - "type": "object", - "description": "The definition of a container registry operation.", - "properties": { - "origin": { - "type": "string", - "description": "The origin information of the container registry operation." - }, - "name": { - "type": "string", - "description": "Operation name: {provider}/{resource}/{operation}." - }, - "display": { - "$ref": "#/definitions/OperationDisplayDefinition", - "description": "The display information for the container registry operation." - }, - "properties": { - "$ref": "#/definitions/OperationPropertiesDefinition", - "description": "The properties information for the container registry operation.", - "x-ms-client-flatten": true - }, - "isDataAction": { - "type": "boolean", - "description": "This property indicates if the operation is an action or a data action\nref: https://docs.microsoft.com/en-us/azure/role-based-access-control/role-definitions#management-and-data-operations" - } - } - }, - "OperationDisplayDefinition": { - "type": "object", - "description": "The display information for a container registry operation.", - "properties": { - "provider": { - "type": "string", - "description": "The resource provider name: Microsoft.ContainerRegistry." - }, - "resource": { - "type": "string", - "description": "The resource on which the operation is performed." - }, - "operation": { - "type": "string", - "description": "The operation that users can perform." - }, - "description": { - "type": "string", - "description": "The description for the operation." - } - } - }, - "OperationListResult": { - "type": "object", - "description": "The result of a request to list container registry operations.", - "properties": { - "value": { - "type": "array", - "description": "The list of container registry operations. Since this list may be incomplete, the nextLink field should be used to request the next list of operations.", - "items": { - "$ref": "#/definitions/OperationDefinition" - } - }, - "nextLink": { - "type": "string", - "description": "The URI that can be used to request the next list of container registry operations." - } - } - }, - "OperationLogSpecificationDefinition": { - "type": "object", - "description": "The definition of Azure Monitoring log.", - "properties": { - "name": { - "type": "string", - "description": "Log name." - }, - "displayName": { - "type": "string", - "description": "Log display name." - }, - "blobDuration": { - "type": "string", - "description": "Log blob duration." - } - } - }, - "OperationMetricSpecificationDefinition": { - "type": "object", - "description": "The definition of Azure Monitoring metric.", - "properties": { - "name": { - "type": "string", - "description": "Metric name." - }, - "displayName": { - "type": "string", - "description": "Metric display name." - }, - "displayDescription": { - "type": "string", - "description": "Metric description." - }, - "unit": { - "type": "string", - "description": "Metric unit." - }, - "aggregationType": { - "type": "string", - "description": "Metric aggregation type." - }, - "internalMetricName": { - "type": "string", - "description": "Internal metric name." - } - } - }, - "OperationPropertiesDefinition": { - "type": "object", - "description": "The definition of Azure Monitoring properties.", - "properties": { - "serviceSpecification": { - "$ref": "#/definitions/OperationServiceSpecificationDefinition", - "description": "The definition of Azure Monitoring service." - } - } - }, - "OperationServiceSpecificationDefinition": { - "type": "object", - "description": "The definition of Azure Monitoring list.", - "properties": { - "metricSpecifications": { - "type": "array", - "description": "A list of Azure Monitoring metrics definition.", - "items": { - "$ref": "#/definitions/OperationMetricSpecificationDefinition" - }, - "x-ms-identifiers": [ - "name" - ] - }, - "logSpecifications": { - "type": "array", - "description": "A list of Azure Monitoring log definitions.", - "items": { - "$ref": "#/definitions/OperationLogSpecificationDefinition" - }, - "x-ms-identifiers": [ - "name" - ] - } - } - }, - "PackageSourceType": { - "type": "string", - "description": "The type of package source for a archive.", - "enum": [ - "remote" - ], - "x-ms-enum": { - "name": "PackageSourceType", - "modelAsString": true, - "values": [ - { - "name": "remote", - "value": "remote" - } - ] - } - }, - "ParentProperties": { - "type": "object", - "description": "The properties of the connected registry parent.", - "properties": { - "id": { - "type": "string", - "format": "arm-id", - "description": "The resource ID of the parent to which the connected registry will be associated." - }, - "syncProperties": { - "$ref": "#/definitions/SyncProperties", - "description": "The sync properties of the connected registry with its parent." - } - }, - "required": [ - "syncProperties" - ] - }, - "PasswordName": { - "type": "string", - "description": "The password name.", - "enum": [ - "password", - "password2" - ], - "x-ms-enum": { - "name": "PasswordName", - "modelAsString": false - } - }, - "PipelineOptions": { - "type": "string", - "enum": [ - "OverwriteTags", - "OverwriteBlobs", - "DeleteSourceBlobOnSuccess", - "ContinueOnErrors" - ], - "x-ms-enum": { - "name": "PipelineOptions", - "modelAsString": true, - "values": [ - { - "name": "OverwriteTags", - "value": "OverwriteTags" - }, - { - "name": "OverwriteBlobs", - "value": "OverwriteBlobs" - }, - { - "name": "DeleteSourceBlobOnSuccess", - "value": "DeleteSourceBlobOnSuccess" - }, - { - "name": "ContinueOnErrors", - "value": "ContinueOnErrors" - } - ] - } - }, - "PipelineRun": { - "type": "object", - "description": "An object that represents a pipeline run for a container registry.", - "properties": { - "properties": { - "$ref": "#/definitions/PipelineRunProperties", - "description": "The properties of a pipeline run.", - "x-ms-client-flatten": true - } - }, - "allOf": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ProxyResource" - } - ] - }, - "PipelineRunListResult": { - "type": "object", - "description": "The result of a request to list pipeline runs for a container registry.", - "properties": { - "value": { - "type": "array", - "description": "The list of pipeline runs. Since this list may be incomplete, the nextLink field should be used to request the next list of pipeline runs.", - "items": { - "$ref": "#/definitions/PipelineRun" - } - }, - "nextLink": { - "type": "string", - "description": "The URI that can be used to request the next list of pipeline runs." - } - } - }, - "PipelineRunProperties": { - "type": "object", - "description": "The properties of a pipeline run.", - "properties": { - "provisioningState": { - "$ref": "#/definitions/ProvisioningState", - "description": "The provisioning state of a pipeline run.", - "readOnly": true - }, - "request": { - "$ref": "#/definitions/PipelineRunRequest", - "description": "The request parameters for a pipeline run." - }, - "response": { - "$ref": "#/definitions/PipelineRunResponse", - "description": "The response of a pipeline run.", - "readOnly": true - }, - "forceUpdateTag": { - "type": "string", - "description": "How the pipeline run should be forced to recreate even if the pipeline run configuration has not changed." - } - } - }, - "PipelineRunRequest": { - "type": "object", - "description": "The request properties provided for a pipeline run.", - "properties": { - "pipelineResourceId": { - "type": "string", - "description": "The resource ID of the pipeline to run." - }, - "artifacts": { - "type": "array", - "description": "List of source artifacts to be transferred by the pipeline. \nSpecify an image by repository ('hello-world'). This will use the 'latest' tag.\nSpecify an image by tag ('hello-world:latest').\nSpecify an image by sha256-based manifest digest ('hello-world@sha256:abc123').", - "items": { - "type": "string" - } - }, - "source": { - "$ref": "#/definitions/PipelineRunSourceProperties", - "description": "The source properties of the pipeline run." - }, - "target": { - "$ref": "#/definitions/PipelineRunTargetProperties", - "description": "The target properties of the pipeline run." - }, - "catalogDigest": { - "type": "string", - "description": "The digest of the tar used to transfer the artifacts." - } - } - }, - "PipelineRunResponse": { - "type": "object", - "description": "The response properties returned for a pipeline run.", - "properties": { - "status": { - "type": "string", - "description": "The current status of the pipeline run." - }, - "importedArtifacts": { - "type": "array", - "description": "The artifacts imported in the pipeline run.", - "items": { - "type": "string" - } - }, - "progress": { - "$ref": "#/definitions/ProgressProperties", - "description": "The current progress of the copy operation." - }, - "startTime": { - "type": "string", - "format": "date-time", - "description": "The time the pipeline run started." - }, - "finishTime": { - "type": "string", - "format": "date-time", - "description": "The time the pipeline run finished." - }, - "source": { - "$ref": "#/definitions/ImportPipelineSourceProperties", - "description": "The source of the pipeline run." - }, - "target": { - "$ref": "#/definitions/ExportPipelineTargetProperties", - "description": "The target of the pipeline run." - }, - "catalogDigest": { - "type": "string", - "description": "The digest of the tar used to transfer the artifacts." - }, - "trigger": { - "$ref": "#/definitions/PipelineTriggerDescriptor", - "description": "The trigger that caused the pipeline run." - }, - "pipelineRunErrorMessage": { - "type": "string", - "description": "The detailed error message for the pipeline run in the case of failure." - } - } - }, - "PipelineRunSourceProperties": { - "type": "object", - "description": "The pipeline run source properties", - "properties": { - "type": { - "type": "string", - "description": "The type of the source.", - "default": "AzureStorageBlob", - "enum": [ - "AzureStorageBlob" - ], - "x-ms-enum": { - "name": "PipelineRunSourceType", - "modelAsString": true, - "values": [ - { - "name": "AzureStorageBlob", - "value": "AzureStorageBlob" - } - ] - } - }, - "name": { - "type": "string", - "description": "The name of the source." - } - } - }, - "PipelineRunTargetProperties": { - "type": "object", - "description": "The pipeline run target properties", - "properties": { - "type": { - "type": "string", - "description": "The type of the target.", - "default": "AzureStorageBlob", - "enum": [ - "AzureStorageBlob" - ], - "x-ms-enum": { - "name": "PipelineRunTargetType", - "modelAsString": true, - "values": [ - { - "name": "AzureStorageBlob", - "value": "AzureStorageBlob" - } - ] - } - }, - "name": { - "type": "string", - "description": "The name of the target." - } - } - }, - "PipelineSourceTriggerDescriptor": { - "type": "object", - "description": "The pipeline source trigger descriptor.", - "properties": { - "timestamp": { - "type": "string", - "format": "date-time", - "description": "The timestamp when the source update happened." - } - } - }, - "PipelineSourceTriggerProperties": { - "type": "object", - "description": "The source trigger properties of the import pipeline", - "properties": { - "status": { - "type": "string", - "description": "The current status of the source trigger.", - "default": "Enabled", - "enum": [ - "Enabled", - "Disabled" - ], - "x-ms-enum": { - "name": "TriggerStatus", - "modelAsString": true, - "values": [ - { - "name": "Enabled", - "value": "Enabled" - }, - { - "name": "Disabled", - "value": "Disabled" - } - ] - } - } - }, - "required": [ - "status" - ] - }, - "PipelineTriggerDescriptor": { - "type": "object", - "description": "The pipeline trigger descriptor", - "properties": { - "sourceTrigger": { - "$ref": "#/definitions/PipelineSourceTriggerDescriptor", - "description": "The source trigger that caused the pipeline run." - } - } - }, - "PipelineTriggerProperties": { - "type": "object", - "description": "The trigger properties of the import pipeline", - "properties": { - "sourceTrigger": { - "$ref": "#/definitions/PipelineSourceTriggerProperties", - "description": "The source trigger properties of the pipeline." - } - } - }, - "Policies": { - "type": "object", - "description": "The policies for a container registry.", - "properties": { - "quarantinePolicy": { - "$ref": "#/definitions/QuarantinePolicy", - "description": "The quarantine policy for a container registry." - }, - "trustPolicy": { - "$ref": "#/definitions/TrustPolicy", - "description": "The content trust policy for a container registry." - }, - "retentionPolicy": { - "$ref": "#/definitions/RetentionPolicy", - "description": "The retention policy for a container registry." - }, - "exportPolicy": { - "$ref": "#/definitions/ExportPolicy", - "description": "The export policy for a container registry." - }, - "azureADAuthenticationAsArmPolicy": { - "$ref": "#/definitions/AzureADAuthenticationAsArmPolicy", - "description": "The policy for using Azure Resource Manager audience token for a container registry." - }, - "softDeletePolicy": { - "$ref": "#/definitions/SoftDeletePolicy", - "description": "The soft delete policy for a container registry." - } - } - }, - "PrivateEndpoint": { - "type": "object", - "description": "The Private Endpoint resource.", - "properties": { - "id": { - "type": "string", - "description": "This is private endpoint resource created with Microsoft.Network resource provider." - } - } - }, - "PrivateEndpointConnection": { - "type": "object", - "description": "An object that represents a private endpoint connection for a container registry.", - "properties": { - "properties": { - "$ref": "#/definitions/PrivateEndpointConnectionProperties", - "description": "The properties of a private endpoint connection.", - "x-ms-client-flatten": true - } - }, - "allOf": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ProxyResource" - } - ] - }, - "PrivateEndpointConnectionListResult": { - "type": "object", - "description": "The result of a request to list private endpoint connections for a container registry.", - "properties": { - "value": { - "type": "array", - "description": "The list of private endpoint connections. Since this list may be incomplete, the nextLink field should be used to request the next list of private endpoint connections.", - "items": { - "$ref": "#/definitions/PrivateEndpointConnection" - } - }, - "nextLink": { - "type": "string", - "description": "The URI that can be used to request the next list of private endpoint connections." - } - } - }, - "PrivateEndpointConnectionProperties": { - "type": "object", - "description": "The properties of a private endpoint connection.", - "properties": { - "privateEndpoint": { - "$ref": "#/definitions/PrivateEndpoint", - "description": "The resource of private endpoint." - }, - "privateLinkServiceConnectionState": { - "$ref": "#/definitions/PrivateLinkServiceConnectionState", - "description": "A collection of information about the state of the connection between service consumer and provider." - }, - "provisioningState": { - "$ref": "#/definitions/ProvisioningState", - "description": "The provisioning state of private endpoint connection resource.", - "readOnly": true - } - } - }, - "PrivateLinkResourceListResult": { - "type": "object", - "description": "The result of a request to list private link resources for a container registry.", - "properties": { - "value": { - "type": "array", - "description": "The list of private link resources. Since this list may be incomplete, the nextLink field should be used to request the next list of private link resources.", - "items": { - "$ref": "../../../../../../common-types/resource-management/v6/privatelinks.json#/definitions/PrivateLinkResource" - } - }, - "nextLink": { - "type": "string", - "description": "The URI that can be used to request the next list of private link resources." - } - } - }, - "PrivateLinkServiceConnectionState": { - "type": "object", - "description": "The state of a private link service connection.", - "properties": { - "status": { - "$ref": "#/definitions/ConnectionStatus", - "description": "The private link service connection status." - }, - "description": { - "type": "string", - "description": "The description for connection status. For example if connection is rejected it can indicate reason for rejection." - }, - "actionsRequired": { - "$ref": "#/definitions/ActionsRequired", - "description": "A message indicating if changes on the service provider require any updates on the consumer." - } - } - }, - "ProgressProperties": { - "type": "object", - "description": "The progress properties.", - "properties": { - "percentage": { - "type": "string", - "description": "The percentage complete of the copy operation." - } - } - }, - "ProvisioningState": { - "type": "string", - "description": "The provisioning state of the archive at the time the operation was called.", - "enum": [ - "Creating", - "Updating", - "Deleting", - "Succeeded", - "Failed", - "Canceled" - ], - "x-ms-enum": { - "name": "ProvisioningState", - "modelAsString": true, - "values": [ - { - "name": "Creating", - "value": "Creating" - }, - { - "name": "Updating", - "value": "Updating" - }, - { - "name": "Deleting", - "value": "Deleting" - }, - { - "name": "Succeeded", - "value": "Succeeded" - }, - { - "name": "Failed", - "value": "Failed" - }, - { - "name": "Canceled", - "value": "Canceled" - } - ] - } - }, - "PublicNetworkAccess": { - "type": "string", - "description": "Whether or not public network access is allowed for the container registry.", - "enum": [ - "Enabled", - "Disabled" - ], - "x-ms-enum": { - "name": "PublicNetworkAccess", - "modelAsString": true, - "values": [ - { - "name": "Enabled", - "value": "Enabled" - }, - { - "name": "Disabled", - "value": "Disabled" - } - ] - } - }, - "QuarantinePolicy": { - "type": "object", - "description": "The quarantine policy for a container registry.", - "properties": { - "status": { - "type": "string", - "description": "The value that indicates whether the policy is enabled or not.", - "default": "disabled", - "enum": [ - "enabled", - "disabled" - ], - "x-ms-enum": { - "name": "PolicyStatus", - "modelAsString": true, - "values": [ - { - "name": "enabled", - "value": "enabled" - }, - { - "name": "disabled", - "value": "disabled" - } - ] - } - } - } - }, - "RegenerateCredentialParameters": { - "type": "object", - "description": "The parameters used to regenerate the login credential.", - "properties": { - "name": { - "$ref": "#/definitions/PasswordName", - "description": "Specifies name of the password which should be regenerated -- password or password2." - } - }, - "required": [ - "name" - ] - }, - "RegionalEndpoints": { - "type": "string", - "description": "Whether or not per-region endpoints are enabled for accessing the registry.", - "enum": [ - "Enabled", - "Disabled" - ], - "x-ms-enum": { - "name": "RegionalEndpoints", - "modelAsString": true, - "values": [ - { - "name": "Enabled", - "value": "Enabled", - "description": "Regional endpoints are enabled." - }, - { - "name": "Disabled", - "value": "Disabled", - "description": "Regional endpoints are disabled." - } - ] - } - }, - "Registry": { - "type": "object", - "description": "An object that represents a container registry.", - "properties": { - "properties": { - "$ref": "#/definitions/RegistryProperties", - "description": "The properties of the container registry.", - "x-ms-client-flatten": true - }, - "sku": { - "$ref": "#/definitions/Sku", - "description": "The SKU of the container registry." - }, - "identity": { - "$ref": "#/definitions/IdentityProperties", - "description": "The identity of the container registry." - } - }, - "required": [ - "sku" - ], - "allOf": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/TrackedResource" - } - ] - }, - "RegistryListCredentialsResult": { - "type": "object", - "description": "The response from the ListCredentials operation.", - "properties": { - "username": { - "type": "string", - "description": "The username for a container registry." - }, - "passwords": { - "type": "array", - "description": "The list of passwords for a container registry.", - "items": { - "$ref": "#/definitions/RegistryPassword" - }, - "x-ms-identifiers": [] - } - } - }, - "RegistryListResult": { - "type": "object", - "description": "The result of a request to list container registries.", - "properties": { - "value": { - "type": "array", - "description": "The list of container registries. Since this list may be incomplete, the nextLink field should be used to request the next list of container registries.", - "items": { - "$ref": "#/definitions/Registry" - } - }, - "nextLink": { - "type": "string", - "description": "The URI that can be used to request the next list of container registries." - } - } - }, - "RegistryNameCheckRequest": { - "type": "object", - "description": "A request to check whether a container registry name is available.", - "properties": { - "name": { - "type": "string", - "description": "The name of the container registry.", - "minLength": 5, - "maxLength": 50, - "pattern": "^[a-zA-Z0-9]*$" - }, - "type": { - "$ref": "#/definitions/ContainerRegistryResourceType", - "description": "The resource type of the container registry. This field must be set to 'Microsoft.ContainerRegistry/registries'." - }, - "resourceGroupName": { - "type": "string", - "description": "The resource group name of the container registry.", - "minLength": 1, - "maxLength": 90 - }, - "autoGeneratedDomainNameLabelScope": { - "type": "string", - "description": "The auto generated domain name label of the container registry. This value defaults to \"Unsecure\".", - "default": "Unsecure", - "enum": [ - "Unsecure", - "TenantReuse", - "SubscriptionReuse", - "ResourceGroupReuse", - "NoReuse" - ], - "x-ms-enum": { - "name": "AutoGeneratedDomainNameLabelScope", - "modelAsString": true, - "values": [ - { - "name": "Unsecure", - "value": "Unsecure" - }, - { - "name": "TenantReuse", - "value": "TenantReuse" - }, - { - "name": "SubscriptionReuse", - "value": "SubscriptionReuse" - }, - { - "name": "ResourceGroupReuse", - "value": "ResourceGroupReuse" - }, - { - "name": "NoReuse", - "value": "NoReuse" - } - ] - } - } - }, - "required": [ - "name", - "type" - ] - }, - "RegistryNameStatus": { - "type": "object", - "description": "The result of a request to check the availability of a container registry name.", - "properties": { - "availableLoginServerName": { - "type": "string", - "description": "The complete login server name with domain name label (DNL) hash, if available" - }, - "nameAvailable": { - "type": "boolean", - "description": "The value that indicates whether the name is available." - }, - "reason": { - "type": "string", - "description": "If any, the reason that the name is not available." - }, - "message": { - "type": "string", - "description": "If any, the error message that provides more detail for the reason that the name is not available." - } - } - }, - "RegistryPassword": { - "type": "object", - "description": "The login password for the container registry.", - "properties": { - "name": { - "$ref": "#/definitions/PasswordName", - "description": "The password name." - }, - "value": { - "type": "string", - "description": "The password value." - } - } - }, - "RegistryProperties": { - "type": "object", - "description": "The properties of a container registry.", - "properties": { - "loginServer": { - "type": "string", - "description": "The URL that can be used to log into the container registry.", - "readOnly": true - }, - "creationDate": { - "type": "string", - "format": "date-time", - "description": "The creation date of the container registry in ISO8601 format.", - "readOnly": true - }, - "provisioningState": { - "$ref": "#/definitions/ProvisioningState", - "description": "The provisioning state of the container registry at the time the operation was called.", - "readOnly": true - }, - "status": { - "$ref": "#/definitions/Status", - "description": "The status of the container registry at the time the operation was called.", - "readOnly": true - }, - "adminUserEnabled": { - "type": "boolean", - "description": "The value that indicates whether the admin user is enabled.", - "default": false - }, - "networkRuleSet": { - "$ref": "#/definitions/NetworkRuleSet", - "description": "The network rule set for a container registry." - }, - "policies": { - "$ref": "#/definitions/Policies", - "description": "The policies for a container registry." - }, - "encryption": { - "$ref": "#/definitions/EncryptionProperty", - "description": "The encryption settings of container registry." - }, - "dataEndpointEnabled": { - "type": "boolean", - "description": "Enable a single data endpoint per region for serving data." - }, - "dataEndpointHostNames": { - "type": "array", - "description": "List of host names that will serve data when dataEndpointEnabled is true.", - "items": { - "type": "string" - }, - "readOnly": true - }, - "regionalEndpoints": { - "type": "string", - "description": "Enable per-region endpoints for accessing registry.", - "default": "Disabled", - "enum": [ - "Enabled", - "Disabled" - ], - "x-ms-enum": { - "name": "RegionalEndpoints", - "modelAsString": true, - "values": [ - { - "name": "Enabled", - "value": "Enabled", - "description": "Regional endpoints are enabled." - }, - { - "name": "Disabled", - "value": "Disabled", - "description": "Regional endpoints are disabled." - } - ] - } - }, - "regionalEndpointHostNames": { - "type": "array", - "description": "List of host names that will serve registry when RegionalEndpoints is enabled.", - "items": { - "type": "string" - }, - "readOnly": true - }, - "endpointProtocol": { - "$ref": "#/definitions/EndpointProtocol", - "description": "The connectivity protocol for the registry, such as IPv4 or dual stack (IPv4 and IPv6)." - }, - "privateEndpointConnections": { - "type": "array", - "description": "List of private endpoint connections for a container registry.", - "items": { - "$ref": "#/definitions/PrivateEndpointConnection" - }, - "readOnly": true - }, - "publicNetworkAccess": { - "type": "string", - "description": "Whether or not public network access is allowed for the container registry.", - "default": "Enabled", - "enum": [ - "Enabled", - "Disabled" - ], - "x-ms-enum": { - "name": "PublicNetworkAccess", - "modelAsString": true, - "values": [ - { - "name": "Enabled", - "value": "Enabled" - }, - { - "name": "Disabled", - "value": "Disabled" - } - ] - } - }, - "networkRuleBypassOptions": { - "type": "string", - "description": "Whether to allow trusted Azure services to access a network restricted registry.", - "default": "AzureServices", - "enum": [ - "AzureServices", - "None" - ], - "x-ms-enum": { - "name": "NetworkRuleBypassOptions", - "modelAsString": true, - "values": [ - { - "name": "AzureServices", - "value": "AzureServices" - }, - { - "name": "None", - "value": "None" - } - ] - } - }, - "networkRuleBypassAllowedForTasks": { - "type": "boolean", - "description": "Whether or not Tasks allowed to bypass the network rules for this container registry.", - "default": false - }, - "zoneRedundancy": { - "type": "string", - "description": "Whether or not zone redundancy is enabled for this container registry", - "default": "Disabled", - "enum": [ - "Enabled", - "Disabled" - ], - "x-ms-enum": { - "name": "ZoneRedundancy", - "modelAsString": true, - "values": [ - { - "name": "Enabled", - "value": "Enabled" - }, - { - "name": "Disabled", - "value": "Disabled" - } - ] - } - }, - "anonymousPullEnabled": { - "type": "boolean", - "description": "Enables registry-wide pull from unauthenticated clients.", - "default": false - }, - "metadataSearch": { - "type": "string", - "description": "Determines whether registry artifacts are indexed for metadata search.", - "default": "Disabled", - "enum": [ - "Enabled", - "Disabled" - ], - "x-ms-enum": { - "name": "MetadataSearch", - "modelAsString": true, - "values": [ - { - "name": "Enabled", - "value": "Enabled" - }, - { - "name": "Disabled", - "value": "Disabled" - } - ] - } - }, - "autoGeneratedDomainNameLabelScope": { - "type": "string", - "description": "Determines the domain name label reuse scope.", - "default": "Unsecure", - "enum": [ - "Unsecure", - "TenantReuse", - "SubscriptionReuse", - "ResourceGroupReuse", - "NoReuse" - ], - "x-ms-enum": { - "name": "AutoGeneratedDomainNameLabelScope", - "modelAsString": true, - "values": [ - { - "name": "Unsecure", - "value": "Unsecure" - }, - { - "name": "TenantReuse", - "value": "TenantReuse" - }, - { - "name": "SubscriptionReuse", - "value": "SubscriptionReuse" - }, - { - "name": "ResourceGroupReuse", - "value": "ResourceGroupReuse" - }, - { - "name": "NoReuse", - "value": "NoReuse" - } - ] - } - }, - "roleAssignmentMode": { - "type": "string", - "description": "Determines registry role assignment mode.", - "default": "LegacyRegistryPermissions", - "enum": [ - "AbacRepositoryPermissions", - "LegacyRegistryPermissions" - ], - "x-ms-enum": { - "name": "RoleAssignmentMode", - "modelAsString": true, - "values": [ - { - "name": "AbacRepositoryPermissions", - "value": "AbacRepositoryPermissions" - }, - { - "name": "LegacyRegistryPermissions", - "value": "LegacyRegistryPermissions" - } - ] - } - } - } - }, - "RegistryPropertiesUpdateParameters": { - "type": "object", - "description": "The parameters for updating the properties of a container registry.", - "properties": { - "adminUserEnabled": { - "type": "boolean", - "description": "The value that indicates whether the admin user is enabled." - }, - "networkRuleSet": { - "$ref": "#/definitions/NetworkRuleSet", - "description": "The network rule set for a container registry." - }, - "policies": { - "$ref": "#/definitions/Policies", - "description": "The policies for a container registry." - }, - "encryption": { - "$ref": "#/definitions/EncryptionProperty", - "description": "The encryption settings of container registry." - }, - "dataEndpointEnabled": { - "type": "boolean", - "description": "Enable a single data endpoint per region for serving data." - }, - "regionalEndpoints": { - "$ref": "#/definitions/RegionalEndpoints", - "description": "Enable per-region endpoints for accessing registry." - }, - "endpointProtocol": { - "$ref": "#/definitions/EndpointProtocol", - "description": "The connectivity protocol for the registry, such as IPv4 or dual stack (IPv4 and IPv6)." - }, - "publicNetworkAccess": { - "$ref": "#/definitions/PublicNetworkAccess", - "description": "Whether or not public network access is allowed for the container registry." - }, - "networkRuleBypassOptions": { - "type": "string", - "description": "Whether to allow trusted Azure services to access a network restricted registry.", - "default": "AzureServices", - "enum": [ - "AzureServices", - "None" - ], - "x-ms-enum": { - "name": "NetworkRuleBypassOptions", - "modelAsString": true, - "values": [ - { - "name": "AzureServices", - "value": "AzureServices" - }, - { - "name": "None", - "value": "None" - } - ] - } - }, - "networkRuleBypassAllowedForTasks": { - "type": "boolean", - "description": "Whether to allow ACR Tasks service to access a network restricted registry." - }, - "anonymousPullEnabled": { - "type": "boolean", - "description": "Enables registry-wide pull from unauthenticated clients." - }, - "metadataSearch": { - "type": "string", - "description": "Determines whether registry artifacts are indexed for metadata search.", - "default": "Disabled", - "enum": [ - "Enabled", - "Disabled" - ], - "x-ms-enum": { - "name": "MetadataSearch", - "modelAsString": true, - "values": [ - { - "name": "Enabled", - "value": "Enabled" - }, - { - "name": "Disabled", - "value": "Disabled" - } - ] - } - }, - "roleAssignmentMode": { - "$ref": "#/definitions/RoleAssignmentMode", - "description": "Determines registry role assignment mode." - } - } - }, - "RegistrySyncResult": { - "type": "object", - "description": "The registry sync result of the connected registry.", - "properties": { - "syncTrigger": { - "$ref": "#/definitions/SyncTrigger", - "description": "The action that triggered the most recent registry sync.", - "readOnly": true - }, - "syncState": { - "$ref": "#/definitions/SyncState", - "description": "The status of the connected registry's most recent sync.", - "readOnly": true - }, - "lastSyncStartTime": { - "type": "string", - "format": "date-time", - "description": "The time that the connected registry's most recent sync started." - }, - "lastSyncEndTime": { - "type": "string", - "format": "date-time", - "description": "The time that the connected registry's most recent sync ended." - }, - "lastSuccessfulSyncEndTime": { - "type": "string", - "format": "date-time", - "description": "The time that the connected registry's most recent successful sync ended." - } - }, - "required": [ - "syncTrigger", - "syncState" - ] - }, - "RegistryUpdateParameters": { - "type": "object", - "description": "The parameters for updating a container registry.", - "properties": { - "identity": { - "$ref": "#/definitions/IdentityProperties", - "description": "The identity of the container registry." - }, - "tags": { - "type": "object", - "description": "The tags for the container registry.", - "additionalProperties": { - "type": "string" - } - }, - "sku": { - "$ref": "#/definitions/Sku", - "description": "The SKU of the container registry." - }, - "properties": { - "$ref": "#/definitions/RegistryPropertiesUpdateParameters", - "description": "The properties that the container registry will be updated with.", - "x-ms-client-flatten": true - } - } - }, - "RegistryUsage": { - "type": "object", - "description": "The quota usage for a container registry.", - "properties": { - "name": { - "type": "string", - "description": "The name of the usage." - }, - "limit": { - "type": "integer", - "format": "int64", - "description": "The limit of the usage." - }, - "currentValue": { - "type": "integer", - "format": "int64", - "description": "The current value of the usage." - }, - "unit": { - "$ref": "#/definitions/RegistryUsageUnit", - "description": "The unit of measurement." - } - } - }, - "RegistryUsageListResult": { - "type": "object", - "description": "The result of a request to get container registry quota usages.", - "properties": { - "value": { - "type": "array", - "description": "The list of container registry quota usages.", - "items": { - "$ref": "#/definitions/RegistryUsage" - }, - "x-ms-identifiers": [ - "name" - ] - } - } - }, - "RegistryUsageUnit": { - "type": "string", - "description": "The unit of measurement.", - "enum": [ - "Count", - "Bytes" - ], - "x-ms-enum": { - "name": "RegistryUsageUnit", - "modelAsString": true, - "values": [ - { - "name": "Count", - "value": "Count" - }, - { - "name": "Bytes", - "value": "Bytes" - } - ] - } - }, - "Replication": { - "type": "object", - "description": "An object that represents a replication for a container registry.", - "properties": { - "properties": { - "$ref": "#/definitions/ReplicationProperties", - "description": "The properties of the replication.", - "x-ms-client-flatten": true - } - }, - "allOf": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/TrackedResource" - } - ] - }, - "ReplicationListResult": { - "type": "object", - "description": "The result of a request to list replications for a container registry.", - "properties": { - "value": { - "type": "array", - "description": "The list of replications. Since this list may be incomplete, the nextLink field should be used to request the next list of replications.", - "items": { - "$ref": "#/definitions/Replication" - } - }, - "nextLink": { - "type": "string", - "description": "The URI that can be used to request the next list of replications." - } - } - }, - "ReplicationProperties": { - "type": "object", - "description": "The properties of a replication.", - "properties": { - "provisioningState": { - "$ref": "#/definitions/ProvisioningState", - "description": "The provisioning state of the replication at the time the operation was called.", - "readOnly": true - }, - "status": { - "$ref": "#/definitions/Status", - "description": "The status of the replication at the time the operation was called.", - "readOnly": true - }, - "regionEndpointEnabled": { - "type": "boolean", - "description": "Specifies whether the replication's regional endpoint is enabled. Requests will not be routed to a replication whose regional endpoint is disabled, however its data will continue to be synced with other replications.", - "default": true - }, - "zoneRedundancy": { - "type": "string", - "description": "Whether or not zone redundancy is enabled for this container registry replication", - "default": "Disabled", - "enum": [ - "Enabled", - "Disabled" - ], - "x-ms-enum": { - "name": "ZoneRedundancy", - "modelAsString": true, - "values": [ - { - "name": "Enabled", - "value": "Enabled" - }, - { - "name": "Disabled", - "value": "Disabled" - } - ] - } - } - } - }, - "ReplicationUpdateParameters": { - "type": "object", - "description": "The parameters for updating a replication.", - "properties": { - "tags": { - "type": "object", - "description": "The tags for the replication.", - "additionalProperties": { - "type": "string" - } - }, - "properties": { - "$ref": "#/definitions/ReplicationUpdateParametersProperties", - "description": "The parameters for updating a replication's properties", - "x-ms-client-flatten": true - } - } - }, - "ReplicationUpdateParametersProperties": { - "type": "object", - "properties": { - "regionEndpointEnabled": { - "type": "boolean", - "description": "Specifies whether the replication's regional endpoint is enabled. Requests will not be routed to a replication whose regional endpoint is disabled, however its data will continue to be synced with other replications." - } - } - }, - "Request": { - "type": "object", - "description": "The request that generated the event.", - "properties": { - "id": { - "type": "string", - "description": "The ID of the request that initiated the event." - }, - "addr": { - "type": "string", - "description": "The IP or hostname and possibly port of the client connection that initiated the event. This is the RemoteAddr from the standard http request." - }, - "host": { - "type": "string", - "description": "The externally accessible hostname of the registry instance, as specified by the http host header on incoming requests." - }, - "method": { - "type": "string", - "description": "The request method that generated the event." - }, - "useragent": { - "type": "string", - "description": "The user agent header of the request." - } - } - }, - "ResourceIdentityType": { - "type": "string", - "description": "The identity type.", - "enum": [ - "SystemAssigned", - "UserAssigned", - "SystemAssigned, UserAssigned", - "None" - ], - "x-ms-enum": { - "name": "ResourceIdentityType", - "modelAsString": false - } - }, - "RetentionPolicy": { - "type": "object", - "description": "The retention policy for a container registry.", - "properties": { - "days": { - "type": "integer", - "format": "int32", - "description": "The number of days to retain an untagged manifest after which it gets purged.", - "default": 7 - }, - "lastUpdatedTime": { - "type": "string", - "format": "date-time", - "description": "The timestamp when the policy was last updated.", - "readOnly": true - }, - "status": { - "type": "string", - "description": "The value that indicates whether the policy is enabled or not.", - "default": "disabled", - "enum": [ - "enabled", - "disabled" - ], - "x-ms-enum": { - "name": "PolicyStatus", - "modelAsString": true, - "values": [ - { - "name": "enabled", - "value": "enabled" - }, - { - "name": "disabled", - "value": "disabled" - } - ] - } - } - } - }, - "RoleAssignmentMode": { - "type": "string", - "description": "Determines registry role assignment mode.", - "enum": [ - "AbacRepositoryPermissions", - "LegacyRegistryPermissions" - ], - "x-ms-enum": { - "name": "RoleAssignmentMode", - "modelAsString": true, - "values": [ - { - "name": "AbacRepositoryPermissions", - "value": "AbacRepositoryPermissions" - }, - { - "name": "LegacyRegistryPermissions", - "value": "LegacyRegistryPermissions" - } - ] - } - }, - "ScopeMap": { - "type": "object", - "description": "An object that represents a scope map for a container registry.", - "properties": { - "properties": { - "$ref": "#/definitions/ScopeMapProperties", - "description": "The properties of the scope map.", - "x-ms-client-flatten": true - } - }, - "allOf": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ProxyResource" - } - ] - }, - "ScopeMapListResult": { - "type": "object", - "description": "The result of a request to list scope maps for a container registry.", - "properties": { - "value": { - "type": "array", - "description": "The list of scope maps. Since this list may be incomplete, the nextLink field should be used to request the next list of scope maps.", - "items": { - "$ref": "#/definitions/ScopeMap" - } - }, - "nextLink": { - "type": "string", - "description": "The URI that can be used to request the next list of scope maps." - } - } - }, - "ScopeMapProperties": { - "type": "object", - "description": "The properties of a scope map.", - "properties": { - "description": { - "type": "string", - "description": "The user friendly description of the scope map." - }, - "type": { - "type": "string", - "description": "The type of the scope map. E.g. BuildIn scope map.", - "readOnly": true - }, - "creationDate": { - "type": "string", - "format": "date-time", - "description": "The creation date of scope map.", - "readOnly": true - }, - "provisioningState": { - "$ref": "#/definitions/ProvisioningState", - "description": "Provisioning state of the resource.", - "readOnly": true - }, - "actions": { - "type": "array", - "description": "The list of scoped permissions for registry artifacts.\nE.g. repositories/repository-name/content/read,\nrepositories/repository-name/metadata/write", - "items": { - "type": "string" - } - } - }, - "required": [ - "actions" - ] - }, - "ScopeMapPropertiesUpdateParameters": { - "type": "object", - "description": "The update parameters for scope map properties.", - "properties": { - "description": { - "type": "string", - "description": "The user friendly description of the scope map." - }, - "actions": { - "type": "array", - "description": "The list of scope permissions for registry artifacts.\nE.g. repositories/repository-name/pull,\nrepositories/repository-name/delete", - "items": { - "type": "string" - } - } - } - }, - "ScopeMapUpdateParameters": { - "type": "object", - "description": "The properties for updating the scope map.", - "properties": { - "properties": { - "$ref": "#/definitions/ScopeMapPropertiesUpdateParameters", - "description": "The update parameters for scope map properties.", - "x-ms-client-flatten": true - } - } - }, - "Sku": { - "type": "object", - "description": "The SKU of a container registry.", - "properties": { - "name": { - "$ref": "#/definitions/SkuName", - "description": "The SKU name of the container registry. Required for registry creation." - }, - "tier": { - "$ref": "#/definitions/SkuTier", - "description": "The SKU tier based on the SKU name.", - "readOnly": true - } - }, - "required": [ - "name" - ] - }, - "SkuName": { - "type": "string", - "description": "The SKU name of the container registry. Required for registry creation.", - "enum": [ - "Classic", - "Basic", - "Standard", - "Premium" - ], - "x-ms-enum": { - "name": "SkuName", - "modelAsString": true, - "values": [ - { - "name": "Classic", - "value": "Classic" - }, - { - "name": "Basic", - "value": "Basic" - }, - { - "name": "Standard", - "value": "Standard" - }, - { - "name": "Premium", - "value": "Premium" - } - ] - } - }, - "SkuTier": { - "type": "string", - "description": "The SKU tier based on the SKU name.", - "enum": [ - "Classic", - "Basic", - "Standard", - "Premium" - ], - "x-ms-enum": { - "name": "SkuTier", - "modelAsString": true, - "values": [ - { - "name": "Classic", - "value": "Classic" - }, - { - "name": "Basic", - "value": "Basic" - }, - { - "name": "Standard", - "value": "Standard" - }, - { - "name": "Premium", - "value": "Premium" - } - ] - } - }, - "SoftDeletePolicy": { - "type": "object", - "description": "The soft delete policy for a container registry", - "properties": { - "retentionDays": { - "type": "integer", - "format": "int32", - "description": "The number of days after which a soft-deleted item is permanently deleted.", - "default": 7 - }, - "lastUpdatedTime": { - "type": "string", - "format": "date-time", - "description": "The timestamp when the policy was last updated.", - "readOnly": true - }, - "status": { - "type": "string", - "description": "The value that indicates whether the policy is enabled or not.", - "default": "disabled", - "enum": [ - "enabled", - "disabled" - ], - "x-ms-enum": { - "name": "PolicyStatus", - "modelAsString": true, - "values": [ - { - "name": "enabled", - "value": "enabled" - }, - { - "name": "disabled", - "value": "disabled" - } - ] - } - } - } - }, - "Source": { - "type": "object", - "description": "The registry node that generated the event. Put differently, while the actor initiates the event, the source generates it.", - "properties": { - "addr": { - "type": "string", - "description": "The IP or hostname and the port of the registry node that generated the event. Generally, this will be resolved by os.Hostname() along with the running port." - }, - "instanceID": { - "type": "string", - "description": "The running instance of an application. Changes after each restart." - } - } - }, - "Status": { - "type": "object", - "description": "The status of an Azure resource at the time the operation was called.", - "properties": { - "displayStatus": { - "type": "string", - "description": "The short label for the status.", - "readOnly": true - }, - "message": { - "type": "string", - "description": "The detailed message for the status, including alerts and error messages.", - "readOnly": true - }, - "timestamp": { - "type": "string", - "format": "date-time", - "description": "The timestamp when the status was changed to the current value.", - "readOnly": true - } - } - }, - "StatusDetailProperties": { - "type": "object", - "description": "The status detail properties of the connected registry.", - "properties": { - "type": { - "type": "string", - "description": "The component of the connected registry corresponding to the status.", - "readOnly": true - }, - "code": { - "type": "string", - "description": "The HTTP status code.", - "readOnly": true - }, - "description": { - "type": "string", - "description": "The description of the status.", - "readOnly": true - }, - "timestamp": { - "type": "string", - "format": "date-time", - "description": "The timestamp of the status.", - "readOnly": true - }, - "correlationId": { - "type": "string", - "description": "The correlation ID of the status.", - "readOnly": true - } - } - }, - "SyncProperties": { - "type": "object", - "description": "The sync properties of the connected registry with its parent.", - "properties": { - "tokenId": { - "type": "string", - "description": "The resource ID of the ACR token used to authenticate the connected registry to its parent during sync." - }, - "schedule": { - "type": "string", - "description": "The cron expression indicating the schedule that the connected registry will sync with its parent." - }, - "syncWindow": { - "type": "string", - "format": "duration", - "description": "The time window during which sync is enabled for each schedule occurrence. Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601." - }, - "messageTtl": { - "type": "string", - "format": "duration", - "description": "The period of time for which a message is available to sync before it is expired. Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601." - }, - "lastSyncTime": { - "type": "string", - "format": "date-time", - "description": "The last time a sync occurred between the connected registry and its parent.", - "readOnly": true - }, - "gatewayEndpoint": { - "type": "string", - "description": "The gateway endpoint used by the connected registry to communicate with its parent.", - "readOnly": true - } - }, - "required": [ - "tokenId", - "messageTtl" - ] - }, - "SyncState": { - "type": "string", - "description": "The action that triggered the most recent registry sync.", - "enum": [ - "NotActivated", - "Syncing", - "Failed", - "Succeeded", - "TimedOut", - "Pending" - ], - "x-ms-enum": { - "name": "SyncState", - "modelAsString": true, - "values": [ - { - "name": "NotActivated", - "value": "NotActivated", - "description": "Connected Registry is not activated" - }, - { - "name": "Syncing", - "value": "Syncing", - "description": "Connected Registry is syncing" - }, - { - "name": "Failed", - "value": "Failed", - "description": "Connected Registry sync failed" - }, - { - "name": "Succeeded", - "value": "Succeeded", - "description": "Connected Registry sync succeeded" - }, - { - "name": "TimedOut", - "value": "TimedOut", - "description": "Connected Registry sync timed out" - }, - { - "name": "Pending", - "value": "Pending", - "description": "Connected Registry sync is pending" - } - ] - } - }, - "SyncTrigger": { - "type": "string", - "description": "The status of the connected registry's most recent sync.", - "enum": [ - "SyncTokenUpdate", - "InitialSync", - "ManualResync", - "RecoveryService" - ], - "x-ms-enum": { - "name": "SyncTrigger", - "modelAsString": true, - "values": [ - { - "name": "SyncTokenUpdate", - "value": "SyncTokenUpdate", - "description": "Connected Registry sync was triggered by a sync token update" - }, - { - "name": "InitialSync", - "value": "InitialSync", - "description": "Connected Registry sync was triggered by an initial sync during activation" - }, - { - "name": "ManualResync", - "value": "ManualResync", - "description": "Connected Registry sync was triggered by a manual resync request" - }, - { - "name": "RecoveryService", - "value": "RecoveryService", - "description": "Connected Registry sync was triggered by the Connected Registry's recovery service" - } - ] - } - }, - "SyncUpdateProperties": { - "type": "object", - "description": "The parameters for updating the sync properties of the connected registry with its parent.", - "properties": { - "schedule": { - "type": "string", - "description": "The cron expression indicating the schedule that the connected registry will sync with its parent." - }, - "syncWindow": { - "type": "string", - "format": "duration", - "description": "The time window during which sync is enabled for each schedule occurrence. Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601." - }, - "messageTtl": { - "type": "string", - "format": "duration", - "description": "The period of time for which a message is available to sync before it is expired. Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601." - } - } - }, - "Target": { - "type": "object", - "description": "The target of the event.", - "properties": { - "mediaType": { - "type": "string", - "description": "The MIME type of the referenced object." - }, - "size": { - "type": "integer", - "format": "int64", - "description": "The number of bytes of the content. Same as Length field." - }, - "digest": { - "type": "string", - "description": "The digest of the content, as defined by the Registry V2 HTTP API Specification." - }, - "length": { - "type": "integer", - "format": "int64", - "description": "The number of bytes of the content. Same as Size field." - }, - "repository": { - "type": "string", - "description": "The repository name." - }, - "url": { - "type": "string", - "description": "The direct URL to the content." - }, - "tag": { - "type": "string", - "description": "The tag name." - }, - "name": { - "type": "string", - "description": "The name of the artifact." - }, - "version": { - "type": "string", - "description": "The version of the artifact." - } - } - }, - "TlsCertificateProperties": { - "type": "object", - "description": "The TLS certificate properties of the connected registry login server.", - "properties": { - "type": { - "$ref": "#/definitions/CertificateType", - "description": "The type of certificate location.", - "readOnly": true - }, - "location": { - "type": "string", - "description": "Indicates the location of the certificates.", - "readOnly": true - } - } - }, - "TlsProperties": { - "type": "object", - "description": "The TLS properties of the connected registry login server.", - "properties": { - "status": { - "$ref": "#/definitions/TlsStatus", - "description": "Indicates whether HTTPS is enabled for the login server.", - "readOnly": true - }, - "certificate": { - "$ref": "#/definitions/TlsCertificateProperties", - "description": "The certificate used to configure HTTPS for the login server.", - "readOnly": true - } - } - }, - "TlsStatus": { - "type": "string", - "description": "Indicates whether HTTPS is enabled for the login server.", - "enum": [ - "Enabled", - "Disabled" - ], - "x-ms-enum": { - "name": "TlsStatus", - "modelAsString": true, - "values": [ - { - "name": "Enabled", - "value": "Enabled" - }, - { - "name": "Disabled", - "value": "Disabled" - } - ] - } - }, - "Token": { - "type": "object", - "description": "An object that represents a token for a container registry.", - "properties": { - "properties": { - "$ref": "#/definitions/TokenProperties", - "description": "The properties of the token.", - "x-ms-client-flatten": true - } - }, - "allOf": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ProxyResource" - } - ] - }, - "TokenCertificate": { - "type": "object", - "description": "The properties of a certificate used for authenticating a token.", - "properties": { - "name": { - "$ref": "#/definitions/TokenCertificateName" - }, - "expiry": { - "type": "string", - "format": "date-time", - "description": "The expiry datetime of the certificate." - }, - "thumbprint": { - "type": "string", - "description": "The thumbprint of the certificate." - }, - "encodedPemCertificate": { - "type": "string", - "description": "Base 64 encoded string of the public certificate1 in PEM format that will be used for authenticating the token." - } - } - }, - "TokenCertificateName": { - "type": "string", - "enum": [ - "certificate1", - "certificate2" - ], - "x-ms-enum": { - "name": "TokenCertificateName", - "modelAsString": true, - "values": [ - { - "name": "certificate1", - "value": "certificate1" - }, - { - "name": "certificate2", - "value": "certificate2" - } - ] - } - }, - "TokenCredentialsProperties": { - "type": "object", - "description": "The properties of the credentials that can be used for authenticating the token.", - "properties": { - "certificates": { - "type": "array", - "items": { - "$ref": "#/definitions/TokenCertificate" - }, - "x-ms-identifiers": [ - "thumbprint" - ] - }, - "passwords": { - "type": "array", - "items": { - "$ref": "#/definitions/TokenPassword" - }, - "x-ms-identifiers": [] - } - } - }, - "TokenListResult": { - "type": "object", - "description": "The result of a request to list tokens for a container registry.", - "properties": { - "value": { - "type": "array", - "description": "The list of tokens. Since this list may be incomplete, the nextLink field should be used to request the next list of tokens.", - "items": { - "$ref": "#/definitions/Token" - } - }, - "nextLink": { - "type": "string", - "description": "The URI that can be used to request the next list of tokens." - } - } - }, - "TokenPassword": { - "type": "object", - "description": "The password that will be used for authenticating the token of a container registry.", - "properties": { - "creationTime": { - "type": "string", - "format": "date-time", - "description": "The creation datetime of the password." - }, - "expiry": { - "type": "string", - "format": "date-time", - "description": "The expiry datetime of the password." - }, - "name": { - "$ref": "#/definitions/TokenPasswordName", - "description": "The password name \"password1\" or \"password2\"" - }, - "value": { - "type": "string", - "description": "The password value.", - "readOnly": true - } - } - }, - "TokenPasswordName": { - "type": "string", - "description": "The password name \"password1\" or \"password2\"", - "enum": [ - "password1", - "password2" - ], - "x-ms-enum": { - "name": "TokenPasswordName", - "modelAsString": true, - "values": [ - { - "name": "password1", - "value": "password1" - }, - { - "name": "password2", - "value": "password2" - } - ] - } - }, - "TokenProperties": { - "type": "object", - "description": "The properties of a token.", - "properties": { - "creationDate": { - "type": "string", - "format": "date-time", - "description": "The creation date of scope map.", - "readOnly": true - }, - "provisioningState": { - "$ref": "#/definitions/ProvisioningState", - "description": "Provisioning state of the resource.", - "readOnly": true - }, - "scopeMapId": { - "type": "string", - "description": "The resource ID of the scope map to which the token will be associated with." - }, - "credentials": { - "$ref": "#/definitions/TokenCredentialsProperties", - "description": "The credentials that can be used for authenticating the token." - }, - "status": { - "$ref": "#/definitions/TokenStatus", - "description": "The status of the token example enabled or disabled." - } - } - }, - "TokenStatus": { - "type": "string", - "description": "The status of the token example enabled or disabled.", - "enum": [ - "enabled", - "disabled" - ], - "x-ms-enum": { - "name": "TokenStatus", - "modelAsString": true, - "values": [ - { - "name": "enabled", - "value": "enabled" - }, - { - "name": "disabled", - "value": "disabled" - } - ] - } - }, - "TokenUpdateParameters": { - "type": "object", - "description": "The parameters for updating a token.", - "properties": { - "properties": { - "$ref": "#/definitions/TokenUpdateProperties", - "description": "The properties of the token update parameters.", - "x-ms-client-flatten": true - } - } - }, - "TokenUpdateProperties": { - "type": "object", - "description": "The parameters for updating token properties.", - "properties": { - "scopeMapId": { - "type": "string", - "description": "The resource ID of the scope map to which the token will be associated with." - }, - "status": { - "$ref": "#/definitions/TokenStatus", - "description": "The status of the token example enabled or disabled." - }, - "credentials": { - "$ref": "#/definitions/TokenCredentialsProperties", - "description": "The credentials that can be used for authenticating the token." - } - } - }, - "TrustPolicy": { - "type": "object", - "description": "The content trust policy for a container registry.", - "properties": { - "type": { - "type": "string", - "description": "The type of trust policy.", - "default": "Notary", - "enum": [ - "Notary" - ], - "x-ms-enum": { - "name": "TrustPolicyType", - "modelAsString": true, - "values": [ - { - "name": "Notary", - "value": "Notary" - } - ] - } - }, - "status": { - "type": "string", - "description": "The value that indicates whether the policy is enabled or not.", - "default": "disabled", - "enum": [ - "enabled", - "disabled" - ], - "x-ms-enum": { - "name": "PolicyStatus", - "modelAsString": true, - "values": [ - { - "name": "enabled", - "value": "enabled" - }, - { - "name": "disabled", - "value": "disabled" - } - ] - } - } - } - }, - "UserIdentityProperties": { - "type": "object", - "properties": { - "principalId": { - "type": "string", - "description": "The principal id of user assigned identity.", - "readOnly": true - }, - "clientId": { - "type": "string", - "description": "The client id of user assigned identity.", - "readOnly": true - } - } - }, - "Webhook": { - "type": "object", - "description": "An object that represents a webhook for a container registry.", - "properties": { - "properties": { - "$ref": "#/definitions/WebhookProperties", - "description": "The properties of the webhook.", - "x-ms-client-flatten": true - } - }, - "allOf": [ - { - "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/TrackedResource" - } - ] - }, - "WebhookAction": { - "type": "string", - "enum": [ - "push", - "delete", - "quarantine", - "chart_push", - "chart_delete" - ], - "x-ms-enum": { - "name": "WebhookAction", - "modelAsString": true, - "values": [ - { - "name": "push", - "value": "push" - }, - { - "name": "delete", - "value": "delete" - }, - { - "name": "quarantine", - "value": "quarantine" - }, - { - "name": "chart_push", - "value": "chart_push" - }, - { - "name": "chart_delete", - "value": "chart_delete" - } - ] - } - }, - "WebhookCreateParameters": { - "type": "object", - "description": "The parameters for creating a webhook.", - "properties": { - "tags": { - "type": "object", - "description": "The tags for the webhook.", - "additionalProperties": { - "type": "string" - } - }, - "location": { - "type": "string", - "description": "The location of the webhook. This cannot be changed after the resource is created." - }, - "properties": { - "$ref": "#/definitions/WebhookPropertiesCreateParameters", - "description": "The properties that the webhook will be created with.", - "x-ms-client-flatten": true - } - }, - "required": [ - "location" - ] - }, - "WebhookListResult": { - "type": "object", - "description": "The result of a request to list webhooks for a container registry.", - "properties": { - "value": { - "type": "array", - "description": "The list of webhooks. Since this list may be incomplete, the nextLink field should be used to request the next list of webhooks.", - "items": { - "$ref": "#/definitions/Webhook" - } - }, - "nextLink": { - "type": "string", - "description": "The URI that can be used to request the next list of webhooks." - } - } - }, - "WebhookProperties": { - "type": "object", - "description": "The properties of a webhook.", - "properties": { - "status": { - "$ref": "#/definitions/WebhookStatus", - "description": "The status of the webhook at the time the operation was called." - }, - "scope": { - "type": "string", - "description": "The scope of repositories where the event can be triggered. For example, 'foo:*' means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to 'foo:latest'. Empty means all events." - }, - "actions": { - "type": "array", - "description": "The list of actions that trigger the webhook to post notifications.", - "items": { - "$ref": "#/definitions/WebhookAction" - } - }, - "provisioningState": { - "$ref": "#/definitions/ProvisioningState", - "description": "The provisioning state of the webhook at the time the operation was called.", - "readOnly": true - } - }, - "required": [ - "actions" - ] - }, - "WebhookPropertiesCreateParameters": { - "type": "object", - "description": "The parameters for creating the properties of a webhook.", - "properties": { - "serviceUri": { - "type": "string", - "format": "password", - "description": "The service URI for the webhook to post notifications.", - "x-ms-secret": true - }, - "customHeaders": { - "type": "object", - "format": "password", - "description": "Custom headers that will be added to the webhook notifications.", - "additionalProperties": { - "type": "string" - }, - "x-ms-secret": true - }, - "status": { - "$ref": "#/definitions/WebhookStatus", - "description": "The status of the webhook at the time the operation was called." - }, - "scope": { - "type": "string", - "description": "The scope of repositories where the event can be triggered. For example, 'foo:*' means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to 'foo:latest'. Empty means all events." - }, - "actions": { - "type": "array", - "description": "The list of actions that trigger the webhook to post notifications.", - "items": { - "$ref": "#/definitions/WebhookAction" - } - } - }, - "required": [ - "serviceUri", - "actions" - ] - }, - "WebhookPropertiesUpdateParameters": { - "type": "object", - "description": "The parameters for updating the properties of a webhook.", - "properties": { - "serviceUri": { - "type": "string", - "format": "password", - "description": "The service URI for the webhook to post notifications.", - "x-ms-secret": true - }, - "customHeaders": { - "type": "object", - "format": "password", - "description": "Custom headers that will be added to the webhook notifications.", - "additionalProperties": { - "type": "string" - }, - "x-ms-secret": true - }, - "status": { - "$ref": "#/definitions/WebhookStatus", - "description": "The status of the webhook at the time the operation was called." - }, - "scope": { - "type": "string", - "description": "The scope of repositories where the event can be triggered. For example, 'foo:*' means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to 'foo:latest'. Empty means all events." - }, - "actions": { - "type": "array", - "description": "The list of actions that trigger the webhook to post notifications.", - "items": { - "$ref": "#/definitions/WebhookAction" - } - } - } - }, - "WebhookStatus": { - "type": "string", - "description": "The status of the webhook at the time the operation was called.", - "enum": [ - "enabled", - "disabled" - ], - "x-ms-enum": { - "name": "WebhookStatus", - "modelAsString": true, - "values": [ - { - "name": "enabled", - "value": "enabled" - }, - { - "name": "disabled", - "value": "disabled" - } - ] - } - }, - "WebhookUpdateParameters": { - "type": "object", - "description": "The parameters for updating a webhook.", - "properties": { - "tags": { - "type": "object", - "description": "The tags for the webhook.", - "additionalProperties": { - "type": "string" - } - }, - "properties": { - "$ref": "#/definitions/WebhookPropertiesUpdateParameters", - "description": "The properties that the webhook will be updated with.", - "x-ms-client-flatten": true - } - } - } - }, - "parameters": {} -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveCreate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveCreate.json deleted file mode 100644 index 535be7f780b..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveCreate.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "title": "ArchiveCreate", - "operationId": "Archives_Create", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "packageType": "rpm", - "archiveName": "myArchiveName", - "archiveCreateParameters": { - "properties": { - "packageSource": { - "type": "remote", - "url": "string" - }, - "publishedVersion": "string", - "repositoryEndpointPrefix": "string" - } - } - }, - "responses": { - "200": { - "body": { - "type": "Microsoft.ContainerRegistry/registries/archives", - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/packages/rpm/archives/myArchiveName", - "name": "myArchiveName", - "properties": { - "packageSource": { - "type": "remote", - "url": "string" - }, - "publishedVersion": "string", - "repositoryEndpointPrefix": "string", - "repositoryEndpoint": "string", - "provisioningState": "Succeeded" - } - } - }, - "201": { - "headers": { - "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/packages/rpm/archives/myArchiveName/operationStatuses/archive-00000000-0000-0000-0000-000000000000?api-version=2023-01-01-preview" - }, - "body": { - "type": "Microsoft.ContainerRegistry/registries/archives", - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/archives/myArchiveName", - "name": "myArchiveName", - "properties": { - "packageSource": { - "type": "remote", - "url": "string" - }, - "publishedVersion": "string", - "repositoryEndpointPrefix": "string", - "repositoryEndpoint": "string", - "provisioningState": "Succeeded" - } - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveDelete.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveDelete.json deleted file mode 100644 index daef4170f6c..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveDelete.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "title": "ArchiveDelete", - "operationId": "Archives_Delete", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "packageType": "myPackageType", - "archiveName": "myArchiveName" - }, - "responses": { - "202": { - "headers": { - "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/packages/myPackageType/archives/myArchiveName/operationStatuses/archive-00000000-0000-0000-0000-000000000000?api-version=2023-01-01-preview" - } - }, - "204": {} - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveGet.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveGet.json deleted file mode 100644 index 4060847c15a..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveGet.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "title": "ArchiveGet", - "operationId": "Archives_Get", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "packageType": "myPackageType", - "archiveName": "myArchiveName" - }, - "responses": { - "200": { - "body": { - "type": "Microsoft.ContainerRegistry/registries/packages/archives", - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/packages/myPackageType/archives/myArchiveName", - "name": "myArchiveName", - "systemData": { - "createdBy": "string", - "createdByType": "User", - "createdAt": "2023-02-24T00:13:46.836Z", - "lastModifiedBy": "string", - "lastModifiedByType": "User", - "lastModifiedAt": "2023-02-24T00:13:46.836Z" - }, - "properties": { - "packageSource": { - "type": "string", - "url": "string" - }, - "publishedVersion": "string", - "provisioningState": "Creating" - } - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveList.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveList.json deleted file mode 100644 index 7d89a44cf42..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveList.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "title": "ArchiveList", - "operationId": "Archives_List", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "packageType": "myPackageType" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/packages/myPackageType/archives/myArchiveName", - "name": "myArchiveName", - "type": "Microsoft.ContainerRegistry/registries/archives", - "systemData": { - "createdBy": "string", - "createdByType": "User", - "createdAt": "2023-02-24T00:22:47.311Z", - "lastModifiedBy": "string", - "lastModifiedByType": "User", - "lastModifiedAt": "2023-02-24T00:22:47.311Z" - }, - "properties": { - "packageSource": { - "type": "string", - "url": "string" - }, - "publishedVersion": "string", - "provisioningState": "Creating" - } - } - ], - "nextLink": "string" - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveUpdate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveUpdate.json deleted file mode 100644 index cf7281441dc..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveUpdate.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "title": "ArchiveUpdate", - "operationId": "Archives_Update", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "packageType": "myPackageType", - "archiveName": "myArchiveName", - "archiveUpdateParameters": { - "properties": { - "publishedVersion": "string" - } - } - }, - "responses": { - "200": { - "body": { - "type": "Microsoft.ContainerRegistry/registries/packages/archives", - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/packages/myPackageType/archives/myArchiveName", - "name": "myArchiveName", - "systemData": { - "createdBy": "string", - "createdByType": "User", - "createdAt": "2023-06-09T23:41:38.720Z", - "lastModifiedBy": "string", - "lastModifiedByType": "User", - "lastModifiedAt": "2023-06-09T23:41:38.720Z" - }, - "properties": { - "packageSource": { - "type": "remote", - "url": "string" - }, - "publishedVersion": "string", - "repositoryEndpointPrefix": "string", - "repositoryEndpoint": "string", - "provisioningState": "Creating" - } - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveVersionCreate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveVersionCreate.json deleted file mode 100644 index 77aae794fe1..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveVersionCreate.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "title": "ArchiveVersionCreate", - "operationId": "ArchiveVersions_Create", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "packageType": "rpm", - "archiveName": "myArchiveName", - "archiveVersionName": "myArchiveVersionName" - }, - "responses": { - "200": { - "body": { - "type": "Microsoft.ContainerRegistry/registries/packages/archives/versions", - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/packages/rpm/archives/myArchiveName/versions/myArchiveVersionName", - "name": "myArchiveVersionName", - "properties": { - "provisioningState": "Succeeded" - } - } - }, - "201": { - "headers": { - "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/packages/rpm/archives/myArchiveName/versions/myArchiveVersionName/operationStatuses/archoveversion-00000000-0000-0000-0000-000000000000?api-version=2023-01-01-preview" - }, - "body": { - "type": "Microsoft.ContainerRegistry/registries/packages/archives/versions", - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/packages/rpm/archives/myArchiveName/versions/myArchiveVersionName", - "name": "myCacheRule", - "properties": { - "provisioningState": "Succeeded" - } - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveVersionDelete.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveVersionDelete.json deleted file mode 100644 index 678b2e456c6..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveVersionDelete.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "title": "ArchiveVersionDelete", - "operationId": "ArchiveVersions_Delete", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "packageType": "myPackageType", - "archiveName": "myArchiveName", - "archiveVersionName": "myArchiveVersionName" - }, - "responses": { - "202": { - "headers": { - "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/packages/myPackageType/archives/myArchiveName/versions/myArchiveVersionName/operationStatuses/archive-00000000-0000-0000-0000-000000000000?api-version=2023-01-01-preview" - } - }, - "204": {} - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveVersionGet.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveVersionGet.json deleted file mode 100644 index 350ab35e42e..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveVersionGet.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "title": "ArchiveVersionGet", - "operationId": "ArchiveVersions_Get", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "packageType": "rpm", - "archiveName": "myArchiveName", - "archiveVersionName": "myArchiveVersionName" - }, - "responses": { - "200": { - "body": { - "type": "Microsoft.ContainerRegistry/registries/packages/archives", - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/packages/rpm/archives/myArchiveName/versions/myArchiveVersionName", - "name": "myArchiveName", - "systemData": { - "createdBy": "string", - "createdByType": "User", - "createdAt": "2023-02-24T00:13:46.836Z", - "lastModifiedBy": "string", - "lastModifiedByType": "User", - "lastModifiedAt": "2023-02-24T00:13:46.836Z" - }, - "properties": { - "provisioningState": "Creating", - "archiveVersionErrorMessage": "string" - } - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveVersionList.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveVersionList.json deleted file mode 100644 index 45c488529c5..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ArchiveVersionList.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "title": "ArchiveVersionList", - "operationId": "ArchiveVersions_List", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "packageType": "myPackageType", - "archiveName": "myArchiveName" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/packages/myPackageType/archives/myArchiveName/versions/myArchiveVersionName", - "name": "myArchiveVersionName", - "type": "Microsoft.ContainerRegistry/registries/packages/archives/versions", - "systemData": { - "createdBy": "string", - "createdByType": "User", - "createdAt": "2023-02-24T00:22:47.311Z", - "lastModifiedBy": "string", - "lastModifiedByType": "User", - "lastModifiedAt": "2023-02-24T00:22:47.311Z" - }, - "properties": { - "provisioningState": "Creating", - "archiveVersionErrorMessage": "string" - } - } - ], - "nextLink": "string" - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CacheRuleCreate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CacheRuleCreate.json deleted file mode 100644 index 0ad2f79c097..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CacheRuleCreate.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "title": "CacheRuleCreate", - "operationId": "CacheRules_Create", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "cacheRuleName": "myCacheRule", - "cacheRuleCreateParameters": { - "properties": { - "sourceRepository": "docker.io/library/hello-world", - "targetRepository": "cached-docker-hub/hello-world", - "credentialSetResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/credentialSets/myCredentialSet" - } - } - }, - "responses": { - "200": { - "body": { - "type": "Microsoft.ContainerRegistry/registries/cacheRules", - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/cacheRules/myCacheRule", - "name": "myCacheRule", - "properties": { - "credentialSetResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/credentialSets/myCredentialSet", - "sourceRepository": "docker.io/library/hello-world", - "targetRepository": "cached-docker-hub/hello-world", - "creationDate": "2022-11-07T18:20:33.8374968+00:00", - "provisioningState": "Succeeded" - } - } - }, - "201": { - "headers": { - "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/cacheRules/myCacheRule/operationStatuses/cacherules-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" - }, - "body": { - "type": "Microsoft.ContainerRegistry/registries/cacheRules", - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/cacheRules/myCacheRule", - "name": "myCacheRule", - "properties": { - "credentialSetResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/credentialSets/myCredentialSet", - "sourceRepository": "docker.io/library/hello-world", - "targetRepository": "cached-docker-hub/hello-world", - "creationDate": "2022-11-07T18:20:33.8374968+00:00", - "provisioningState": "Creating" - } - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CacheRuleCreateUserAssignedMIAuthentication.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CacheRuleCreateUserAssignedMIAuthentication.json deleted file mode 100644 index 7b57e6b6f15..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CacheRuleCreateUserAssignedMIAuthentication.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "title": "CacheRuleCreateUserAssignedMIAuthentication", - "operationId": "CacheRules_Create", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "cacheRuleName": "myCacheRule", - "cacheRuleCreateParameters": { - "identity": { - "type": "UserAssigned", - "userAssignedIdentities": { - "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myUserAssignedIdentity": {} - } - }, - "properties": { - "sourceRepository": "acr-registry.azurecr.io/library/repository", - "targetRepository": "cached-acr/hello-world" - } - } - }, - "responses": { - "200": { - "body": { - "type": "Microsoft.ContainerRegistry/registries/cacheRules", - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/cacheRules/myCacheRule", - "name": "myCacheRule", - "identity": { - "type": "UserAssigned", - "userAssignedIdentities": { - "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myUserAssignedIdentity": { - "clientId": "12345678-1234-1234-1234-123456789012", - "principalId": "12345678-1234-1234-1234-123456789012" - } - } - } - }, - "properties": { - "sourceRepository": "acr-registry.azurecr.io/library/repository", - "targetRepository": "cached-acr/hello-world", - "creationDate": "2022-11-07T18:20:33.8374968+00:00", - "provisioningState": "Succeeded" - } - }, - "201": { - "headers": { - "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/cacheRules/myCacheRule/operationStatuses/cacherules-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" - }, - "body": { - "type": "Microsoft.ContainerRegistry/registries/cacheRules", - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/cacheRules/myCacheRule", - "name": "myCacheRule", - "identity": { - "type": "UserAssigned", - "userAssignedIdentities": { - "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myUserAssignedIdentity": { - "clientId": "12345678-1234-1234-1234-123456789012", - "principalId": "12345678-1234-1234-1234-123456789012" - } - } - }, - "properties": { - "sourceRepository": "acr-registry.azurecr.io/library/repository", - "targetRepository": "cached-acr/hello-world", - "creationDate": "2022-11-07T18:20:33.8374968+00:00", - "provisioningState": "Creating" - } - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CacheRuleDelete.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CacheRuleDelete.json deleted file mode 100644 index dae579bcb7b..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CacheRuleDelete.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "title": "CacheRuleDelete", - "operationId": "CacheRules_Delete", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "cacheRuleName": "myCacheRule" - }, - "responses": { - "202": { - "headers": { - "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/cacheRules/myCacheRule/operationStatuses/cacherules-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" - } - }, - "204": {} - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CacheRuleGet.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CacheRuleGet.json deleted file mode 100644 index 3a007b3ea86..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CacheRuleGet.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "title": "CacheRuleGet", - "operationId": "CacheRules_Get", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "cacheRuleName": "myCacheRule" - }, - "responses": { - "200": { - "body": { - "type": "Microsoft.ContainerRegistry/registries/cacheRules", - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/cacheRules/myCacheRule", - "name": "myCacheRule", - "properties": { - "credentialSetResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/credentialSets/myCredentialSet", - "sourceRepository": "docker.io/library/hello-world", - "targetRepository": "cached-docker-hub/hello-world", - "creationDate": "2022-11-07T18:20:33.8374968+00:00", - "provisioningState": "Succeeded" - } - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CacheRuleList.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CacheRuleList.json deleted file mode 100644 index ae37c5be64f..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CacheRuleList.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "title": "CacheRuleList", - "operationId": "CacheRules_List", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "type": "Microsoft.ContainerRegistry/registries/cacheRules", - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/cacheRules/myCacheRule", - "name": "myCacheRule", - "properties": { - "credentialSetResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/credentialSets/myCredentialSet", - "sourceRepository": "docker.io/library/hello-world", - "targetRepository": "cached-docker-hub/hello-world", - "creationDate": "2022-11-07T18:20:33.8374968+00:00", - "provisioningState": "Succeeded" - } - } - ] - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CacheRuleUpdate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CacheRuleUpdate.json deleted file mode 100644 index 2fe4b347388..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CacheRuleUpdate.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "title": "CacheRuleUpdate", - "operationId": "CacheRules_Update", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "cacheRuleName": "myCacheRule", - "cacheRuleUpdateParameters": { - "properties": { - "credentialSetResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/credentialSets/myCredentialSet2" - } - } - }, - "responses": { - "200": { - "body": { - "type": "Microsoft.ContainerRegistry/registries/cacheRules", - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/cacheRules/myCacheRule", - "name": "myCacheRule", - "properties": { - "credentialSetResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/credentialSets/myCredentialSet2", - "sourceRepository": "docker.io/library/hello-world", - "targetRepository": "cached-docker-hub/hello-world", - "creationDate": "2022-11-07T18:20:33.8374968+00:00", - "provisioningState": "Succeeded" - } - } - }, - "201": { - "headers": { - "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/cacheRules/myCacheRule/operationStatuses/cacherules-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" - }, - "body": { - "type": "Microsoft.ContainerRegistry/registries/cacheRules", - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/cacheRules/myCacheRule", - "name": "myCacheRule", - "properties": { - "credentialSetResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/credentialSets/myCredentialSet2", - "sourceRepository": "docker.io/library/hello-world", - "targetRepository": "cached-docker-hub/hello-world", - "creationDate": "2022-11-07T18:20:33.8374968+00:00", - "provisioningState": "Updating" - } - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ConnectedRegistryCreate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ConnectedRegistryCreate.json deleted file mode 100644 index 53cc668e493..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ConnectedRegistryCreate.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "title": "ConnectedRegistryCreate", - "operationId": "ConnectedRegistries_Create", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "connectedRegistryName": "myConnectedRegistry", - "connectedRegistryCreateParameters": { - "properties": { - "mode": "ReadWrite", - "parent": { - "syncProperties": { - "tokenId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/syncToken", - "schedule": "0 9 * * *", - "messageTtl": "P2D", - "syncWindow": "PT3H" - } - }, - "clientTokenIds": [ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/client1Token" - ], - "notificationsList": [ - "hello-world:*:*", - "sample/repo/*:1.0:*" - ], - "garbageCollection": { - "enabled": true, - "schedule": "0 5 * * *" - } - } - } - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/connectedRegistries/myConnectedRegistry", - "name": "myConnectedRegistry", - "type": "Microsoft.ContainerRegistry/registries/connectedRegistries", - "properties": { - "mode": "ReadWrite", - "activation": { - "status": "Inactive" - }, - "parent": { - "syncProperties": { - "tokenId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/syncToken", - "schedule": "0 9 * * *", - "messageTtl": "P2D", - "syncWindow": "PT3H" - } - }, - "clientTokenIds": [ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/client1Token" - ], - "logging": { - "logLevel": "Information", - "auditLogStatus": "Disabled" - }, - "notificationsList": [ - "hello-world:*:*", - "sample/repo/*:1.0:*" - ], - "garbageCollection": { - "enabled": true, - "schedule": "0 5 * * *" - } - } - } - }, - "201": { - "headers": { - "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/connectedRegistries/myConnectedRegistry/operationStatuses/connectedregistries-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" - }, - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/connectedRegistries/myConnectedRegistry", - "name": "myConnectedRegistry", - "type": "Microsoft.ContainerRegistry/registries/connectedRegistries", - "properties": { - "mode": "ReadWrite", - "activation": { - "status": "Inactive" - }, - "parent": { - "syncProperties": { - "tokenId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/syncToken", - "schedule": "0 9 * * *", - "messageTtl": "P2D", - "syncWindow": "PT3H" - } - }, - "clientTokenIds": [ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/client1Token" - ], - "logging": { - "logLevel": "Information", - "auditLogStatus": "Disabled" - }, - "notificationsList": [ - "hello-world:*:*", - "sample/repo/*:1.0:*" - ], - "garbageCollection": { - "enabled": true, - "schedule": "0 5 * * *" - } - } - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ConnectedRegistryDeactivate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ConnectedRegistryDeactivate.json deleted file mode 100644 index bb1ba130335..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ConnectedRegistryDeactivate.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "title": "ConnectedRegistryDeactivate", - "operationId": "ConnectedRegistries_Deactivate", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "connectedRegistryName": "myConnectedRegistry" - }, - "responses": { - "200": {}, - "202": { - "headers": { - "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/connectedRegistries/myConnectedRegistry/operationStatuses/connectedregistries-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ConnectedRegistryDelete.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ConnectedRegistryDelete.json deleted file mode 100644 index 81b8bef42ba..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ConnectedRegistryDelete.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "title": "ConnectedRegistryDelete", - "operationId": "ConnectedRegistries_Delete", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "connectedRegistryName": "myConnectedRegistry" - }, - "responses": { - "200": {}, - "202": { - "headers": { - "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/connectedRegistries/myConnectedRegistry/operationStatuses/connectedregistries-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" - } - }, - "204": {} - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ConnectedRegistryGet.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ConnectedRegistryGet.json deleted file mode 100644 index 5a6b127cd2a..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ConnectedRegistryGet.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "title": "ConnectedRegistryGet", - "operationId": "ConnectedRegistries_Get", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "connectedRegistryName": "myConnectedRegistry" - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/connectedRegistries/myConnectedRegistry", - "name": "myConnectedRegistry", - "type": "Microsoft.ContainerRegistry/registries/connectedRegistries", - "properties": { - "mode": "ReadWrite", - "activation": { - "status": "Inactive" - }, - "parent": { - "syncProperties": { - "tokenId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/syncToken", - "schedule": "0 9 * * *", - "messageTtl": "P2D", - "syncWindow": "PT3H" - } - }, - "clientTokenIds": [ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/client1Token" - ], - "logging": { - "logLevel": "Information", - "auditLogStatus": "Disabled" - }, - "notificationsList": [ - "hello-world:*:*", - "sample/repo/*:1.0:*" - ], - "garbageCollection": { - "enabled": true, - "schedule": "0 5 * * *" - }, - "registrySyncResult": { - "syncTrigger": "InitialSync", - "syncState": "Succeeded", - "lastSyncStartTime": "2026-01-01T00:00:00.0000000-01:00", - "lastSyncEndTime": "2026-01-01T00:01:00.0000000-01:00", - "lastSuccessfulSyncEndTime": "2026-01-01T00:01:00.0000000-01:00" - } - } - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ConnectedRegistryList.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ConnectedRegistryList.json deleted file mode 100644 index 5fe5db98b00..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ConnectedRegistryList.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "title": "ConnectedRegistryList", - "operationId": "ConnectedRegistries_List", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/connectedRegistries/myConnectedRegistry", - "name": "myConnectedRegistry", - "type": "Microsoft.ContainerRegistry/registries/connectedRegistries", - "properties": { - "mode": "ReadWrite", - "activation": { - "status": "Inactive" - }, - "parent": { - "syncProperties": { - "tokenId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/syncToken", - "schedule": "0 9 * * *", - "messageTtl": "P2D", - "syncWindow": "PT3H" - } - }, - "clientTokenIds": [ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/client1Token" - ], - "logging": { - "logLevel": "Information", - "auditLogStatus": "Disabled" - }, - "notificationsList": [ - "hello-world:*:*", - "sample/repo/*:1.0:*" - ], - "garbageCollection": { - "enabled": true, - "schedule": "0 5 * * *" - }, - "registrySyncResult": { - "syncTrigger": "InitialSync", - "syncState": "Succeeded", - "lastSyncStartTime": "2026-01-01T00:00:00.0000000-01:00", - "lastSyncEndTime": "2026-01-01T00:01:00.0000000-01:00", - "lastSuccessfulSyncEndTime": "2026-01-01T00:01:00.0000000-01:00" - } - } - } - ] - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ConnectedRegistryResync.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ConnectedRegistryResync.json deleted file mode 100644 index 2ee27c96444..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ConnectedRegistryResync.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "title": "ConnectedRegistryResync", - "operationId": "ConnectedRegistries_Resync", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "connectedRegistryName": "myConnectedRegistry" - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/connectedRegistries/myConnectedRegistry", - "name": "myConnectedRegistry", - "type": "Microsoft.ContainerRegistry/registries/connectedRegistries", - "properties": { - "mode": "ReadWrite", - "parent": { - "syncProperties": { - "tokenId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/syncToken", - "schedule": "0 0 */10 * *", - "messageTtl": "P30D", - "syncWindow": "P2D" - } - }, - "clientTokenIds": [ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/client1Token", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/client2Token" - ], - "logging": { - "logLevel": "Debug", - "auditLogStatus": "Enabled" - }, - "notificationsList": [ - "hello-world:*:*", - "sample/repo/*:1.0:*" - ], - "garbageCollection": { - "enabled": true, - "schedule": "0 5 * * *" - }, - "registrySyncResult": { - "syncTrigger": "InitialSync", - "syncState": "Succeeded", - "lastSyncStartTime": "2026-01-01T00:00:00.0000000-01:00", - "lastSyncEndTime": "2026-01-01T00:01:00.0000000-01:00", - "lastSuccessfulSyncEndTime": "2026-01-01T00:01:00.0000000-01:00" - } - } - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ConnectedRegistryUpdate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ConnectedRegistryUpdate.json deleted file mode 100644 index 10517e04fc5..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ConnectedRegistryUpdate.json +++ /dev/null @@ -1,123 +0,0 @@ -{ - "title": "ConnectedRegistryUpdate", - "operationId": "ConnectedRegistries_Update", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "connectedRegistryName": "myScopeMap", - "connectedRegistryUpdateParameters": { - "properties": { - "syncProperties": { - "schedule": "0 0 */10 * *", - "messageTtl": "P30D", - "syncWindow": "P2D" - }, - "logging": { - "logLevel": "Debug", - "auditLogStatus": "Enabled" - }, - "clientTokenIds": [ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/client1Token", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/client2Token" - ], - "notificationsList": [ - "hello-world:*:*", - "sample/repo/*:1.0:*" - ], - "garbageCollection": { - "enabled": true, - "schedule": "0 5 * * *" - } - } - } - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/connectedRegistries/myConnectedRegistry", - "name": "myConnectedRegistry", - "type": "Microsoft.ContainerRegistry/registries/connectedRegistries", - "properties": { - "mode": "ReadWrite", - "parent": { - "syncProperties": { - "tokenId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/syncToken", - "schedule": "0 0 */10 * *", - "messageTtl": "P30D", - "syncWindow": "P2D" - } - }, - "clientTokenIds": [ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/client1Token", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/client2Token" - ], - "logging": { - "logLevel": "Debug", - "auditLogStatus": "Enabled" - }, - "notificationsList": [ - "hello-world:*:*", - "sample/repo/*:1.0:*" - ], - "garbageCollection": { - "enabled": true, - "schedule": "0 5 * * *" - }, - "registrySyncResult": { - "syncTrigger": "InitialSync", - "syncState": "Succeeded", - "lastSyncStartTime": "2026-01-01T00:00:00.0000000-01:00", - "lastSyncEndTime": "2026-01-01T00:01:00.0000000-01:00", - "lastSuccessfulSyncEndTime": "2026-01-01T00:01:00.0000000-01:00" - } - } - } - }, - "201": { - "headers": { - "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/connectedRegistries/myConnectedRegistry/operationStatuses/connectedregistries-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" - }, - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/connectedRegistries/myConnectedRegistry", - "name": "myConnectedRegistry", - "type": "Microsoft.ContainerRegistry/registries/connectedRegistries", - "properties": { - "mode": "ReadWrite", - "parent": { - "syncProperties": { - "tokenId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/syncToken", - "schedule": "0 0 */10 * *", - "messageTtl": "P30D", - "syncWindow": "P2D" - } - }, - "clientTokenIds": [ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/client1Token", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/client2Token" - ], - "logging": { - "logLevel": "Debug", - "auditLogStatus": "Enabled" - }, - "notificationsList": [ - "hello-world:*:*", - "sample/repo/*:1.0:*" - ], - "garbageCollection": { - "enabled": true, - "schedule": "0 5 * * *" - }, - "registrySyncResult": { - "syncTrigger": "InitialSync", - "syncState": "Succeeded", - "lastSyncStartTime": "2026-01-01T00:00:00.0000000-01:00", - "lastSyncEndTime": "2026-01-01T00:01:00.0000000-01:00", - "lastSuccessfulSyncEndTime": "2026-01-01T00:01:00.0000000-01:00" - } - } - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CredentialSetCreate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CredentialSetCreate.json deleted file mode 100644 index 91043413248..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CredentialSetCreate.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "title": "CredentialSetCreate", - "operationId": "CredentialSets_Create", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "credentialSetName": "myCredentialSet", - "credentialSetCreateParameters": { - "properties": { - "loginServer": "docker.io", - "authCredentials": [ - { - "name": "Credential1", - "usernameSecretIdentifier": "https://myvault.vault.azure.net/secrets/username", - "passwordSecretIdentifier": "https://myvault.vault.azure.net/secrets/password" - } - ] - }, - "identity": { - "type": "SystemAssigned" - } - } - }, - "responses": { - "200": { - "body": { - "type": "Microsoft.ContainerRegistry/registries/credentialSets", - "identity": { - "principalId": "00000000-0000-0000-0000-000000000000", - "tenantId": "00000000-0000-0000-0000-000000000000", - "type": "SystemAssigned" - }, - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/credentialSets/myCredentialSet", - "name": "myCredentialSet", - "properties": { - "loginServer": "docker.io", - "authCredentials": [ - { - "name": "Credential1", - "usernameSecretIdentifier": "https://myvault.vault.azure.net/secrets/username", - "passwordSecretIdentifier": "https://myvault.vault.azure.net/secrets/password", - "credentialHealth": { - "status": "Healthy" - } - } - ], - "creationDate": "2022-11-07T18:20:08.012276+00:00", - "provisioningState": "Succeeded" - } - } - }, - "201": { - "headers": { - "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/credentialSets/myCredentialSet/operationStatuses/credentialsets-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" - }, - "body": { - "type": "Microsoft.ContainerRegistry/registries/credentialSets", - "identity": { - "principalId": "00000000-0000-0000-0000-000000000000", - "tenantId": "00000000-0000-0000-0000-000000000000", - "type": "SystemAssigned" - }, - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/credentialSets/myCredentialSet", - "name": "myCredentialSet", - "properties": { - "loginServer": "docker.io", - "authCredentials": [ - { - "name": "Credential1", - "usernameSecretIdentifier": "https://myvault.vault.azure.net/secrets/username", - "passwordSecretIdentifier": "https://myvault.vault.azure.net/secrets/password", - "credentialHealth": { - "status": "Healthy" - } - } - ], - "creationDate": "2022-11-07T18:20:08.012276+00:00", - "provisioningState": "Creating" - } - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CredentialSetDelete.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CredentialSetDelete.json deleted file mode 100644 index fbedd7c5e13..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CredentialSetDelete.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "title": "CredentialSetDelete", - "operationId": "CredentialSets_Delete", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "credentialSetName": "myCredentialSet" - }, - "responses": { - "202": { - "headers": { - "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/credentialSets/myCredentialSet/operationStatuses/credentialsets-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" - } - }, - "204": {} - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CredentialSetGet.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CredentialSetGet.json deleted file mode 100644 index 95ad3ea91a1..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CredentialSetGet.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "title": "CredentialSetGet", - "operationId": "CredentialSets_Get", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "credentialSetName": "myCredentialSet" - }, - "responses": { - "200": { - "body": { - "type": "Microsoft.ContainerRegistry/registries/credentialSets", - "identity": { - "principalId": "00000000-0000-0000-0000-000000000000", - "tenantId": "00000000-0000-0000-0000-000000000000", - "type": "SystemAssigned" - }, - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/credentialSets/myCredentialSet", - "name": "myCredentialSet", - "properties": { - "loginServer": "docker.io", - "authCredentials": [ - { - "name": "Credential1", - "usernameSecretIdentifier": "https://myvault.vault.azure.net/secrets/username", - "passwordSecretIdentifier": "https://myvault.vault.azure.net/secrets/password", - "credentialHealth": { - "status": "Healthy" - } - } - ], - "creationDate": "2022-11-07T18:20:08.012276+00:00", - "provisioningState": "Succeeded" - } - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CredentialSetList.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CredentialSetList.json deleted file mode 100644 index 787c8da74c1..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CredentialSetList.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "title": "CredentialSetList", - "operationId": "CredentialSets_List", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "type": "Microsoft.ContainerRegistry/registries/credentialSets", - "identity": { - "principalId": "00000000-0000-0000-0000-000000000000", - "tenantId": "00000000-0000-0000-0000-000000000000", - "type": "SystemAssigned" - }, - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/credentialSets/myCredentialSet", - "name": "myCredentialSet", - "properties": { - "loginServer": "docker.io", - "authCredentials": [ - { - "name": "Credential1", - "usernameSecretIdentifier": "https://myvault.vault.azure.net/secrets/username", - "passwordSecretIdentifier": "https://myvault.vault.azure.net/secrets/password", - "credentialHealth": { - "status": "Healthy" - } - } - ], - "creationDate": "2022-11-07T18:20:08.012276+00:00", - "provisioningState": "Succeeded" - } - } - ] - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CredentialSetUpdate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CredentialSetUpdate.json deleted file mode 100644 index 59dd1642737..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/CredentialSetUpdate.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "title": "CredentialSetUpdate", - "operationId": "CredentialSets_Update", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "credentialSetName": "myCredentialSet", - "credentialSetUpdateParameters": { - "properties": { - "authCredentials": [ - { - "name": "Credential1", - "usernameSecretIdentifier": "https://myvault.vault.azure.net/secrets/username2", - "passwordSecretIdentifier": "https://myvault.vault.azure.net/secrets/password2" - } - ] - } - } - }, - "responses": { - "200": { - "body": { - "type": "Microsoft.ContainerRegistry/registries/credentialSets", - "identity": { - "principalId": "00000000-0000-0000-0000-000000000000", - "tenantId": "00000000-0000-0000-0000-000000000000", - "type": "SystemAssigned" - }, - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/credentialSets/myCredentialSet", - "name": "myCredentialSet", - "properties": { - "loginServer": "docker.io", - "authCredentials": [ - { - "name": "Credential1", - "usernameSecretIdentifier": "https://myvault.vault.azure.net/secrets/username2", - "passwordSecretIdentifier": "https://myvault.vault.azure.net/secrets/password2", - "credentialHealth": { - "status": "Healthy" - } - } - ], - "creationDate": "2022-11-07T18:20:08.012276+00:00", - "provisioningState": "Succeeded" - } - } - }, - "201": { - "headers": { - "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/credentialSets/myCredentialSet/operationStatuses/credentialsets-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" - }, - "body": { - "type": "Microsoft.ContainerRegistry/registries/credentialSets", - "identity": { - "principalId": "00000000-0000-0000-0000-000000000000", - "tenantId": "00000000-0000-0000-0000-000000000000", - "type": "SystemAssigned" - }, - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/credentialSets/myCredentialSet", - "name": "myCredentialSet", - "properties": { - "loginServer": "docker.io", - "authCredentials": [ - { - "name": "Credential1", - "usernameSecretIdentifier": "https://myvault.vault.azure.net/secrets/username2", - "passwordSecretIdentifier": "https://myvault.vault.azure.net/secrets/password2", - "credentialHealth": { - "status": "Healthy" - } - } - ], - "creationDate": "2022-11-07T18:20:08.012276+00:00", - "provisioningState": "Updating" - } - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ExportPipelineCreate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ExportPipelineCreate.json deleted file mode 100644 index e0f49ce205b..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ExportPipelineCreate.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "title": "ExportPipelineCreate", - "operationId": "ExportPipelines_Create", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "exportPipelineName": "myExportPipeline", - "exportPipelineCreateParameters": { - "location": "westus", - "identity": { - "type": "SystemAssigned" - }, - "properties": { - "target": { - "type": "AzureStorageBlobContainer", - "uri": "https://accountname.blob.core.windows.net/containername", - "keyVaultUri": "https://myvault.vault.azure.net/secrets/acrexportsas", - "storageAccessMode": "SasToken" - }, - "options": [ - "OverwriteBlobs" - ] - } - } - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/exportPipelines/myExportPipeline", - "name": "myExportPipeline", - "type": "Microsoft.ContainerRegistry/registries/exportPipelines", - "properties": { - "target": { - "type": "AzureStorageBlobContainer", - "uri": "https://accountname.blob.core.windows.net/containername", - "keyVaultUri": "https://myvault.vault.azure.net/secrets/acrexportsas", - "storageAccessMode": "SasToken" - }, - "options": [ - "OverwriteBlobs" - ], - "provisioningState": "Succeeded" - }, - "location": "westus", - "identity": { - "principalId": "fa153151-b9fd-46f4-9088-5e6600f2689v", - "tenantId": "f686d426-8d16-42db-81b7-abu4gm510ccd", - "type": "SystemAssigned" - } - } - }, - "201": { - "headers": { - "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/exportPipelines/myExportPipeline/operationStatuses/exportpipelines-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" - }, - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/exportPipelines/myExportPipeline", - "name": "myExportPipeline", - "type": "Microsoft.ContainerRegistry/registries/exportPipelines", - "properties": { - "target": { - "type": "AzureStorageBlobContainer", - "uri": "https://accountname.blob.core.windows.net/containername", - "keyVaultUri": "https://myvault.vault.azure.net/secrets/acrexportsas", - "storageAccessMode": "SasToken" - }, - "options": [ - "OverwriteBlobs" - ], - "provisioningState": "Succeeded" - }, - "location": "westus", - "identity": { - "principalId": "fa153151-b9fd-46f4-9088-5e6600f2689v", - "tenantId": "f686d426-8d16-42db-81b7-abu4gm510ccd", - "type": "SystemAssigned" - } - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ExportPipelineDelete.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ExportPipelineDelete.json deleted file mode 100644 index 459a9818f77..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ExportPipelineDelete.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "title": "ExportPipelineDelete", - "operationId": "ExportPipelines_Delete", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "exportPipelineName": "myExportPipeline" - }, - "responses": { - "200": {}, - "202": { - "headers": { - "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/exportPipelines/myExportPipeline/operationStatuses/exportpipelines-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" - } - }, - "204": {} - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ExportPipelineGet.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ExportPipelineGet.json deleted file mode 100644 index d6a4e5ee027..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ExportPipelineGet.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "title": "ExportPipelineGet", - "operationId": "ExportPipelines_Get", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "exportPipelineName": "myExportPipeline" - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/exportPipelines/myExportPipeline", - "name": "myExportPipeline", - "type": "Microsoft.ContainerRegistry/registries/exportPipelines", - "properties": { - "target": { - "type": "AzureStorageBlobContainer", - "uri": "https://accountname.blob.core.windows.net/containername", - "keyVaultUri": "https://myvault.vault.azure.net/secrets/acrexportsas", - "storageAccessMode": "SasToken" - }, - "options": [ - "OverwriteBlobs" - ], - "provisioningState": "Succeeded" - }, - "location": "westus", - "identity": { - "principalId": "fa153151-b9fd-46f4-9088-5e6600f2689v", - "tenantId": "f686d426-8d16-42db-81b7-abu4gm510ccd", - "type": "SystemAssigned" - } - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ExportPipelineList.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ExportPipelineList.json deleted file mode 100644 index 52acae5e1d1..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ExportPipelineList.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "title": "ExportPipelineList", - "operationId": "ExportPipelines_List", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/exportPipelines/myExportPipeline", - "name": "myExportPipeline", - "type": "Microsoft.ContainerRegistry/registries/exportPipelines", - "properties": { - "target": { - "type": "AzureStorageBlobContainer", - "uri": "https://accountname.blob.core.windows.net/containername", - "keyVaultUri": "https://myvault.vault.azure.net/secrets/acrexportsas", - "storageAccessMode": "SasToken" - }, - "options": [ - "OverwriteBlobs" - ], - "provisioningState": "Succeeded" - }, - "location": "westus", - "identity": { - "principalId": "fa153151-b9fd-46f4-9088-5e6600f2689v", - "tenantId": "f686d426-8d16-42db-81b7-abu4gm510ccd", - "type": "SystemAssigned" - } - } - ] - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ImportImageByManifestDigest.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ImportImageByManifestDigest.json deleted file mode 100644 index c0480b452fc..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ImportImageByManifestDigest.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "title": "ImportImageByManifestDigest", - "operationId": "Registries_ImportImage", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "parameters": { - "source": { - "resourceId": "/subscriptions/10000000-0000-0000-0000-000000000000/resourceGroups/sourceResourceGroup/providers/Microsoft.ContainerRegistry/registries/sourceRegistry", - "sourceImage": "sourceRepository@sha256:0000000000000000000000000000000000000000000000000000000000000000" - }, - "targetTags": [ - "targetRepository:targetTag" - ], - "untaggedTargetRepositories": [ - "targetRepository1" - ], - "mode": "Force" - } - }, - "responses": { - "200": {}, - "202": { - "headers": { - "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/locations/location/operationResults/operationStatuses/registries-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ImportImageByTag.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ImportImageByTag.json deleted file mode 100644 index 411b201baf3..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ImportImageByTag.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "title": "ImportImageByTag", - "operationId": "Registries_ImportImage", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "parameters": { - "source": { - "resourceId": "/subscriptions/10000000-0000-0000-0000-000000000000/resourceGroups/sourceResourceGroup/providers/Microsoft.ContainerRegistry/registries/sourceRegistry", - "sourceImage": "sourceRepository:sourceTag" - }, - "targetTags": [ - "targetRepository:targetTag" - ], - "untaggedTargetRepositories": [ - "targetRepository1" - ], - "mode": "Force" - } - }, - "responses": { - "200": {}, - "202": { - "headers": { - "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/locations/location/operationResults/operationStatuses/registries-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ImportImageFromPublicRegistry.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ImportImageFromPublicRegistry.json deleted file mode 100644 index a77c028f3fd..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ImportImageFromPublicRegistry.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "title": "ImportImageFromPublicRegistry", - "operationId": "Registries_ImportImage", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "parameters": { - "source": { - "registryUri": "registry.hub.docker.com", - "sourceImage": "library/hello-world" - }, - "targetTags": [ - "targetRepository:targetTag" - ], - "untaggedTargetRepositories": [ - "targetRepository1" - ], - "mode": "Force" - } - }, - "responses": { - "200": {}, - "202": { - "headers": { - "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/locations/location/operationResults/operationStatuses/registries-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ImportPipelineCreate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ImportPipelineCreate.json deleted file mode 100644 index 56acc8eb84c..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ImportPipelineCreate.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - "title": "ImportPipelineCreate", - "operationId": "ImportPipelines_Create", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "importPipelineName": "myImportPipeline", - "importPipelineCreateParameters": { - "location": "westus", - "identity": { - "type": "UserAssigned", - "userAssignedIdentities": { - "/subscriptions/f9d7ebed-adbd-4cb4-b973-aaf82c136138/resourcegroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity2": {} - } - }, - "properties": { - "source": { - "type": "AzureStorageBlobContainer", - "uri": "https://accountname.blob.core.windows.net/containername", - "keyVaultUri": "https://myvault.vault.azure.net/secrets/acrimportsas", - "storageAccessMode": "SasToken" - }, - "options": [ - "OverwriteTags", - "DeleteSourceBlobOnSuccess", - "ContinueOnErrors" - ] - } - } - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/importPipelines/myImportPipeline", - "name": "myImportPipeline", - "type": "Microsoft.ContainerRegistry/registries/importPipelines", - "properties": { - "source": { - "type": "AzureStorageBlobContainer", - "uri": "https://accountname.blob.core.windows.net/containername", - "keyVaultUri": "https://myvault.vault.azure.net/secrets/acrimportsas", - "storageAccessMode": "SasToken" - }, - "trigger": { - "sourceTrigger": { - "status": "Enabled" - } - }, - "options": [ - "OverwriteTags", - "DeleteSourceBlobOnSuccess", - "ContinueOnErrors" - ], - "provisioningState": "Succeeded" - }, - "location": "westus", - "identity": { - "type": "UserAssigned", - "userAssignedIdentities": { - "/subscriptions/f9d7ebed-adbd-4cb4-b973-aaf82c136138/resourcegroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity2": { - "clientId": "d3ce1bc2-f7d7-4a5b-9979-950f4e57680e", - "principalId": "b6p9f58b-6fbf-4efd-a7e0-fvd46911a466" - } - } - } - } - }, - "201": { - "headers": { - "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/importPipelines/myImportPipeline/operationStatuses/importpipelines-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" - }, - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/importPipelines/myImportPipeline", - "name": "myImportPipeline", - "type": "Microsoft.ContainerRegistry/registries/importPipelines", - "properties": { - "source": { - "type": "AzureStorageBlobContainer", - "uri": "https://accountname.blob.core.windows.net/containername", - "keyVaultUri": "https://myvault.vault.azure.net/secrets/acrimportsas", - "storageAccessMode": "SasToken" - }, - "trigger": { - "sourceTrigger": { - "status": "Enabled" - } - }, - "options": [ - "OverwriteTags", - "DeleteSourceBlobOnSuccess", - "ContinueOnErrors" - ], - "provisioningState": "Succeeded" - }, - "location": "westus", - "identity": { - "type": "UserAssigned", - "userAssignedIdentities": { - "/subscriptions/f9d7ebed-adbd-4cb4-b973-aaf82c136138/resourcegroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity2": { - "clientId": "d3ce1bc2-f7d7-4a5b-9979-950f4e57680e", - "principalId": "b6p9f58b-6fbf-4efd-a7e0-fvd46911a466" - } - } - } - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ImportPipelineDelete.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ImportPipelineDelete.json deleted file mode 100644 index fabe633c359..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ImportPipelineDelete.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "title": "ImportPipelineDelete", - "operationId": "ImportPipelines_Delete", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "importPipelineName": "myImportPipeline" - }, - "responses": { - "200": {}, - "202": { - "headers": { - "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/importPipelines/myImportPipeline/operationStatuses/importpipelines-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" - } - }, - "204": {} - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ImportPipelineGet.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ImportPipelineGet.json deleted file mode 100644 index b2f27d1cad7..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ImportPipelineGet.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "title": "ImportPipelineGet", - "operationId": "ImportPipelines_Get", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "importPipelineName": "myImportPipeline" - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/importPipelines/myImportPipeline", - "name": "myImportPipeline", - "type": "Microsoft.ContainerRegistry/registries/importPipelines", - "properties": { - "source": { - "type": "AzureStorageBlobContainer", - "uri": "https://accountname.blob.core.windows.net/containername", - "keyVaultUri": "https://myvault.vault.azure.net/secrets/acrimportsas", - "storageAccessMode": "SasToken" - }, - "trigger": { - "sourceTrigger": { - "status": "Enabled" - } - }, - "options": [ - "OverwriteTags", - "DeleteSourceBlobOnSuccess", - "ContinueOnErrors" - ], - "provisioningState": "Succeeded" - }, - "location": "westus", - "identity": { - "type": "UserAssigned", - "userAssignedIdentities": { - "/subscriptions/f9d7ebed-adbd-4cb4-b973-aaf82c136138/resourcegroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity2": { - "clientId": "d3ce1bc2-f7d7-4a5b-9979-950f4e57680e", - "principalId": "b6p9f58b-6fbf-4efd-a7e0-fvd46911a466" - } - } - } - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ImportPipelineList.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ImportPipelineList.json deleted file mode 100644 index 046f005f1d6..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ImportPipelineList.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "title": "ImportPipelineList", - "operationId": "ImportPipelines_List", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/importPipelines/myImportPipeline", - "name": "myImportPipeline", - "type": "Microsoft.ContainerRegistry/registries/importPipelines", - "properties": { - "source": { - "type": "AzureStorageBlobContainer", - "uri": "https://accountname.blob.core.windows.net/containername", - "keyVaultUri": "https://myvault.vault.azure.net/secrets/acrimportsas", - "storageAccessMode": "SasToken" - }, - "trigger": { - "sourceTrigger": { - "status": "Enabled" - } - }, - "options": [ - "OverwriteTags", - "DeleteSourceBlobOnSuccess", - "ContinueOnErrors" - ], - "provisioningState": "Succeeded" - }, - "location": "westus", - "identity": { - "type": "UserAssigned", - "userAssignedIdentities": { - "/subscriptions/f9d7ebed-adbd-4cb4-b973-aaf82c136138/resourcegroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity2": { - "clientId": "d3ce1bc2-f7d7-4a5b-9979-950f4e57680e", - "principalId": "b6p9f58b-6fbf-4efd-a7e0-fvd46911a466" - } - } - } - } - ] - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/OperationList.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/OperationList.json deleted file mode 100644 index 09715326802..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/OperationList.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "title": "OperationList", - "operationId": "Operations_List", - "parameters": { - "api-version": "2026-01-01-preview" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "name": "Microsoft.ContainerRegistry/locations/deleteVirtualNetworkOrSubnets/action", - "display": { - "provider": "Microsoft ContainerRegistry", - "resource": "", - "operation": "Delete virtual network or subnets notifications", - "description": "Notifies Microsoft.ContainerRegistry that virtual network or subnet is being deleted" - } - } - ] - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PipelineRunCreate_Export.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PipelineRunCreate_Export.json deleted file mode 100644 index a6ea3bce37e..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PipelineRunCreate_Export.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "title": "PipelineRunCreate_Export", - "operationId": "PipelineRuns_Create", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "pipelineRunName": "myPipelineRun", - "pipelineRunCreateParameters": { - "properties": { - "request": { - "pipelineResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/exportPipelines/myExportPipeline", - "target": { - "type": "AzureStorageBlob", - "name": "myblob.tar.gz" - }, - "artifacts": [ - "sourceRepository/hello-world", - "sourceRepository2@sha256:00000000000000000000000000000000000" - ] - } - } - } - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/pipelineRuns/myPipelineRun", - "name": "myPipelineRun", - "type": "Microsoft.ContainerRegistry/registries/pipelineRuns", - "properties": { - "request": { - "pipelineResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/exportPipelines/myExportPipeline", - "artifacts": [ - "sourceRepository/hello-world", - "sourceRepository2@sha256:00000000000000000000000000000000000" - ] - }, - "response": { - "status": "Running", - "catalogDigest": "sha256@", - "progress": { - "percentage": "20" - }, - "startTime": "2020-03-04T17:23:21.9261521+00:00", - "target": { - "type": "AzureStorageBlob", - "uri": "https://accountname.blob.core.windows.net/containername/myblob.tar.gz", - "keyVaultUri": "https://myvault.vault.azure.net/secrets/acrexportsas", - "storageAccessMode": "SasToken" - } - }, - "provisioningState": "Succeeded" - } - } - }, - "201": { - "headers": { - "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/pipelineRuns/myPipelineRun/operationStatuses/pipelineruns-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" - }, - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/pipelineRuns/myPipelineRun", - "name": "myPipelineRun", - "type": "Microsoft.ContainerRegistry/registries/pipelineRuns", - "properties": { - "request": { - "pipelineResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/exportPipelines/myExportPipeline", - "artifacts": [ - "sourceRepository/hello-world", - "sourceRepository2@sha256:00000000000000000000000000000000000" - ] - }, - "response": { - "status": "Running", - "catalogDigest": "sha256@", - "progress": { - "percentage": "20" - }, - "startTime": "2020-03-04T17:23:21.9261521+00:00", - "target": { - "type": "AzureStorageBlob", - "uri": "https://accountname.blob.core.windows.net/containername/myblob.tar.gz", - "keyVaultUri": "https://myvault.vault.azure.net/secrets/acrexportsas", - "storageAccessMode": "SasToken" - } - }, - "provisioningState": "Succeeded" - } - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PipelineRunCreate_Import.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PipelineRunCreate_Import.json deleted file mode 100644 index 28fe1c9b0b2..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PipelineRunCreate_Import.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "title": "PipelineRunCreate_Import", - "operationId": "PipelineRuns_Create", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "pipelineRunName": "myPipelineRun", - "pipelineRunCreateParameters": { - "properties": { - "request": { - "pipelineResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/importPipelines/myImportPipeline", - "source": { - "type": "AzureStorageBlob", - "name": "myblob.tar.gz" - }, - "catalogDigest": "sha256@" - }, - "forceUpdateTag": "2020-03-04T17:23:21.9261521+00:00" - } - } - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/pipelineRuns/myPipelineRun", - "name": "myPipelineRun", - "type": "Microsoft.ContainerRegistry/registries/pipelineRuns", - "properties": { - "request": { - "pipelineResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/importPipelines/myImportPipeline" - }, - "response": { - "status": "Succeeded", - "progress": { - "percentage": "100" - }, - "startTime": "2020-03-04T17:23:21.9261521+00:00", - "importedArtifacts": [ - "sourceRepository/hello-world", - "sourceRepository2@sha256:00000000000000000000000000000000000" - ], - "source": { - "type": "AzureStorageBlob", - "uri": "https://accountname.blob.core.windows.net/containername/myblob.tar.gz", - "keyVaultUri": "https://myvault.vault.azure.net/secrets/acrimportsas", - "storageAccessMode": "SasToken" - }, - "catalogDigest": "sha256@" - }, - "provisioningState": "Succeeded" - } - } - }, - "201": { - "headers": { - "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/pipelineRuns/myPipelineRun/operationStatuses/pipelineruns-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" - }, - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/pipelineRuns/myPipelineRun", - "name": "myPipelineRun", - "type": "Microsoft.ContainerRegistry/registries/pipelineRuns", - "properties": { - "request": { - "pipelineResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/importPipelines/myImportPipeline" - }, - "response": { - "status": "Succeeded", - "progress": { - "percentage": "100" - }, - "startTime": "2020-03-04T17:23:21.9261521+00:00", - "finishTime": "2020-03-04T17:25:21.9261521+00:00", - "importedArtifacts": [ - "sourceRepository/hello-world", - "sourceRepository2@sha256:00000000000000000000000000000000000" - ], - "source": { - "type": "AzureStorageBlob", - "uri": "https://accountname.blob.core.windows.net/containername/myblob.tar.gz", - "keyVaultUri": "https://myvault.vault.azure.net/secrets/acrimportsas", - "storageAccessMode": "SasToken" - }, - "catalogDigest": "sha256@" - }, - "provisioningState": "Succeeded" - } - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PipelineRunDelete.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PipelineRunDelete.json deleted file mode 100644 index 49faa4b511d..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PipelineRunDelete.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "title": "PipelineRunDelete", - "operationId": "PipelineRuns_Delete", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "pipelineRunName": "myPipelineRun" - }, - "responses": { - "200": {}, - "202": { - "headers": { - "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/pipelineRuns/myPipelineRun/operationStatuses/pipelineruns-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" - } - }, - "204": {} - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PipelineRunGet.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PipelineRunGet.json deleted file mode 100644 index a947c0bc17b..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PipelineRunGet.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "title": "PipelineRunGet", - "operationId": "PipelineRuns_Get", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "pipelineRunName": "myPipelineRun" - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/pipelineRuns/myPipelineRun", - "name": "myPipelineRun", - "type": "Microsoft.ContainerRegistry/registries/pipelineRuns", - "properties": { - "request": { - "pipelineResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/exportPipelines/myExportPipeline", - "artifacts": [ - "sourceRepository/hello-world", - "sourceRepository2@sha256:00000000000000000000000000000000000" - ] - }, - "response": { - "status": "Running", - "catalogDigest": "sha256@", - "progress": { - "percentage": "20" - }, - "startTime": "2020-03-04T17:23:21.9261521+00:00", - "target": { - "type": "AzureStorageBlob", - "uri": "https://accountname.blob.core.windows.net/containername/myblob.tar.gz", - "keyVaultUri": "https://myvault.vault.azure.net/secrets/acrexportsas", - "storageAccessMode": "SasToken" - } - }, - "provisioningState": "Succeeded" - } - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PipelineRunList.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PipelineRunList.json deleted file mode 100644 index 152cc6effb1..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PipelineRunList.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "title": "PipelineRunList", - "operationId": "PipelineRuns_List", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/pipelineRuns/myPipelineRun", - "name": "myPipelineRun", - "type": "Microsoft.ContainerRegistry/registries/pipelineRuns", - "properties": { - "request": { - "pipelineResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/exportPipelines/myExportPipeline", - "artifacts": [ - "sourceRepository/hello-world", - "sourceRepository2@sha256:00000000000000000000000000000000000" - ] - }, - "response": { - "status": "Running", - "catalogDigest": "sha256@", - "progress": { - "percentage": "20" - }, - "startTime": "2020-03-04T17:23:21.9261521+00:00", - "target": { - "type": "AzureStorageBlob", - "uri": "https://accountname.blob.core.windows.net/containername/myblob.tar.gz", - "keyVaultUri": "https://myvault.vault.azure.net/secrets/acrexportsas", - "storageAccessMode": "SasToken" - } - }, - "provisioningState": "Succeeded" - } - }, - { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/pipelineRuns/myPipelineRun", - "name": "myPipelineRun", - "type": "Microsoft.ContainerRegistry/registries/pipelineRuns", - "properties": { - "request": { - "pipelineResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/importPipelines/myImportPipeline" - }, - "response": { - "status": "Succeeded", - "progress": { - "percentage": "100" - }, - "startTime": "2020-03-03T17:23:21.9261521+00:00", - "importedArtifacts": [ - "sourceRepository/hello-world", - "sourceRepository2@sha256:00000000000000000000000000000000000" - ], - "source": { - "type": "AzureStorageBlob", - "uri": "https://accountname.blob.core.windows.net/containername/myblob.tar.gz", - "keyVaultUri": "https://myvault.vault.azure.net/secrets/acrimportsas", - "storageAccessMode": "SasToken" - }, - "catalogDigest": "sha256@" - }, - "provisioningState": "Succeeded" - } - } - ] - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PrivateEndpointConnectionCreateOrUpdate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PrivateEndpointConnectionCreateOrUpdate.json deleted file mode 100644 index 0581d5dca9b..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PrivateEndpointConnectionCreateOrUpdate.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "title": "PrivateEndpointConnectionCreateOrUpdate", - "operationId": "PrivateEndpointConnections_CreateOrUpdate", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "privateEndpointConnectionName": "myConnection", - "privateEndpointConnection": { - "properties": { - "privateLinkServiceConnectionState": { - "status": "Approved", - "description": "Auto-Approved" - } - } - } - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/privateEndpointConnections/myConnection", - "name": "myConnection", - "type": "Microsoft.ContainerRegistry/registries/privateEndpointConnections", - "properties": { - "provisioningState": "Succeeded", - "privateEndpoint": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/peexample01" - }, - "privateLinkServiceConnectionState": { - "status": "Approved", - "description": "Auto-Approved", - "actionsRequired": "None" - } - } - } - }, - "201": { - "headers": { - "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/privateEndpointConnections/myConnection/operationStatuses/privateendpointconnections-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" - }, - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/privateEndpointConnections/myConnection", - "name": "myConnection", - "type": "Microsoft.ContainerRegistry/registries/privateEndpointConnections", - "properties": { - "provisioningState": "Succeeded", - "privateEndpoint": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/peexample01" - }, - "privateLinkServiceConnectionState": { - "status": "Approved", - "description": "Auto-Approved", - "actionsRequired": "None" - } - } - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PrivateEndpointConnectionDelete.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PrivateEndpointConnectionDelete.json deleted file mode 100644 index a1426a15ad6..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PrivateEndpointConnectionDelete.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "title": "PrivateEndpointConnectionDelete", - "operationId": "PrivateEndpointConnections_Delete", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "privateEndpointConnectionName": "myConnection" - }, - "responses": { - "200": {}, - "202": { - "headers": { - "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/privateEndpointConnections/myConnection/operationStatuses/privateendpointconnections-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" - } - }, - "204": {} - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PrivateEndpointConnectionGet.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PrivateEndpointConnectionGet.json deleted file mode 100644 index 5054d55b646..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PrivateEndpointConnectionGet.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "title": "PrivateEndpointConnectionGet", - "operationId": "PrivateEndpointConnections_Get", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "privateEndpointConnectionName": "myConnection" - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/privateEndpointConnections/myConnection", - "name": "myConnection", - "type": "Microsoft.ContainerRegistry/registries/privateEndpointConnections", - "properties": { - "provisioningState": "Succeeded", - "privateEndpoint": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/peexample01" - }, - "privateLinkServiceConnectionState": { - "status": "Approved", - "description": "Auto-Approved", - "actionsRequired": "None" - } - } - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PrivateEndpointConnectionList.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PrivateEndpointConnectionList.json deleted file mode 100644 index c9144ab9dcd..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/PrivateEndpointConnectionList.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "title": "PrivateEndpointConnectionList", - "operationId": "PrivateEndpointConnections_List", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/privateEndpointConnections/myConnection", - "name": "myConnection", - "type": "Microsoft.ContainerRegistry/registries/privateEndpointConnections", - "properties": { - "provisioningState": "Succeeded", - "privateEndpoint": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/peexample01" - }, - "privateLinkServiceConnectionState": { - "status": "Approved", - "description": "Auto-Approved", - "actionsRequired": "None" - } - } - } - ] - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryCheckNameAvailable.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryCheckNameAvailable.json deleted file mode 100644 index bd585cfab02..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryCheckNameAvailable.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "title": "RegistryCheckNameAvailable", - "operationId": "Registries_CheckNameAvailability", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "registryNameCheckRequest": { - "name": "myRegistry", - "type": "Microsoft.ContainerRegistry/registries", - "resourceGroupName": "myResourceGroup", - "autoGeneratedDomainNameLabelScope": "ResourceGroupReuse" - } - }, - "responses": { - "200": { - "body": { - "availableLoginServerName": "myregistry-a1b2c3d4e5f6.azurecr.io", - "nameAvailable": true - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryCheckNameNotAvailable.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryCheckNameNotAvailable.json deleted file mode 100644 index 8a244ae8aff..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryCheckNameNotAvailable.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "title": "RegistryCheckNameNotAvailable", - "operationId": "Registries_CheckNameAvailability", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "registryNameCheckRequest": { - "name": "myRegistry", - "type": "Microsoft.ContainerRegistry/registries", - "resourceGroupName": "myResourceGroup", - "autoGeneratedDomainNameLabelScope": "ResourceGroupReuse" - } - }, - "responses": { - "200": { - "body": { - "nameAvailable": false, - "reason": "AlreadyExists", - "message": "The registry myRegistry is already in use." - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryCreate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryCreate.json deleted file mode 100644 index 3b2fdf401ea..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryCreate.json +++ /dev/null @@ -1,144 +0,0 @@ -{ - "title": "RegistryCreate", - "operationId": "Registries_Create", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "registry": { - "location": "westus", - "tags": { - "key": "value" - }, - "sku": { - "name": "Standard" - }, - "properties": { - "adminUserEnabled": true - } - } - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry", - "name": "myRegistry", - "type": "Microsoft.ContainerRegistry/registries", - "location": "westus", - "tags": { - "key": "value" - }, - "sku": { - "name": "Standard", - "tier": "Standard" - }, - "properties": { - "loginServer": "myregistry.azurecr.io", - "creationDate": "2021-06-15T21:38:26.1537861Z", - "provisioningState": "Succeeded", - "adminUserEnabled": true, - "networkRuleSet": { - "defaultAction": "Allow", - "ipRules": [] - }, - "policies": { - "quarantinePolicy": { - "status": "disabled" - }, - "trustPolicy": { - "type": "Notary", - "status": "disabled" - }, - "retentionPolicy": { - "days": 7, - "lastUpdatedTime": "2021-06-15T21:40:12.8506835+00:00", - "status": "disabled" - }, - "exportPolicy": { - "status": "enabled" - } - }, - "encryption": { - "status": "disabled" - }, - "status": null, - "dataEndpointEnabled": false, - "dataEndpointHostNames": [], - "privateEndpointConnections": [], - "publicNetworkAccess": "Enabled", - "networkRuleBypassOptions": "AzureServices", - "networkRuleBypassAllowedForTasks": false, - "zoneRedundancy": "Disabled", - "anonymousPullEnabled": false, - "metadataSearch": "Disabled", - "autoGeneratedDomainNameLabelScope": "Unsecure", - "roleAssignmentMode": "LegacyRegistryPermissions", - "regionalEndpoints": "Disabled", - "regionalEndpointHostNames": [], - "endpointProtocol": "IPv4" - } - } - }, - "201": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry", - "name": "myRegistry", - "type": "Microsoft.ContainerRegistry/registries", - "location": "westus", - "tags": { - "key": "value" - }, - "sku": { - "name": "Standard", - "tier": "Standard" - }, - "properties": { - "loginServer": "myregistry.azurecr.io", - "creationDate": "2021-06-15T21:38:26.1537861Z", - "provisioningState": "Creating", - "adminUserEnabled": true, - "networkRuleSet": { - "defaultAction": "Allow", - "ipRules": [] - }, - "policies": { - "quarantinePolicy": { - "status": "disabled" - }, - "trustPolicy": { - "type": "Notary", - "status": "disabled" - }, - "retentionPolicy": { - "days": 7, - "lastUpdatedTime": "2021-06-15T21:40:12.8506835+00:00", - "status": "disabled" - }, - "exportPolicy": { - "status": "enabled" - } - }, - "encryption": { - "status": "disabled" - }, - "status": null, - "dataEndpointEnabled": false, - "dataEndpointHostNames": [], - "privateEndpointConnections": [], - "publicNetworkAccess": "Enabled", - "networkRuleBypassOptions": "AzureServices", - "networkRuleBypassAllowedForTasks": false, - "zoneRedundancy": "Disabled", - "anonymousPullEnabled": false, - "metadataSearch": "Disabled", - "autoGeneratedDomainNameLabelScope": "Unsecure", - "roleAssignmentMode": "LegacyRegistryPermissions", - "regionalEndpoints": "Disabled", - "regionalEndpointHostNames": [], - "endpointProtocol": "IPv4" - } - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryCreateAbac.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryCreateAbac.json deleted file mode 100644 index 2ba2b013185..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryCreateAbac.json +++ /dev/null @@ -1,144 +0,0 @@ -{ - "title": "RegistryCreateAbac", - "operationId": "Registries_Create", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "registry": { - "location": "westus", - "tags": { - "key": "value" - }, - "sku": { - "name": "Standard" - }, - "properties": { - "roleAssignmentMode": "AbacRepositoryPermissions" - } - } - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry", - "name": "myRegistry", - "type": "Microsoft.ContainerRegistry/registries", - "location": "westus", - "tags": { - "key": "value" - }, - "sku": { - "name": "Standard", - "tier": "Standard" - }, - "properties": { - "loginServer": "myregistry.azurecr.io", - "creationDate": "2021-06-15T21:38:26.1537861Z", - "provisioningState": "Succeeded", - "adminUserEnabled": true, - "networkRuleSet": { - "defaultAction": "Allow", - "ipRules": [] - }, - "policies": { - "quarantinePolicy": { - "status": "disabled" - }, - "trustPolicy": { - "type": "Notary", - "status": "disabled" - }, - "retentionPolicy": { - "days": 7, - "lastUpdatedTime": "2021-06-15T21:40:12.8506835+00:00", - "status": "disabled" - }, - "exportPolicy": { - "status": "enabled" - } - }, - "encryption": { - "status": "disabled" - }, - "status": null, - "dataEndpointEnabled": false, - "dataEndpointHostNames": [], - "privateEndpointConnections": [], - "publicNetworkAccess": "Enabled", - "networkRuleBypassOptions": "AzureServices", - "networkRuleBypassAllowedForTasks": false, - "zoneRedundancy": "Disabled", - "anonymousPullEnabled": false, - "metadataSearch": "Disabled", - "autoGeneratedDomainNameLabelScope": "Unsecure", - "roleAssignmentMode": "AbacRepositoryPermissions", - "regionalEndpoints": "Disabled", - "regionalEndpointHostNames": [], - "endpointProtocol": "IPv4" - } - } - }, - "201": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry", - "name": "myRegistry", - "type": "Microsoft.ContainerRegistry/registries", - "location": "westus", - "tags": { - "key": "value" - }, - "sku": { - "name": "Standard", - "tier": "Standard" - }, - "properties": { - "loginServer": "myregistry.azurecr.io", - "creationDate": "2021-06-15T21:38:26.1537861Z", - "provisioningState": "Creating", - "adminUserEnabled": true, - "networkRuleSet": { - "defaultAction": "Allow", - "ipRules": [] - }, - "policies": { - "quarantinePolicy": { - "status": "disabled" - }, - "trustPolicy": { - "type": "Notary", - "status": "disabled" - }, - "retentionPolicy": { - "days": 7, - "lastUpdatedTime": "2021-06-15T21:40:12.8506835+00:00", - "status": "disabled" - }, - "exportPolicy": { - "status": "enabled" - } - }, - "encryption": { - "status": "disabled" - }, - "status": null, - "dataEndpointEnabled": false, - "dataEndpointHostNames": [], - "privateEndpointConnections": [], - "publicNetworkAccess": "Enabled", - "networkRuleBypassOptions": "AzureServices", - "networkRuleBypassAllowedForTasks": false, - "zoneRedundancy": "Disabled", - "anonymousPullEnabled": false, - "metadataSearch": "Disabled", - "autoGeneratedDomainNameLabelScope": "Unsecure", - "roleAssignmentMode": "AbacRepositoryPermissions", - "regionalEndpoints": "Disabled", - "regionalEndpointHostNames": [], - "endpointProtocol": "IPv4" - } - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryCreateDomainNameLabelScope.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryCreateDomainNameLabelScope.json deleted file mode 100644 index bf419e5f702..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryCreateDomainNameLabelScope.json +++ /dev/null @@ -1,144 +0,0 @@ -{ - "title": "RegistryCreateDomainNameLabelScope", - "operationId": "Registries_Create", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "registry": { - "location": "westus", - "tags": { - "key": "value" - }, - "sku": { - "name": "Standard" - }, - "properties": { - "autoGeneratedDomainNameLabelScope": "TenantReuse" - } - } - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry", - "name": "myRegistry", - "type": "Microsoft.ContainerRegistry/registries", - "location": "westus", - "tags": { - "key": "value" - }, - "sku": { - "name": "Standard", - "tier": "Standard" - }, - "properties": { - "loginServer": "myRegistry-a1b2c3d4e5f6.azurecr.io", - "creationDate": "2021-06-15T21:38:26.1537861Z", - "provisioningState": "Succeeded", - "adminUserEnabled": false, - "networkRuleSet": { - "defaultAction": "Allow", - "ipRules": [] - }, - "policies": { - "quarantinePolicy": { - "status": "disabled" - }, - "trustPolicy": { - "type": "Notary", - "status": "disabled" - }, - "retentionPolicy": { - "days": 7, - "lastUpdatedTime": "2021-06-15T21:40:12.8506835+00:00", - "status": "disabled" - }, - "exportPolicy": { - "status": "enabled" - } - }, - "encryption": { - "status": "disabled" - }, - "status": null, - "dataEndpointEnabled": false, - "dataEndpointHostNames": [], - "privateEndpointConnections": [], - "publicNetworkAccess": "Enabled", - "networkRuleBypassOptions": "AzureServices", - "networkRuleBypassAllowedForTasks": false, - "zoneRedundancy": "Disabled", - "anonymousPullEnabled": false, - "metadataSearch": "Disabled", - "autoGeneratedDomainNameLabelScope": "TenantReuse", - "roleAssignmentMode": "LegacyRegistryPermissions", - "regionalEndpoints": "Disabled", - "regionalEndpointHostNames": [], - "endpointProtocol": "IPv4" - } - } - }, - "201": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry", - "name": "myRegistry", - "type": "Microsoft.ContainerRegistry/registries", - "location": "westus", - "tags": { - "key": "value" - }, - "sku": { - "name": "Standard", - "tier": "Standard" - }, - "properties": { - "loginServer": "myRegistry-a1b2c3d4e5f6.azurecr.io", - "creationDate": "2021-06-15T21:38:26.1537861Z", - "provisioningState": "Creating", - "adminUserEnabled": false, - "networkRuleSet": { - "defaultAction": "Allow", - "ipRules": [] - }, - "policies": { - "quarantinePolicy": { - "status": "disabled" - }, - "trustPolicy": { - "type": "Notary", - "status": "disabled" - }, - "retentionPolicy": { - "days": 7, - "lastUpdatedTime": "2021-06-15T21:40:12.8506835+00:00", - "status": "disabled" - }, - "exportPolicy": { - "status": "enabled" - } - }, - "encryption": { - "status": "disabled" - }, - "status": null, - "dataEndpointEnabled": false, - "dataEndpointHostNames": [], - "privateEndpointConnections": [], - "publicNetworkAccess": "Enabled", - "networkRuleBypassOptions": "AzureServices", - "networkRuleBypassAllowedForTasks": false, - "zoneRedundancy": "Disabled", - "anonymousPullEnabled": false, - "metadataSearch": "Disabled", - "autoGeneratedDomainNameLabelScope": "TenantReuse", - "roleAssignmentMode": "LegacyRegistryPermissions", - "regionalEndpoints": "Disabled", - "regionalEndpointHostNames": [], - "endpointProtocol": "IPv4" - } - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryCreateZoneRedundant.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryCreateZoneRedundant.json deleted file mode 100644 index 425f27d775d..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryCreateZoneRedundant.json +++ /dev/null @@ -1,147 +0,0 @@ -{ - "title": "RegistryCreateZoneRedundant", - "operationId": "Registries_Create", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "registry": { - "location": "westus", - "tags": { - "key": "value" - }, - "sku": { - "name": "Standard" - }, - "properties": { - "zoneRedundancy": "Enabled" - } - } - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry", - "name": "myRegistry", - "type": "Microsoft.ContainerRegistry/registries", - "location": "westus", - "tags": { - "key": "value" - }, - "sku": { - "name": "Standard", - "tier": "Standard" - }, - "properties": { - "loginServer": "myregistry.azurecr.io", - "creationDate": "2021-06-15T21:38:26.1537861Z", - "provisioningState": "Succeeded", - "adminUserEnabled": false, - "networkRuleSet": { - "defaultAction": "Allow", - "ipRules": [] - }, - "policies": { - "quarantinePolicy": { - "status": "disabled" - }, - "trustPolicy": { - "type": "Notary", - "status": "disabled" - }, - "retentionPolicy": { - "days": 7, - "lastUpdatedTime": "2021-06-15T21:40:12.8506835+00:00", - "status": "disabled" - }, - "exportPolicy": { - "status": "enabled" - } - }, - "encryption": { - "status": "disabled" - }, - "status": null, - "dataEndpointEnabled": false, - "dataEndpointHostNames": [], - "privateEndpointConnections": [], - "publicNetworkAccess": "Enabled", - "networkRuleBypassOptions": "AzureServices", - "networkRuleBypassAllowedForTasks": false, - "zoneRedundancy": "Enabled", - "anonymousPullEnabled": false, - "metadataSearch": "Disabled", - "autoGeneratedDomainNameLabelScope": "Unsecure", - "roleAssignmentMode": "LegacyRegistryPermissions", - "regionalEndpoints": "Disabled", - "regionalEndpointHostNames": [], - "endpointProtocol": "IPv4" - } - } - }, - "201": { - "headers": { - "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/operationStatuses/registries-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" - }, - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry", - "name": "myRegistry", - "type": "Microsoft.ContainerRegistry/registries", - "location": "westus", - "tags": { - "key": "value" - }, - "sku": { - "name": "Standard", - "tier": "Standard" - }, - "properties": { - "loginServer": "myregistry.azurecr.io", - "creationDate": "2021-06-15T21:38:26.1537861Z", - "provisioningState": "Creating", - "adminUserEnabled": false, - "networkRuleSet": { - "defaultAction": "Allow", - "ipRules": [] - }, - "policies": { - "quarantinePolicy": { - "status": "disabled" - }, - "trustPolicy": { - "type": "Notary", - "status": "disabled" - }, - "retentionPolicy": { - "days": 7, - "lastUpdatedTime": "2021-06-15T21:40:12.8506835+00:00", - "status": "disabled" - }, - "exportPolicy": { - "status": "enabled" - } - }, - "encryption": { - "status": "disabled" - }, - "status": null, - "dataEndpointEnabled": false, - "dataEndpointHostNames": [], - "privateEndpointConnections": [], - "publicNetworkAccess": "Enabled", - "networkRuleBypassOptions": "AzureServices", - "networkRuleBypassAllowedForTasks": false, - "zoneRedundancy": "Enabled", - "anonymousPullEnabled": false, - "metadataSearch": "Disabled", - "autoGeneratedDomainNameLabelScope": "Unsecure", - "roleAssignmentMode": "LegacyRegistryPermissions", - "regionalEndpoints": "Disabled", - "regionalEndpointHostNames": [], - "endpointProtocol": "IPv4" - } - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryDelete.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryDelete.json deleted file mode 100644 index 75b63b59f39..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryDelete.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "title": "RegistryDelete", - "operationId": "Registries_Delete", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry" - }, - "responses": { - "200": {}, - "202": { - "headers": { - "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/operationStatuses/registries-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" - } - }, - "204": {} - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryGenerateCredentials.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryGenerateCredentials.json deleted file mode 100644 index 71b2bada16d..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryGenerateCredentials.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "title": "RegistryGenerateCredentials", - "operationId": "Registries_GenerateCredentials", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "generateCredentialsParameters": { - "tokenId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/myToken", - "expiry": "2020-12-31T15:59:59.0707808Z" - } - }, - "responses": { - "200": { - "body": { - "username": "myToken", - "passwords": [ - { - "expiry": "2020-12-31T15:59:59.0707808Z", - "name": "password1", - "value": "00000000000000000000000000000000" - }, - { - "expiry": "2020-12-31T15:59:59.0707808Z", - "name": "password2", - "value": "00000000000000000000000000000000" - } - ] - } - }, - "202": { - "headers": { - "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/operationStatuses/registries-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryGet.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryGet.json deleted file mode 100644 index 1a85547d1ff..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryGet.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "title": "RegistryGet", - "operationId": "Registries_Get", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry" - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry", - "name": "myRegistry", - "type": "Microsoft.ContainerRegistry/registries", - "location": "westus", - "tags": { - "key": "value" - }, - "sku": { - "name": "Standard", - "tier": "Standard" - }, - "properties": { - "loginServer": "myregistry.azurecr.io", - "creationDate": "2021-06-15T21:38:26.1537861Z", - "provisioningState": "Succeeded", - "adminUserEnabled": false, - "networkRuleSet": { - "defaultAction": "Allow", - "ipRules": [] - }, - "policies": { - "quarantinePolicy": { - "status": "disabled" - }, - "trustPolicy": { - "type": "Notary", - "status": "disabled" - }, - "retentionPolicy": { - "days": 7, - "lastUpdatedTime": "2021-06-15T21:40:12.8506835+00:00", - "status": "disabled" - }, - "exportPolicy": { - "status": "enabled" - } - }, - "encryption": { - "status": "disabled" - }, - "status": null, - "dataEndpointEnabled": false, - "dataEndpointHostNames": [], - "privateEndpointConnections": [], - "publicNetworkAccess": "Enabled", - "networkRuleBypassOptions": "AzureServices", - "networkRuleBypassAllowedForTasks": false, - "zoneRedundancy": "Disabled", - "anonymousPullEnabled": false, - "metadataSearch": "Disabled", - "autoGeneratedDomainNameLabelScope": "Unsecure", - "roleAssignmentMode": "LegacyRegistryPermissions", - "regionalEndpoints": "Disabled", - "regionalEndpointHostNames": [], - "endpointProtocol": "IPv4" - } - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryGetPrivateLinkResource.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryGetPrivateLinkResource.json deleted file mode 100644 index a6994533624..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryGetPrivateLinkResource.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "title": "RegistryGetPrivateLinkResource", - "operationId": "Registries_GetPrivateLinkResource", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "groupName": "registry" - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/privateLinkResources/registry", - "name": "registry", - "type": "Microsoft.ContainerRegistry/registries/privateLinkResources", - "properties": { - "groupId": "registry", - "requiredMembers": [ - "registry", - "registry_data_myregion" - ], - "requiredZoneNames": [ - "privatelink.azurecr.io" - ] - } - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryList.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryList.json deleted file mode 100644 index 6d4bd5749f7..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryList.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "title": "RegistryList", - "operationId": "Registries_List", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry", - "name": "myRegistry", - "type": "Microsoft.ContainerRegistry/registries", - "location": "westus", - "tags": { - "key": "value" - }, - "sku": { - "name": "Standard", - "tier": "Standard" - }, - "properties": { - "loginServer": "myregistry.azurecr.io", - "creationDate": "2021-06-15T21:38:26.1537861Z", - "provisioningState": "Succeeded", - "adminUserEnabled": false, - "networkRuleSet": { - "defaultAction": "Allow", - "ipRules": [] - }, - "policies": { - "quarantinePolicy": { - "status": "disabled" - }, - "trustPolicy": { - "type": "Notary", - "status": "disabled" - }, - "retentionPolicy": { - "days": 7, - "lastUpdatedTime": "2021-06-15T21:40:12.8506835+00:00", - "status": "disabled" - }, - "exportPolicy": { - "status": "enabled" - } - }, - "encryption": { - "status": "disabled" - }, - "status": null, - "dataEndpointEnabled": false, - "dataEndpointHostNames": [], - "privateEndpointConnections": [], - "publicNetworkAccess": "Enabled", - "networkRuleBypassOptions": "AzureServices", - "networkRuleBypassAllowedForTasks": false, - "zoneRedundancy": "Disabled", - "anonymousPullEnabled": false, - "metadataSearch": "Disabled", - "autoGeneratedDomainNameLabelScope": "Unsecure", - "roleAssignmentMode": "LegacyRegistryPermissions", - "regionalEndpoints": "Disabled", - "regionalEndpointHostNames": [], - "endpointProtocol": "IPv4" - } - } - ] - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryListByResourceGroup.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryListByResourceGroup.json deleted file mode 100644 index a7354c1375a..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryListByResourceGroup.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "title": "RegistryListByResourceGroup", - "operationId": "Registries_ListByResourceGroup", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry", - "name": "myRegistry", - "type": "Microsoft.ContainerRegistry/registries", - "location": "westus", - "tags": { - "key": "value" - }, - "sku": { - "name": "Standard", - "tier": "Standard" - }, - "properties": { - "loginServer": "myregistry.azurecr.io", - "creationDate": "2021-06-15T21:38:26.1537861Z", - "provisioningState": "Succeeded", - "adminUserEnabled": false, - "networkRuleSet": { - "defaultAction": "Allow", - "ipRules": [] - }, - "policies": { - "quarantinePolicy": { - "status": "disabled" - }, - "trustPolicy": { - "type": "Notary", - "status": "disabled" - }, - "retentionPolicy": { - "days": 7, - "lastUpdatedTime": "2021-06-15T21:40:12.8506835+00:00", - "status": "disabled" - }, - "exportPolicy": { - "status": "enabled" - } - }, - "encryption": { - "status": "disabled" - }, - "status": null, - "dataEndpointEnabled": false, - "dataEndpointHostNames": [], - "privateEndpointConnections": [], - "publicNetworkAccess": "Enabled", - "networkRuleBypassOptions": "AzureServices", - "networkRuleBypassAllowedForTasks": false, - "zoneRedundancy": "Disabled", - "anonymousPullEnabled": false, - "metadataSearch": "Disabled", - "autoGeneratedDomainNameLabelScope": "Unsecure", - "roleAssignmentMode": "LegacyRegistryPermissions", - "regionalEndpoints": "Disabled", - "regionalEndpointHostNames": [], - "endpointProtocol": "IPv4" - } - } - ] - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryListCredentials.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryListCredentials.json deleted file mode 100644 index c2c4310ef40..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryListCredentials.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "title": "RegistryListCredentials", - "operationId": "Registries_ListCredentials", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry" - }, - "responses": { - "200": { - "body": { - "username": "myRegistry", - "passwords": [ - { - "name": "password", - "value": "00000000000000000000000000000000" - }, - { - "name": "password2", - "value": "00000000000000000000000000000000" - } - ] - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryListPrivateLinkResources.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryListPrivateLinkResources.json deleted file mode 100644 index 30342b449d4..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryListPrivateLinkResources.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "title": "RegistryListPrivateLinkResources", - "operationId": "Registries_ListPrivateLinkResources", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/privateLinkResources/registry", - "name": "registry", - "type": "Microsoft.ContainerRegistry/registries/privateLinkResources", - "properties": { - "groupId": "registry", - "requiredMembers": [ - "registry", - "registry_data_myregion" - ], - "requiredZoneNames": [ - "privatelink.azurecr.io" - ] - } - } - ] - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryListUsages.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryListUsages.json deleted file mode 100644 index 8811f4b6175..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryListUsages.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "title": "RegistryListUsages", - "operationId": "Registries_ListUsages", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "name": "Size", - "limit": 107374182400, - "currentValue": 12345678, - "unit": "Bytes" - }, - { - "name": "Webhooks", - "limit": 10, - "currentValue": 2, - "unit": "Count" - } - ] - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryRegenerateCredential.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryRegenerateCredential.json deleted file mode 100644 index d26b950e6a7..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryRegenerateCredential.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "title": "RegistryRegenerateCredential", - "operationId": "Registries_RegenerateCredential", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "regenerateCredentialParameters": { - "name": "password" - } - }, - "responses": { - "200": { - "body": { - "username": "myRegistry", - "passwords": [ - { - "name": "password", - "value": "00000000000000000000000000000000" - }, - { - "name": "password2", - "value": "00000000000000000000000000000000" - } - ] - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryUpdate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryUpdate.json deleted file mode 100644 index d0349ea1de2..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/RegistryUpdate.json +++ /dev/null @@ -1,147 +0,0 @@ -{ - "title": "RegistryUpdate", - "operationId": "Registries_Update", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "registryUpdateParameters": { - "tags": { - "key": "value" - }, - "sku": { - "name": "Standard" - }, - "properties": { - "adminUserEnabled": true, - "roleAssignmentMode": "AbacRepositoryPermissions" - } - } - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry", - "name": "myRegistry", - "type": "Microsoft.ContainerRegistry/registries", - "location": "westus", - "tags": { - "key": "value" - }, - "sku": { - "name": "Standard", - "tier": "Standard" - }, - "properties": { - "loginServer": "myregistry.azurecr.io", - "creationDate": "2021-06-15T21:38:26.1537861Z", - "provisioningState": "Succeeded", - "adminUserEnabled": true, - "networkRuleSet": { - "defaultAction": "Allow", - "ipRules": [] - }, - "policies": { - "quarantinePolicy": { - "status": "disabled" - }, - "trustPolicy": { - "type": "Notary", - "status": "disabled" - }, - "retentionPolicy": { - "days": 7, - "lastUpdatedTime": "2021-06-15T21:40:12.8506835+00:00", - "status": "disabled" - }, - "exportPolicy": { - "status": "enabled" - } - }, - "encryption": { - "status": "disabled" - }, - "status": null, - "dataEndpointEnabled": false, - "dataEndpointHostNames": [], - "privateEndpointConnections": [], - "publicNetworkAccess": "Enabled", - "networkRuleBypassOptions": "AzureServices", - "networkRuleBypassAllowedForTasks": false, - "zoneRedundancy": "Disabled", - "anonymousPullEnabled": false, - "metadataSearch": "Disabled", - "autoGeneratedDomainNameLabelScope": "Unsecure", - "roleAssignmentMode": "AbacRepositoryPermissions", - "regionalEndpoints": "Disabled", - "regionalEndpointHostNames": [], - "endpointProtocol": "IPv4" - } - } - }, - "201": { - "headers": { - "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/operationStatuses/registries-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" - }, - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry", - "name": "myRegistry", - "type": "Microsoft.ContainerRegistry/registries", - "location": "westus", - "tags": { - "key": "value" - }, - "sku": { - "name": "Standard", - "tier": "Standard" - }, - "properties": { - "loginServer": "myregistry.azurecr.io", - "creationDate": "2021-06-15T21:38:26.1537861Z", - "provisioningState": "Updating", - "adminUserEnabled": true, - "networkRuleSet": { - "defaultAction": "Allow", - "ipRules": [] - }, - "policies": { - "quarantinePolicy": { - "status": "disabled" - }, - "trustPolicy": { - "type": "Notary", - "status": "disabled" - }, - "retentionPolicy": { - "days": 7, - "lastUpdatedTime": "2021-06-15T21:40:12.8506835+00:00", - "status": "disabled" - }, - "exportPolicy": { - "status": "enabled" - } - }, - "encryption": { - "status": "disabled" - }, - "status": null, - "dataEndpointEnabled": false, - "dataEndpointHostNames": [], - "privateEndpointConnections": [], - "publicNetworkAccess": "Enabled", - "networkRuleBypassOptions": "AzureServices", - "networkRuleBypassAllowedForTasks": false, - "zoneRedundancy": "Disabled", - "anonymousPullEnabled": false, - "metadataSearch": "Disabled", - "autoGeneratedDomainNameLabelScope": "Unsecure", - "roleAssignmentMode": "AbacRepositoryPermissions", - "regionalEndpoints": "Disabled", - "regionalEndpointHostNames": [], - "endpointProtocol": "IPv4" - } - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ReplicationCreate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ReplicationCreate.json deleted file mode 100644 index 9f27e9b0159..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ReplicationCreate.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "title": "ReplicationCreate", - "operationId": "Replications_Create", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "replicationName": "myReplication", - "replication": { - "location": "eastus", - "tags": { - "key": "value" - } - } - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/replications/myReplication", - "name": "myReplication", - "type": "Microsoft.ContainerRegistry/registries/replications", - "location": "eastus", - "tags": { - "key": "value" - }, - "properties": { - "provisioningState": "Succeeded", - "status": { - "displayStatus": "Ready", - "message": "The replication is ready.", - "timestamp": "2017-03-01T23:15:37.0707808Z" - }, - "regionEndpointEnabled": true, - "zoneRedundancy": "Disabled" - } - } - }, - "201": { - "headers": { - "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/replications/myReplication/operationStatuses/replications-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" - }, - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/replications/myReplication", - "name": "myReplication", - "type": "Microsoft.ContainerRegistry/registries/replications", - "location": "eastus", - "tags": { - "key": "value" - }, - "properties": { - "provisioningState": "Creating", - "status": { - "displayStatus": "Provisioning", - "message": "The replication is provisioning.", - "timestamp": "2017-03-01T23:15:37.0707808Z" - }, - "regionEndpointEnabled": true, - "zoneRedundancy": "Disabled" - } - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ReplicationCreateZoneRedundant.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ReplicationCreateZoneRedundant.json deleted file mode 100644 index 8df9ac715a4..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ReplicationCreateZoneRedundant.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "title": "ReplicationCreateZoneRedundant", - "operationId": "Replications_Create", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "replicationName": "myReplication", - "replication": { - "location": "eastus", - "tags": { - "key": "value" - }, - "properties": { - "regionEndpointEnabled": true, - "zoneRedundancy": "Enabled" - } - } - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/replications/myReplication", - "name": "myReplication", - "type": "Microsoft.ContainerRegistry/registries/replications", - "location": "eastus", - "tags": { - "key": "value" - }, - "properties": { - "provisioningState": "Succeeded", - "status": { - "displayStatus": "Ready", - "message": "The replication is ready.", - "timestamp": "2017-03-01T23:15:37.0707808Z" - }, - "regionEndpointEnabled": true, - "zoneRedundancy": "Enabled" - } - } - }, - "201": { - "headers": { - "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/replications/myReplication/operationStatuses/replications-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" - }, - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/replications/myReplication", - "name": "myReplication", - "type": "Microsoft.ContainerRegistry/registries/replications", - "location": "eastus", - "tags": { - "key": "value" - }, - "properties": { - "provisioningState": "Creating", - "status": { - "displayStatus": "Provisioning", - "message": "The replication is provisioning.", - "timestamp": "2017-03-01T23:15:37.0707808Z" - }, - "regionEndpointEnabled": true, - "zoneRedundancy": "Enabled" - } - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ReplicationDelete.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ReplicationDelete.json deleted file mode 100644 index 44fc956e35d..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ReplicationDelete.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "title": "ReplicationDelete", - "operationId": "Replications_Delete", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "replicationName": "myReplication" - }, - "responses": { - "200": {}, - "202": { - "headers": { - "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/replications/myReplication/operationStatuses/replications-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" - } - }, - "204": {} - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ReplicationGet.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ReplicationGet.json deleted file mode 100644 index 67355487ce1..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ReplicationGet.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "title": "ReplicationGet", - "operationId": "Replications_Get", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "replicationName": "myReplication" - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/replications/myReplication", - "name": "myReplication", - "type": "Microsoft.ContainerRegistry/registries/replications", - "location": "eastus", - "tags": { - "key": "value" - }, - "properties": { - "provisioningState": "Succeeded", - "status": { - "displayStatus": "Ready", - "message": "The replication is ready.", - "timestamp": "2017-03-01T23:15:37.0707808Z" - }, - "regionEndpointEnabled": true, - "zoneRedundancy": "Disabled" - } - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ReplicationList.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ReplicationList.json deleted file mode 100644 index 3afcb569173..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ReplicationList.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "title": "ReplicationList", - "operationId": "Replications_List", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/replications/myReplication", - "name": "myReplication", - "type": "Microsoft.ContainerRegistry/registries/replications", - "location": "eastus", - "tags": { - "key": "value" - }, - "properties": { - "provisioningState": "Succeeded", - "status": { - "displayStatus": "Ready", - "message": "The replication is ready.", - "timestamp": "2017-03-01T23:15:37.0707808Z" - }, - "regionEndpointEnabled": true, - "zoneRedundancy": "Disabled" - } - } - ] - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ReplicationUpdate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ReplicationUpdate.json deleted file mode 100644 index 2d3905400ff..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ReplicationUpdate.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "title": "ReplicationUpdate", - "operationId": "Replications_Update", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "replicationName": "myReplication", - "replicationUpdateParameters": { - "tags": { - "key": "value" - } - } - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/replications/myReplication", - "name": "myReplication", - "type": "Microsoft.ContainerRegistry/registries/replications", - "location": "eastus", - "tags": { - "key": "value" - }, - "properties": { - "provisioningState": "Succeeded", - "status": { - "displayStatus": "Ready", - "message": "The replication is ready.", - "timestamp": "2017-03-01T23:15:37.0707808Z" - }, - "regionEndpointEnabled": true, - "zoneRedundancy": "Disabled" - } - } - }, - "201": { - "headers": { - "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/replications/myReplication/operationStatuses/replications-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" - }, - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/replications/myReplication", - "name": "myReplication", - "type": "Microsoft.ContainerRegistry/registries/replications", - "location": "eastus", - "tags": { - "key": "value" - }, - "properties": { - "provisioningState": "Updating", - "status": { - "displayStatus": "Provisioning", - "message": "The replication is provisioning.", - "timestamp": "2017-03-01T23:15:37.0707808Z" - }, - "regionEndpointEnabled": true, - "zoneRedundancy": "Disabled" - } - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ScopeMapCreate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ScopeMapCreate.json deleted file mode 100644 index a4a87f50b24..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ScopeMapCreate.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "title": "ScopeMapCreate", - "operationId": "ScopeMaps_Create", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "scopeMapName": "myScopeMap", - "scopeMapCreateParameters": { - "properties": { - "description": "Developer Scopes", - "actions": [ - "repositories/myrepository/contentWrite", - "repositories/myrepository/delete" - ] - } - } - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myScopeMap", - "name": "myScopeMap", - "type": "Microsoft.ContainerRegistry/registries/scopeMaps", - "properties": { - "creationDate": "2017-03-01T23:14:37.0707808Z", - "type": "IsUserDefined", - "actions": [ - "repositories/myrepository/contentWrite", - "repositories/myrepository/delete" - ], - "provisioningState": "Succeeded" - } - } - }, - "201": { - "headers": { - "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myScopeMap/operationStatuses/scopemaps-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" - }, - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myScopeMap", - "name": "myScopeMap", - "type": "Microsoft.ContainerRegistry/registries/scopeMaps", - "properties": { - "creationDate": "2017-03-01T23:14:37.0707808Z", - "type": "IsUserDefined", - "actions": [ - "repositories/myrepository/contentWrite", - "repositories/myrepository/delete" - ], - "provisioningState": "Succeeded" - } - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ScopeMapDelete.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ScopeMapDelete.json deleted file mode 100644 index 1130b71e7f6..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ScopeMapDelete.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "title": "ScopeMapDelete", - "operationId": "ScopeMaps_Delete", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "scopeMapName": "myScopeMap" - }, - "responses": { - "200": {}, - "202": { - "headers": { - "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myScopeMap/operationStatuses/scopemaps-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" - } - }, - "204": {} - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ScopeMapGet.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ScopeMapGet.json deleted file mode 100644 index 0e5797bd370..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ScopeMapGet.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "title": "ScopeMapGet", - "operationId": "ScopeMaps_Get", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "scopeMapName": "myScopeMap" - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myScopeMap", - "name": "myScopeMap", - "type": "Microsoft.ContainerRegistry/registries/scopeMaps", - "properties": { - "creationDate": "2017-03-01T23:14:37.0707808Z", - "type": "IsUserDefined", - "actions": [ - "repositories/myrepository/contentWrite", - "repositories/myrepository/delete" - ], - "provisioningState": "Succeeded" - } - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ScopeMapList.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ScopeMapList.json deleted file mode 100644 index 01df9b08cca..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ScopeMapList.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "title": "ScopeMapList", - "operationId": "ScopeMaps_List", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myScopeMap", - "name": "myScopeMap", - "type": "Microsoft.ContainerRegistry/registries/scopeMaps", - "properties": { - "creationDate": "2017-03-01T23:14:37.0707808Z", - "type": "IsUserDefined", - "actions": [ - "repositories/myrepository/contentWrite", - "repositories/myrepository/delete" - ], - "provisioningState": "Succeeded" - } - } - ] - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ScopeMapUpdate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ScopeMapUpdate.json deleted file mode 100644 index 8a526af52eb..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/ScopeMapUpdate.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "title": "ScopeMapUpdate", - "operationId": "ScopeMaps_Update", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "scopeMapName": "myScopeMap", - "scopeMapUpdateParameters": { - "properties": { - "description": "Developer Scopes", - "actions": [ - "repositories/myrepository/contentWrite", - "repositories/myrepository/contentRead" - ] - } - } - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myScopeMap", - "name": "myScopeMap", - "type": "Microsoft.ContainerRegistry/registries/scopeMaps", - "properties": { - "creationDate": "2017-03-01T23:14:37.0707808Z", - "type": "IsUserDefined", - "actions": [ - "repositories/myrepository/contentWrite", - "repositories/myrepository/contentRead" - ], - "provisioningState": "Succeeded" - } - } - }, - "201": { - "headers": { - "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myScopeMap/operationStatuses/scopemaps-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" - }, - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myScopeMap", - "name": "myScopeMap", - "type": "Microsoft.ContainerRegistry/registries/scopeMaps", - "properties": { - "creationDate": "2017-03-01T23:14:37.0707808Z", - "type": "IsUserDefined", - "actions": [ - "repositories/myrepository/contentWrite", - "repositories/myrepository/contentRead" - ], - "provisioningState": "Succeeded" - } - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/TokenCreate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/TokenCreate.json deleted file mode 100644 index 2a8da522fa1..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/TokenCreate.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "title": "TokenCreate", - "operationId": "Tokens_Create", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "tokenName": "myToken", - "tokenCreateParameters": { - "properties": { - "scopeMapId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myScopeMap", - "status": "disabled", - "credentials": { - "certificates": [ - { - "name": "certificate1", - "encodedPemCertificate": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUc3akNDQk5hZ0F3SUJBZ0lURmdBQlR3UVpyZGdmdmhxdzBnQUFBQUZQQkRBTkJna3Foa2lHOXcwQkFRc0YKQURDQml6RUxNQWtHQTFVRUJoTUNWVk14RXpBUkJnTlZCQWdUQ2xkaGMyaHBibWQwYjI0eEVEQU9CZ05WQkFjVApCMUpsWkcxdmJtUXhIakFjQmdOVkJBb1RGVTFwWTNKdmMyOW1kQ0JEYjNKd2IzSmhkR2x2YmpFVk1CTUdBMVVFCkN4TU1UV2xqY205emIyWjBJRWxVTVI0d0hBWURWUVFERXhWTmFXTnliM052Wm5RZ1NWUWdWRXhUSUVOQklEUXcKSGhjTk1UZ3dOREV5TWpJek1qUTRXaGNOTWpBd05ERXlNakl6TWpRNFdqQTVNVGN3TlFZRFZRUURFeTV6WlhKMgphV05sWTJ4cFpXNTBZMlZ5ZEMxd1lYSjBibVZ5TG0xaGJtRm5aVzFsYm5RdVlYcDFjbVV1WTI5dE1JSUJJakFOCkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQTBSYjdJcHpxMmR4emhhbVpyS1ZDakMzeTQyYlYKUnNIY2pCUTFuSDBHZ1puUDhXeDZDSE1mWThybkVJQzRLeVRRYkJXVzhnNXlmc3NSQ0ZXbFpxYjR6SkRXS0pmTgpGSmNMUm9LNnhwTktZYVZVTkVlT25IdUxHYTM0ZlA0VjBFRjZybzdvbkRLME5zanhjY1dZVzRNVXVzc0xrQS94CkUrM2RwU1REdk1KcjJoWUpsVnFDcVR6blQvbmZaVUZzQUVEQnp5MUpOOHZiZDlIR2czc2Myd0x4dk95cFJOc0gKT1V3V2pmN2xzWWZleEVlcWkzY29EeHc2alpLVWEyVkdsUnBpTkowMjhBQitYSi9TU1FVNVBsd0JBbU9TT3ovRApGY0NKdGpPZlBqU1NKckFIQVV3SHU3RzlSV05JTFBwYU9zQ1J5eitETE5zNGpvNlEvUUg4d1lManJRSURBUUFCCm80SUNtakNDQXBZd0N3WURWUjBQQkFRREFnU3dNQjBHQTFVZEpRUVdNQlFHQ0NzR0FRVUZCd01DQmdnckJnRUYKQlFjREFUQWRCZ05WSFE0RUZnUVVlbEdkVVJrZzJoSFFOWEQ4WUc4L3drdjJVT0F3SHdZRFZSMGpCQmd3Rm9BVQplbnVNd2Mvbm9Nb2MxR3Y2KytFend3OGFvcDB3Z2F3R0ExVWRId1NCcERDQm9UQ0JucUNCbTZDQm1JWkxhSFIwCmNEb3ZMMjF6WTNKc0xtMXBZM0p2YzI5bWRDNWpiMjB2Y0d0cEwyMXpZMjl5Y0M5amNtd3ZUV2xqY205emIyWjAKSlRJd1NWUWxNakJVVEZNbE1qQkRRU1V5TURRdVkzSnNoa2xvZEhSd09pOHZZM0pzTG0xcFkzSnZjMjltZEM1agpiMjB2Y0d0cEwyMXpZMjl5Y0M5amNtd3ZUV2xqY205emIyWjBKVEl3U1ZRbE1qQlVURk1sTWpCRFFTVXlNRFF1ClkzSnNNSUdGQmdnckJnRUZCUWNCQVFSNU1IY3dVUVlJS3dZQkJRVUhNQUtHUldoMGRIQTZMeTkzZDNjdWJXbGoKY205emIyWjBMbU52YlM5d2Eya3ZiWE5qYjNKd0wwMXBZM0p2YzI5bWRDVXlNRWxVSlRJd1ZFeFRKVEl3UTBFbApNakEwTG1OeWREQWlCZ2dyQmdFRkJRY3dBWVlXYUhSMGNEb3ZMMjlqYzNBdWJYTnZZM053TG1OdmJUQStCZ2tyCkJnRUVBWUkzRlFjRU1UQXZCaWNyQmdFRUFZSTNGUWlIMm9aMWcrN1pBWUxKaFJ1QnRaNWhoZlRyWUlGZGhOTGYKUW9Mbmszb0NBV1FDQVIwd1RRWURWUjBnQkVZd1JEQkNCZ2tyQmdFRUFZSTNLZ0V3TlRBekJnZ3JCZ0VGQlFjQwpBUlluYUhSMGNEb3ZMM2QzZHk1dGFXTnliM052Wm5RdVkyOXRMM0JyYVM5dGMyTnZjbkF2WTNCek1DY0dDU3NHCkFRUUJnamNWQ2dRYU1CZ3dDZ1lJS3dZQkJRVUhBd0l3Q2dZSUt3WUJCUVVIQXdFd09RWURWUjBSQkRJd01JSXUKYzJWeWRtbGpaV05zYVdWdWRHTmxjblF0Y0dGeWRHNWxjaTV0WVc1aFoyVnRaVzUwTG1GNmRYSmxMbU52YlRBTgpCZ2txaGtpRzl3MEJBUXNGQUFPQ0FnRUFIVXIzbk1vdUI5WWdDUlRWYndUTllIS2RkWGJkSW1GUXNDYys4T1g1CjE5c0N6dFFSR05iSXEwVW1Ba01MbFVvWTIxckh4ZXdxU2hWczFhL2RwaFh5Tk1pcUdaU2QzU1BtYzZscitqUFQKNXVEREs0MUlWeXN0K2VUNlpyazFvcCtMVmdkeS9EU2lyNzVqcWZFY016bS82bU8rNnFNeWRLTWtVYmM5K3JHVwphUkpUcjRWUUdIRmEwNEIwZVZpNUd4MG9pL2RpZDNSaXg2aXJMMjFJSGEwYjN6c1hzZHpHU0R2K3hqL2Q2S0l4Ckdrd2FhYmZvU1NoQnFqaFNlQ0VyZXFlb1RpYjljdGw0MGRVdUp3THl4bjhHS2N6K3AvMEJUOEIxU3lYK01OQ2wKY0pkMjVtMjhLajY2TGUxOEVyeFlJYXZJVGVGa3Y2eGZjdkEvcHladDdPaU41QTlGQk1IUmpQK1kyZ2tvdjMrcQpISFRUZG4xNnlRajduNit3YlFHNGVleXc0YisyQkRLcUxNVFU2ZmlSQ3ZPM2FPZVBLSFVNN3R4b1FidWl6Z3NzCkNiMzl3QnJOTEZsMkJLQ1RkSCtkSU9oZVJiSkZvbmlwOGRPOUVFZWdSSG9lQW54ZUlYTFBrdXMzTzEvZjRhNkIKWHQ3RG5BUm8xSzJmeEp3VXRaU2MvR3dFSjU5NzlnRXlEa3pDZEVsLzdpWE9QZXVjTXhlM2xVM2pweUtsNERUaApjSkJqQytqNGpLWTFrK1U4b040aGdqYnJISUx6Vnd2eU15OU5KS290U3BMSjQxeHdPOHlGangxalFTT3Bxc0N1ClFhUFUvTjhSZ0hxWjBGTkFzS3dNUmZ6WmdXanRCNzRzYUVEdk5jVmNuNFhCQnFNSG0ydHo2Uzk3d3kxZGt0cTgKSE5BPQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==" - } - ] - } - } - } - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/myToken", - "name": "myToken", - "type": "Microsoft.ContainerRegistry/registries/tokens", - "properties": { - "creationDate": "2017-03-01T23:14:37.0707808Z", - "scopeMapId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myScopeMap", - "provisioningState": "Succeeded", - "status": "disabled", - "credentials": { - "certificates": [ - { - "name": "certificate1", - "thumbprint": "feeb79a888bf1415f8e17c4965a2a5bb5c8a2ff7", - "expiry": "2020-12-04T15:32:48.0707808Z" - } - ] - } - } - } - }, - "201": { - "headers": { - "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/myToken/operationStatuses/tokens-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" - }, - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/myToken", - "name": "myToken", - "type": "Microsoft.ContainerRegistry/registries/tokens", - "properties": { - "creationDate": "2017-03-01T23:14:37.0707808Z", - "scopeMapId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myScopeMap", - "provisioningState": "Succeeded", - "status": "disabled", - "credentials": { - "certificates": [ - { - "name": "certificate1", - "thumbprint": "feeb79a888bf1415f8e17c4965a2a5bb5c8a2ff7", - "expiry": "2020-12-04T15:32:48.0707808Z" - } - ] - } - } - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/TokenDelete.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/TokenDelete.json deleted file mode 100644 index f802e0609ba..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/TokenDelete.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "title": "TokenDelete", - "operationId": "Tokens_Delete", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "tokenName": "myToken" - }, - "responses": { - "200": {}, - "202": { - "headers": { - "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/myToken/operationStatuses/tokens-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" - } - }, - "204": {} - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/TokenGet.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/TokenGet.json deleted file mode 100644 index 8f99f9a5b8c..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/TokenGet.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "title": "TokenGet", - "operationId": "Tokens_Get", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "tokenName": "myToken" - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/myToken", - "name": "myToken", - "type": "Microsoft.ContainerRegistry/registries/tokens", - "properties": { - "creationDate": "2017-03-01T23:14:37.0707808Z", - "scopeMapId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myScopeMap", - "provisioningState": "Succeeded", - "status": "enabled" - } - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/TokenList.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/TokenList.json deleted file mode 100644 index 270bd908baf..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/TokenList.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "title": "TokenList", - "operationId": "Tokens_List", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/myToken", - "name": "myToken", - "type": "Microsoft.ContainerRegistry/registries/tokens", - "properties": { - "creationDate": "2017-03-01T23:14:37.0707808Z", - "scopeMapId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myScopeMap", - "provisioningState": "Succeeded", - "status": "enabled" - } - } - ] - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/TokenUpdate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/TokenUpdate.json deleted file mode 100644 index 22c10b8bd45..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/TokenUpdate.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "title": "TokenUpdate", - "operationId": "Tokens_Update", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "tokenName": "myToken", - "tokenUpdateParameters": { - "properties": { - "scopeMapId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myNewScopeMap", - "credentials": { - "certificates": [ - { - "name": "certificate1", - "encodedPemCertificate": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUc3akNDQk5hZ0F3SUJBZ0lURmdBQlR3UVpyZGdmdmhxdzBnQUFBQUZQQkRBTkJna3Foa2lHOXcwQkFRc0YKQURDQml6RUxNQWtHQTFVRUJoTUNWVk14RXpBUkJnTlZCQWdUQ2xkaGMyaHBibWQwYjI0eEVEQU9CZ05WQkFjVApCMUpsWkcxdmJtUXhIakFjQmdOVkJBb1RGVTFwWTNKdmMyOW1kQ0JEYjNKd2IzSmhkR2x2YmpFVk1CTUdBMVVFCkN4TU1UV2xqY205emIyWjBJRWxVTVI0d0hBWURWUVFERXhWTmFXTnliM052Wm5RZ1NWUWdWRXhUSUVOQklEUXcKSGhjTk1UZ3dOREV5TWpJek1qUTRXaGNOTWpBd05ERXlNakl6TWpRNFdqQTVNVGN3TlFZRFZRUURFeTV6WlhKMgphV05sWTJ4cFpXNTBZMlZ5ZEMxd1lYSjBibVZ5TG0xaGJtRm5aVzFsYm5RdVlYcDFjbVV1WTI5dE1JSUJJakFOCkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQTBSYjdJcHpxMmR4emhhbVpyS1ZDakMzeTQyYlYKUnNIY2pCUTFuSDBHZ1puUDhXeDZDSE1mWThybkVJQzRLeVRRYkJXVzhnNXlmc3NSQ0ZXbFpxYjR6SkRXS0pmTgpGSmNMUm9LNnhwTktZYVZVTkVlT25IdUxHYTM0ZlA0VjBFRjZybzdvbkRLME5zanhjY1dZVzRNVXVzc0xrQS94CkUrM2RwU1REdk1KcjJoWUpsVnFDcVR6blQvbmZaVUZzQUVEQnp5MUpOOHZiZDlIR2czc2Myd0x4dk95cFJOc0gKT1V3V2pmN2xzWWZleEVlcWkzY29EeHc2alpLVWEyVkdsUnBpTkowMjhBQitYSi9TU1FVNVBsd0JBbU9TT3ovRApGY0NKdGpPZlBqU1NKckFIQVV3SHU3RzlSV05JTFBwYU9zQ1J5eitETE5zNGpvNlEvUUg4d1lManJRSURBUUFCCm80SUNtakNDQXBZd0N3WURWUjBQQkFRREFnU3dNQjBHQTFVZEpRUVdNQlFHQ0NzR0FRVUZCd01DQmdnckJnRUYKQlFjREFUQWRCZ05WSFE0RUZnUVVlbEdkVVJrZzJoSFFOWEQ4WUc4L3drdjJVT0F3SHdZRFZSMGpCQmd3Rm9BVQplbnVNd2Mvbm9Nb2MxR3Y2KytFend3OGFvcDB3Z2F3R0ExVWRId1NCcERDQm9UQ0JucUNCbTZDQm1JWkxhSFIwCmNEb3ZMMjF6WTNKc0xtMXBZM0p2YzI5bWRDNWpiMjB2Y0d0cEwyMXpZMjl5Y0M5amNtd3ZUV2xqY205emIyWjAKSlRJd1NWUWxNakJVVEZNbE1qQkRRU1V5TURRdVkzSnNoa2xvZEhSd09pOHZZM0pzTG0xcFkzSnZjMjltZEM1agpiMjB2Y0d0cEwyMXpZMjl5Y0M5amNtd3ZUV2xqY205emIyWjBKVEl3U1ZRbE1qQlVURk1sTWpCRFFTVXlNRFF1ClkzSnNNSUdGQmdnckJnRUZCUWNCQVFSNU1IY3dVUVlJS3dZQkJRVUhNQUtHUldoMGRIQTZMeTkzZDNjdWJXbGoKY205emIyWjBMbU52YlM5d2Eya3ZiWE5qYjNKd0wwMXBZM0p2YzI5bWRDVXlNRWxVSlRJd1ZFeFRKVEl3UTBFbApNakEwTG1OeWREQWlCZ2dyQmdFRkJRY3dBWVlXYUhSMGNEb3ZMMjlqYzNBdWJYTnZZM053TG1OdmJUQStCZ2tyCkJnRUVBWUkzRlFjRU1UQXZCaWNyQmdFRUFZSTNGUWlIMm9aMWcrN1pBWUxKaFJ1QnRaNWhoZlRyWUlGZGhOTGYKUW9Mbmszb0NBV1FDQVIwd1RRWURWUjBnQkVZd1JEQkNCZ2tyQmdFRUFZSTNLZ0V3TlRBekJnZ3JCZ0VGQlFjQwpBUlluYUhSMGNEb3ZMM2QzZHk1dGFXTnliM052Wm5RdVkyOXRMM0JyYVM5dGMyTnZjbkF2WTNCek1DY0dDU3NHCkFRUUJnamNWQ2dRYU1CZ3dDZ1lJS3dZQkJRVUhBd0l3Q2dZSUt3WUJCUVVIQXdFd09RWURWUjBSQkRJd01JSXUKYzJWeWRtbGpaV05zYVdWdWRHTmxjblF0Y0dGeWRHNWxjaTV0WVc1aFoyVnRaVzUwTG1GNmRYSmxMbU52YlRBTgpCZ2txaGtpRzl3MEJBUXNGQUFPQ0FnRUFIVXIzbk1vdUI5WWdDUlRWYndUTllIS2RkWGJkSW1GUXNDYys4T1g1CjE5c0N6dFFSR05iSXEwVW1Ba01MbFVvWTIxckh4ZXdxU2hWczFhL2RwaFh5Tk1pcUdaU2QzU1BtYzZscitqUFQKNXVEREs0MUlWeXN0K2VUNlpyazFvcCtMVmdkeS9EU2lyNzVqcWZFY016bS82bU8rNnFNeWRLTWtVYmM5K3JHVwphUkpUcjRWUUdIRmEwNEIwZVZpNUd4MG9pL2RpZDNSaXg2aXJMMjFJSGEwYjN6c1hzZHpHU0R2K3hqL2Q2S0l4Ckdrd2FhYmZvU1NoQnFqaFNlQ0VyZXFlb1RpYjljdGw0MGRVdUp3THl4bjhHS2N6K3AvMEJUOEIxU3lYK01OQ2wKY0pkMjVtMjhLajY2TGUxOEVyeFlJYXZJVGVGa3Y2eGZjdkEvcHladDdPaU41QTlGQk1IUmpQK1kyZ2tvdjMrcQpISFRUZG4xNnlRajduNit3YlFHNGVleXc0YisyQkRLcUxNVFU2ZmlSQ3ZPM2FPZVBLSFVNN3R4b1FidWl6Z3NzCkNiMzl3QnJOTEZsMkJLQ1RkSCtkSU9oZVJiSkZvbmlwOGRPOUVFZWdSSG9lQW54ZUlYTFBrdXMzTzEvZjRhNkIKWHQ3RG5BUm8xSzJmeEp3VXRaU2MvR3dFSjU5NzlnRXlEa3pDZEVsLzdpWE9QZXVjTXhlM2xVM2pweUtsNERUaApjSkJqQytqNGpLWTFrK1U4b040aGdqYnJISUx6Vnd2eU15OU5KS290U3BMSjQxeHdPOHlGangxalFTT3Bxc0N1ClFhUFUvTjhSZ0hxWjBGTkFzS3dNUmZ6WmdXanRCNzRzYUVEdk5jVmNuNFhCQnFNSG0ydHo2Uzk3d3kxZGt0cTgKSE5BPQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==" - } - ] - } - } - } - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/myToken", - "name": "myToken", - "type": "Microsoft.ContainerRegistry/registries/tokens", - "properties": { - "creationDate": "2017-03-01T23:14:37.0707808Z", - "scopeMapId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myNewScopeMap", - "provisioningState": "Succeeded", - "status": "enabled", - "credentials": { - "certificates": [ - { - "name": "certificate1", - "encodedPemCertificate": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUc3akNDQk5hZ0F3SUJBZ0lURmdBQlR3UVpyZGdmdmhxdzBnQUFBQUZQQkRBTkJna3Foa2lHOXcwQkFRc0YKQURDQml6RUxNQWtHQTFVRUJoTUNWVk14RXpBUkJnTlZCQWdUQ2xkaGMyaHBibWQwYjI0eEVEQU9CZ05WQkFjVApCMUpsWkcxdmJtUXhIakFjQmdOVkJBb1RGVTFwWTNKdmMyOW1kQ0JEYjNKd2IzSmhkR2x2YmpFVk1CTUdBMVVFCkN4TU1UV2xqY205emIyWjBJRWxVTVI0d0hBWURWUVFERXhWTmFXTnliM052Wm5RZ1NWUWdWRXhUSUVOQklEUXcKSGhjTk1UZ3dOREV5TWpJek1qUTRXaGNOTWpBd05ERXlNakl6TWpRNFdqQTVNVGN3TlFZRFZRUURFeTV6WlhKMgphV05sWTJ4cFpXNTBZMlZ5ZEMxd1lYSjBibVZ5TG0xaGJtRm5aVzFsYm5RdVlYcDFjbVV1WTI5dE1JSUJJakFOCkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQTBSYjdJcHpxMmR4emhhbVpyS1ZDakMzeTQyYlYKUnNIY2pCUTFuSDBHZ1puUDhXeDZDSE1mWThybkVJQzRLeVRRYkJXVzhnNXlmc3NSQ0ZXbFpxYjR6SkRXS0pmTgpGSmNMUm9LNnhwTktZYVZVTkVlT25IdUxHYTM0ZlA0VjBFRjZybzdvbkRLME5zanhjY1dZVzRNVXVzc0xrQS94CkUrM2RwU1REdk1KcjJoWUpsVnFDcVR6blQvbmZaVUZzQUVEQnp5MUpOOHZiZDlIR2czc2Myd0x4dk95cFJOc0gKT1V3V2pmN2xzWWZleEVlcWkzY29EeHc2alpLVWEyVkdsUnBpTkowMjhBQitYSi9TU1FVNVBsd0JBbU9TT3ovRApGY0NKdGpPZlBqU1NKckFIQVV3SHU3RzlSV05JTFBwYU9zQ1J5eitETE5zNGpvNlEvUUg4d1lManJRSURBUUFCCm80SUNtakNDQXBZd0N3WURWUjBQQkFRREFnU3dNQjBHQTFVZEpRUVdNQlFHQ0NzR0FRVUZCd01DQmdnckJnRUYKQlFjREFUQWRCZ05WSFE0RUZnUVVlbEdkVVJrZzJoSFFOWEQ4WUc4L3drdjJVT0F3SHdZRFZSMGpCQmd3Rm9BVQplbnVNd2Mvbm9Nb2MxR3Y2KytFend3OGFvcDB3Z2F3R0ExVWRId1NCcERDQm9UQ0JucUNCbTZDQm1JWkxhSFIwCmNEb3ZMMjF6WTNKc0xtMXBZM0p2YzI5bWRDNWpiMjB2Y0d0cEwyMXpZMjl5Y0M5amNtd3ZUV2xqY205emIyWjAKSlRJd1NWUWxNakJVVEZNbE1qQkRRU1V5TURRdVkzSnNoa2xvZEhSd09pOHZZM0pzTG0xcFkzSnZjMjltZEM1agpiMjB2Y0d0cEwyMXpZMjl5Y0M5amNtd3ZUV2xqY205emIyWjBKVEl3U1ZRbE1qQlVURk1sTWpCRFFTVXlNRFF1ClkzSnNNSUdGQmdnckJnRUZCUWNCQVFSNU1IY3dVUVlJS3dZQkJRVUhNQUtHUldoMGRIQTZMeTkzZDNjdWJXbGoKY205emIyWjBMbU52YlM5d2Eya3ZiWE5qYjNKd0wwMXBZM0p2YzI5bWRDVXlNRWxVSlRJd1ZFeFRKVEl3UTBFbApNakEwTG1OeWREQWlCZ2dyQmdFRkJRY3dBWVlXYUhSMGNEb3ZMMjlqYzNBdWJYTnZZM053TG1OdmJUQStCZ2tyCkJnRUVBWUkzRlFjRU1UQXZCaWNyQmdFRUFZSTNGUWlIMm9aMWcrN1pBWUxKaFJ1QnRaNWhoZlRyWUlGZGhOTGYKUW9Mbmszb0NBV1FDQVIwd1RRWURWUjBnQkVZd1JEQkNCZ2tyQmdFRUFZSTNLZ0V3TlRBekJnZ3JCZ0VGQlFjQwpBUlluYUhSMGNEb3ZMM2QzZHk1dGFXTnliM052Wm5RdVkyOXRMM0JyYVM5dGMyTnZjbkF2WTNCek1DY0dDU3NHCkFRUUJnamNWQ2dRYU1CZ3dDZ1lJS3dZQkJRVUhBd0l3Q2dZSUt3WUJCUVVIQXdFd09RWURWUjBSQkRJd01JSXUKYzJWeWRtbGpaV05zYVdWdWRHTmxjblF0Y0dGeWRHNWxjaTV0WVc1aFoyVnRaVzUwTG1GNmRYSmxMbU52YlRBTgpCZ2txaGtpRzl3MEJBUXNGQUFPQ0FnRUFIVXIzbk1vdUI5WWdDUlRWYndUTllIS2RkWGJkSW1GUXNDYys4T1g1CjE5c0N6dFFSR05iSXEwVW1Ba01MbFVvWTIxckh4ZXdxU2hWczFhL2RwaFh5Tk1pcUdaU2QzU1BtYzZscitqUFQKNXVEREs0MUlWeXN0K2VUNlpyazFvcCtMVmdkeS9EU2lyNzVqcWZFY016bS82bU8rNnFNeWRLTWtVYmM5K3JHVwphUkpUcjRWUUdIRmEwNEIwZVZpNUd4MG9pL2RpZDNSaXg2aXJMMjFJSGEwYjN6c1hzZHpHU0R2K3hqL2Q2S0l4Ckdrd2FhYmZvU1NoQnFqaFNlQ0VyZXFlb1RpYjljdGw0MGRVdUp3THl4bjhHS2N6K3AvMEJUOEIxU3lYK01OQ2wKY0pkMjVtMjhLajY2TGUxOEVyeFlJYXZJVGVGa3Y2eGZjdkEvcHladDdPaU41QTlGQk1IUmpQK1kyZ2tvdjMrcQpISFRUZG4xNnlRajduNit3YlFHNGVleXc0YisyQkRLcUxNVFU2ZmlSQ3ZPM2FPZVBLSFVNN3R4b1FidWl6Z3NzCkNiMzl3QnJOTEZsMkJLQ1RkSCtkSU9oZVJiSkZvbmlwOGRPOUVFZWdSSG9lQW54ZUlYTFBrdXMzTzEvZjRhNkIKWHQ3RG5BUm8xSzJmeEp3VXRaU2MvR3dFSjU5NzlnRXlEa3pDZEVsLzdpWE9QZXVjTXhlM2xVM2pweUtsNERUaApjSkJqQytqNGpLWTFrK1U4b040aGdqYnJISUx6Vnd2eU15OU5KS290U3BMSjQxeHdPOHlGangxalFTT3Bxc0N1ClFhUFUvTjhSZ0hxWjBGTkFzS3dNUmZ6WmdXanRCNzRzYUVEdk5jVmNuNFhCQnFNSG0ydHo2Uzk3d3kxZGt0cTgKSE5BPQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==" - } - ] - } - } - } - }, - "201": { - "headers": { - "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/myToken/operationStatuses/tokens-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" - }, - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/myToken", - "name": "myToken", - "type": "Microsoft.ContainerRegistry/registries/tokens", - "properties": { - "creationDate": "2017-03-01T23:14:37.0707808Z", - "scopeMapId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/scopeMaps/myNewScopeMap", - "provisioningState": "Succeeded", - "status": "enabled", - "credentials": { - "certificates": [ - { - "name": "certificate1", - "encodedPemCertificate": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUc3akNDQk5hZ0F3SUJBZ0lURmdBQlR3UVpyZGdmdmhxdzBnQUFBQUZQQkRBTkJna3Foa2lHOXcwQkFRc0YKQURDQml6RUxNQWtHQTFVRUJoTUNWVk14RXpBUkJnTlZCQWdUQ2xkaGMyaHBibWQwYjI0eEVEQU9CZ05WQkFjVApCMUpsWkcxdmJtUXhIakFjQmdOVkJBb1RGVTFwWTNKdmMyOW1kQ0JEYjNKd2IzSmhkR2x2YmpFVk1CTUdBMVVFCkN4TU1UV2xqY205emIyWjBJRWxVTVI0d0hBWURWUVFERXhWTmFXTnliM052Wm5RZ1NWUWdWRXhUSUVOQklEUXcKSGhjTk1UZ3dOREV5TWpJek1qUTRXaGNOTWpBd05ERXlNakl6TWpRNFdqQTVNVGN3TlFZRFZRUURFeTV6WlhKMgphV05sWTJ4cFpXNTBZMlZ5ZEMxd1lYSjBibVZ5TG0xaGJtRm5aVzFsYm5RdVlYcDFjbVV1WTI5dE1JSUJJakFOCkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQTBSYjdJcHpxMmR4emhhbVpyS1ZDakMzeTQyYlYKUnNIY2pCUTFuSDBHZ1puUDhXeDZDSE1mWThybkVJQzRLeVRRYkJXVzhnNXlmc3NSQ0ZXbFpxYjR6SkRXS0pmTgpGSmNMUm9LNnhwTktZYVZVTkVlT25IdUxHYTM0ZlA0VjBFRjZybzdvbkRLME5zanhjY1dZVzRNVXVzc0xrQS94CkUrM2RwU1REdk1KcjJoWUpsVnFDcVR6blQvbmZaVUZzQUVEQnp5MUpOOHZiZDlIR2czc2Myd0x4dk95cFJOc0gKT1V3V2pmN2xzWWZleEVlcWkzY29EeHc2alpLVWEyVkdsUnBpTkowMjhBQitYSi9TU1FVNVBsd0JBbU9TT3ovRApGY0NKdGpPZlBqU1NKckFIQVV3SHU3RzlSV05JTFBwYU9zQ1J5eitETE5zNGpvNlEvUUg4d1lManJRSURBUUFCCm80SUNtakNDQXBZd0N3WURWUjBQQkFRREFnU3dNQjBHQTFVZEpRUVdNQlFHQ0NzR0FRVUZCd01DQmdnckJnRUYKQlFjREFUQWRCZ05WSFE0RUZnUVVlbEdkVVJrZzJoSFFOWEQ4WUc4L3drdjJVT0F3SHdZRFZSMGpCQmd3Rm9BVQplbnVNd2Mvbm9Nb2MxR3Y2KytFend3OGFvcDB3Z2F3R0ExVWRId1NCcERDQm9UQ0JucUNCbTZDQm1JWkxhSFIwCmNEb3ZMMjF6WTNKc0xtMXBZM0p2YzI5bWRDNWpiMjB2Y0d0cEwyMXpZMjl5Y0M5amNtd3ZUV2xqY205emIyWjAKSlRJd1NWUWxNakJVVEZNbE1qQkRRU1V5TURRdVkzSnNoa2xvZEhSd09pOHZZM0pzTG0xcFkzSnZjMjltZEM1agpiMjB2Y0d0cEwyMXpZMjl5Y0M5amNtd3ZUV2xqY205emIyWjBKVEl3U1ZRbE1qQlVURk1sTWpCRFFTVXlNRFF1ClkzSnNNSUdGQmdnckJnRUZCUWNCQVFSNU1IY3dVUVlJS3dZQkJRVUhNQUtHUldoMGRIQTZMeTkzZDNjdWJXbGoKY205emIyWjBMbU52YlM5d2Eya3ZiWE5qYjNKd0wwMXBZM0p2YzI5bWRDVXlNRWxVSlRJd1ZFeFRKVEl3UTBFbApNakEwTG1OeWREQWlCZ2dyQmdFRkJRY3dBWVlXYUhSMGNEb3ZMMjlqYzNBdWJYTnZZM053TG1OdmJUQStCZ2tyCkJnRUVBWUkzRlFjRU1UQXZCaWNyQmdFRUFZSTNGUWlIMm9aMWcrN1pBWUxKaFJ1QnRaNWhoZlRyWUlGZGhOTGYKUW9Mbmszb0NBV1FDQVIwd1RRWURWUjBnQkVZd1JEQkNCZ2tyQmdFRUFZSTNLZ0V3TlRBekJnZ3JCZ0VGQlFjQwpBUlluYUhSMGNEb3ZMM2QzZHk1dGFXTnliM052Wm5RdVkyOXRMM0JyYVM5dGMyTnZjbkF2WTNCek1DY0dDU3NHCkFRUUJnamNWQ2dRYU1CZ3dDZ1lJS3dZQkJRVUhBd0l3Q2dZSUt3WUJCUVVIQXdFd09RWURWUjBSQkRJd01JSXUKYzJWeWRtbGpaV05zYVdWdWRHTmxjblF0Y0dGeWRHNWxjaTV0WVc1aFoyVnRaVzUwTG1GNmRYSmxMbU52YlRBTgpCZ2txaGtpRzl3MEJBUXNGQUFPQ0FnRUFIVXIzbk1vdUI5WWdDUlRWYndUTllIS2RkWGJkSW1GUXNDYys4T1g1CjE5c0N6dFFSR05iSXEwVW1Ba01MbFVvWTIxckh4ZXdxU2hWczFhL2RwaFh5Tk1pcUdaU2QzU1BtYzZscitqUFQKNXVEREs0MUlWeXN0K2VUNlpyazFvcCtMVmdkeS9EU2lyNzVqcWZFY016bS82bU8rNnFNeWRLTWtVYmM5K3JHVwphUkpUcjRWUUdIRmEwNEIwZVZpNUd4MG9pL2RpZDNSaXg2aXJMMjFJSGEwYjN6c1hzZHpHU0R2K3hqL2Q2S0l4Ckdrd2FhYmZvU1NoQnFqaFNlQ0VyZXFlb1RpYjljdGw0MGRVdUp3THl4bjhHS2N6K3AvMEJUOEIxU3lYK01OQ2wKY0pkMjVtMjhLajY2TGUxOEVyeFlJYXZJVGVGa3Y2eGZjdkEvcHladDdPaU41QTlGQk1IUmpQK1kyZ2tvdjMrcQpISFRUZG4xNnlRajduNit3YlFHNGVleXc0YisyQkRLcUxNVFU2ZmlSQ3ZPM2FPZVBLSFVNN3R4b1FidWl6Z3NzCkNiMzl3QnJOTEZsMkJLQ1RkSCtkSU9oZVJiSkZvbmlwOGRPOUVFZWdSSG9lQW54ZUlYTFBrdXMzTzEvZjRhNkIKWHQ3RG5BUm8xSzJmeEp3VXRaU2MvR3dFSjU5NzlnRXlEa3pDZEVsLzdpWE9QZXVjTXhlM2xVM2pweUtsNERUaApjSkJqQytqNGpLWTFrK1U4b040aGdqYnJISUx6Vnd2eU15OU5KS290U3BMSjQxeHdPOHlGangxalFTT3Bxc0N1ClFhUFUvTjhSZ0hxWjBGTkFzS3dNUmZ6WmdXanRCNzRzYUVEdk5jVmNuNFhCQnFNSG0ydHo2Uzk3d3kxZGt0cTgKSE5BPQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==" - } - ] - } - } - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/WebhookCreate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/WebhookCreate.json deleted file mode 100644 index 17c13aa7480..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/WebhookCreate.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "title": "WebhookCreate", - "operationId": "Webhooks_Create", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "webhookName": "myWebhook", - "webhookCreateParameters": { - "location": "westus", - "tags": { - "key": "value" - }, - "properties": { - "serviceUri": "http://myservice.com", - "customHeaders": { - "Authorization": "******" - }, - "status": "enabled", - "scope": "myRepository", - "actions": [ - "push" - ] - } - } - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/webhooks/myWebhook", - "name": "myWebhook", - "type": "Microsoft.ContainerRegistry/registries/webhooks", - "location": "westus", - "tags": { - "key": "value" - }, - "properties": { - "status": "enabled", - "scope": "myRepository", - "actions": [ - "push" - ], - "provisioningState": "Succeeded" - } - } - }, - "201": { - "headers": { - "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/webhooks/myWebhook/operationStatuses/webhooks-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" - }, - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/webhooks/myWebhook", - "name": "myWebhook", - "type": "Microsoft.ContainerRegistry/registries/webhooks", - "location": "westus", - "tags": { - "key": "value" - }, - "properties": { - "status": "enabled", - "scope": "myRepository", - "actions": [ - "push" - ], - "provisioningState": "Creating" - } - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/WebhookDelete.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/WebhookDelete.json deleted file mode 100644 index 988abc7bf34..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/WebhookDelete.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "title": "WebhookDelete", - "operationId": "Webhooks_Delete", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "webhookName": "myWebhook" - }, - "responses": { - "200": {}, - "202": { - "headers": { - "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/webhooks/myWebhook/operationStatuses/webhooks-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" - } - }, - "204": {} - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/WebhookGet.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/WebhookGet.json deleted file mode 100644 index 9bf5412092a..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/WebhookGet.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "title": "WebhookGet", - "operationId": "Webhooks_Get", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "webhookName": "myWebhook" - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/webhooks/myWebhook", - "name": "myWebhook", - "type": "Microsoft.ContainerRegistry/registries/webhooks", - "location": "westus", - "tags": { - "key": "value" - }, - "properties": { - "status": "enabled", - "scope": "myRepository", - "actions": [ - "push" - ], - "provisioningState": "Succeeded" - } - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/WebhookGetCallbackConfig.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/WebhookGetCallbackConfig.json deleted file mode 100644 index 608e056de88..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/WebhookGetCallbackConfig.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "title": "WebhookGetCallbackConfig", - "operationId": "Webhooks_GetCallbackConfig", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "webhookName": "myWebhook" - }, - "responses": { - "200": { - "body": { - "serviceUri": "http://myservice.com", - "customHeaders": { - "Authorization": "******" - } - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/WebhookList.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/WebhookList.json deleted file mode 100644 index 88329bf73ed..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/WebhookList.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "title": "WebhookList", - "operationId": "Webhooks_List", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/webhooks/myWebhook", - "name": "myWebhook", - "type": "Microsoft.ContainerRegistry/registries/webhooks", - "location": "westus", - "tags": { - "key": "value" - }, - "properties": { - "status": "enabled", - "scope": "myRepository", - "actions": [ - "push" - ], - "provisioningState": "Succeeded" - } - } - ] - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/WebhookListEvents.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/WebhookListEvents.json deleted file mode 100644 index 8c4d3b2aede..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/WebhookListEvents.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "title": "WebhookListEvents", - "operationId": "Webhooks_ListEvents", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "webhookName": "myWebhook" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "00000000-0000-0000-0000-000000000000", - "eventRequestMessage": { - "content": { - "id": "00000000-0000-0000-0000-000000000000", - "timestamp": "2017-03-01T23:14:37.0707808Z", - "action": "push", - "target": { - "mediaType": "application/vnd.docker.distribution.manifest.v2+json", - "size": 708, - "digest": "sha256:fea8895f450959fa676bcc1df0611ea93823a735a01205fd8622846041d0c7cf", - "length": 708, - "repository": "hello-world", - "url": "http://192.168.100.227:5000/v2/hello-world/manifests/sha256:fea8895f450959fa676bcc1df0611ea93823a735a01205fd8622846041d0c7cf", - "tag": "latest" - }, - "request": { - "id": "00000000-0000-0000-0000-000000000000", - "addr": "192.168.64.11:42961", - "host": "192.168.100.227:5000", - "method": "GET", - "useragent": "curl/7.38.0" - }, - "actor": {}, - "source": { - "addr": "xtal.local:5000", - "instanceID": "00000000-0000-0000-0000-000000000000" - } - }, - "headers": { - "Content-Type": "application/json", - "Content-Length": "719", - "Authorization": "******" - }, - "method": "POST", - "requestUri": "http://myservice.com", - "version": "1.1" - }, - "eventResponseMessage": { - "headers": { - "Content-Length": "0" - }, - "statusCode": "200", - "version": "1.1" - } - } - ] - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/WebhookPing.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/WebhookPing.json deleted file mode 100644 index 2be74ab5d5c..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/WebhookPing.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "title": "WebhookPing", - "operationId": "Webhooks_Ping", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "webhookName": "myWebhook" - }, - "responses": { - "200": { - "body": { - "id": "00000000-0000-0000-0000-000000000000" - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/WebhookUpdate.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/WebhookUpdate.json deleted file mode 100644 index a01344f26c2..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/examples/WebhookUpdate.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "title": "WebhookUpdate", - "operationId": "Webhooks_Update", - "parameters": { - "api-version": "2026-01-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "webhookName": "myWebhook", - "webhookUpdateParameters": { - "tags": { - "key": "value" - }, - "properties": { - "serviceUri": "http://myservice.com", - "customHeaders": { - "Authorization": "******" - }, - "status": "enabled", - "scope": "myRepository", - "actions": [ - "push" - ] - } - } - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/webhooks/myWebhook", - "name": "myWebhook", - "type": "Microsoft.ContainerRegistry/registries/webhooks", - "location": "westus", - "tags": { - "key": "value" - }, - "properties": { - "status": "enabled", - "scope": "myRepository", - "actions": [ - "push" - ], - "provisioningState": "Succeeded" - } - } - }, - "201": { - "headers": { - "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/webhooks/myWebhook/operationStatuses/webhooks-00000000-0000-0000-0000-000000000000?api-version=2026-01-01-preview" - }, - "body": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/webhooks/myWebhook", - "name": "myWebhook", - "type": "Microsoft.ContainerRegistry/registries/webhooks", - "location": "westus", - "tags": { - "key": "value" - }, - "properties": { - "status": "enabled", - "scope": "myRepository", - "actions": [ - "push" - ], - "provisioningState": "Updating" - } - } - } - } -} diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/apiview-properties.json b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/apiview-properties.json deleted file mode 100644 index 2eab22412c9..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/apiview-properties.json +++ /dev/null @@ -1,345 +0,0 @@ -{ - "CrossLanguagePackageId": null, - "CrossLanguageDefinitionId": { - "container_registry_management_client.models.ActivationProperties": null, - "container_registry_management_client.models.Actor": null, - "container_registry_management_client.models.Resource": null, - "container_registry_management_client.models.ProxyResource": null, - "container_registry_management_client.models.Archive": null, - "container_registry_management_client.models.ArchivePackageSourceProperties": null, - "container_registry_management_client.models.ArchiveProperties": null, - "container_registry_management_client.models.ArchiveUpdateParameters": null, - "container_registry_management_client.models.ArchiveUpdateProperties": null, - "container_registry_management_client.models.ArchiveVersion": null, - "container_registry_management_client.models.ArchiveVersionProperties": null, - "container_registry_management_client.models.AuthCredential": null, - "container_registry_management_client.models.AzureADAuthenticationAsArmPolicy": null, - "container_registry_management_client.models.CacheRule": null, - "container_registry_management_client.models.CacheRuleProperties": null, - "container_registry_management_client.models.CacheRuleUpdateParameters": null, - "container_registry_management_client.models.CacheRuleUpdateProperties": null, - "container_registry_management_client.models.CallbackConfig": null, - "container_registry_management_client.models.ConnectedRegistry": null, - "container_registry_management_client.models.ConnectedRegistryProperties": null, - "container_registry_management_client.models.ConnectedRegistryUpdateParameters": null, - "container_registry_management_client.models.ConnectedRegistryUpdateProperties": null, - "container_registry_management_client.models.CredentialHealth": null, - "container_registry_management_client.models.CredentialSet": null, - "container_registry_management_client.models.CredentialSetProperties": null, - "container_registry_management_client.models.CredentialSetUpdateParameters": null, - "container_registry_management_client.models.CredentialSetUpdateProperties": null, - "container_registry_management_client.models.DebianArchivePackageSourceProperties": null, - "container_registry_management_client.models.DebianArchiveProperties": null, - "container_registry_management_client.models.EncryptionProperty": null, - "container_registry_management_client.models.ErrorAdditionalInfo": null, - "container_registry_management_client.models.ErrorDetail": null, - "container_registry_management_client.models.ErrorResponse": null, - "container_registry_management_client.models.EventInfo": null, - "container_registry_management_client.models.Event": null, - "container_registry_management_client.models.EventContent": null, - "container_registry_management_client.models.EventRequestMessage": null, - "container_registry_management_client.models.EventResponseMessage": null, - "container_registry_management_client.models.ExportPipeline": null, - "container_registry_management_client.models.ExportPipelineProperties": null, - "container_registry_management_client.models.ExportPipelineTargetProperties": null, - "container_registry_management_client.models.ExportPolicy": null, - "container_registry_management_client.models.GarbageCollectionProperties": null, - "container_registry_management_client.models.GenerateCredentialsParameters": null, - "container_registry_management_client.models.GenerateCredentialsResult": null, - "container_registry_management_client.models.IdentityProperties": null, - "container_registry_management_client.models.ImportImageParameters": null, - "container_registry_management_client.models.ImportPipeline": null, - "container_registry_management_client.models.ImportPipelineProperties": null, - "container_registry_management_client.models.ImportPipelineSourceProperties": null, - "container_registry_management_client.models.ImportSource": null, - "container_registry_management_client.models.ImportSourceCredentials": null, - "container_registry_management_client.models.IPRule": null, - "container_registry_management_client.models.KeyVaultProperties": null, - "container_registry_management_client.models.LoggingProperties": null, - "container_registry_management_client.models.LoginServerProperties": null, - "container_registry_management_client.models.NetworkRuleSet": null, - "container_registry_management_client.models.OperationDefinition": null, - "container_registry_management_client.models.OperationDisplayDefinition": null, - "container_registry_management_client.models.OperationLogSpecificationDefinition": null, - "container_registry_management_client.models.OperationMetricSpecificationDefinition": null, - "container_registry_management_client.models.OperationPropertiesDefinition": null, - "container_registry_management_client.models.OperationServiceSpecificationDefinition": null, - "container_registry_management_client.models.ParentProperties": null, - "container_registry_management_client.models.PipelineRun": null, - "container_registry_management_client.models.PipelineRunProperties": null, - "container_registry_management_client.models.PipelineRunRequest": null, - "container_registry_management_client.models.PipelineRunResponse": null, - "container_registry_management_client.models.PipelineRunSourceProperties": null, - "container_registry_management_client.models.PipelineRunTargetProperties": null, - "container_registry_management_client.models.PipelineSourceTriggerDescriptor": null, - "container_registry_management_client.models.PipelineSourceTriggerProperties": null, - "container_registry_management_client.models.PipelineTriggerDescriptor": null, - "container_registry_management_client.models.PipelineTriggerProperties": null, - "container_registry_management_client.models.Policies": null, - "container_registry_management_client.models.PrivateEndpoint": null, - "container_registry_management_client.models.PrivateEndpointConnection": null, - "container_registry_management_client.models.PrivateEndpointConnectionProperties": null, - "container_registry_management_client.models.PrivateLinkResource": null, - "container_registry_management_client.models.PrivateLinkResourceProperties": null, - "container_registry_management_client.models.PrivateLinkServiceConnectionState": null, - "container_registry_management_client.models.ProgressProperties": null, - "container_registry_management_client.models.QuarantinePolicy": null, - "container_registry_management_client.models.RegenerateCredentialParameters": null, - "container_registry_management_client.models.TrackedResource": null, - "container_registry_management_client.models.Registry": null, - "container_registry_management_client.models.RegistryListCredentialsResult": null, - "container_registry_management_client.models.RegistryNameCheckRequest": null, - "container_registry_management_client.models.RegistryNameStatus": null, - "container_registry_management_client.models.RegistryPassword": null, - "container_registry_management_client.models.RegistryProperties": null, - "container_registry_management_client.models.RegistryPropertiesUpdateParameters": null, - "container_registry_management_client.models.RegistrySyncResult": null, - "container_registry_management_client.models.RegistryUpdateParameters": null, - "container_registry_management_client.models.RegistryUsage": null, - "container_registry_management_client.models.RegistryUsageListResult": null, - "container_registry_management_client.models.Replication": null, - "container_registry_management_client.models.ReplicationProperties": null, - "container_registry_management_client.models.ReplicationUpdateParameters": null, - "container_registry_management_client.models.ReplicationUpdateParametersProperties": null, - "container_registry_management_client.models.Request": null, - "container_registry_management_client.models.RetentionPolicy": null, - "container_registry_management_client.models.ScopeMap": null, - "container_registry_management_client.models.ScopeMapProperties": null, - "container_registry_management_client.models.ScopeMapPropertiesUpdateParameters": null, - "container_registry_management_client.models.ScopeMapUpdateParameters": null, - "container_registry_management_client.models.Sku": null, - "container_registry_management_client.models.SoftDeletePolicy": null, - "container_registry_management_client.models.Source": null, - "container_registry_management_client.models.Status": null, - "container_registry_management_client.models.StatusDetailProperties": null, - "container_registry_management_client.models.SyncProperties": null, - "container_registry_management_client.models.SyncUpdateProperties": null, - "container_registry_management_client.models.SystemData": null, - "container_registry_management_client.models.Target": null, - "container_registry_management_client.models.TlsCertificateProperties": null, - "container_registry_management_client.models.TlsProperties": null, - "container_registry_management_client.models.Token": null, - "container_registry_management_client.models.TokenCertificate": null, - "container_registry_management_client.models.TokenCredentialsProperties": null, - "container_registry_management_client.models.TokenPassword": null, - "container_registry_management_client.models.TokenProperties": null, - "container_registry_management_client.models.TokenUpdateParameters": null, - "container_registry_management_client.models.TokenUpdateProperties": null, - "container_registry_management_client.models.TrustPolicy": null, - "container_registry_management_client.models.UserIdentityProperties": null, - "container_registry_management_client.models.Webhook": null, - "container_registry_management_client.models.WebhookCreateParameters": null, - "container_registry_management_client.models.WebhookProperties": null, - "container_registry_management_client.models.WebhookPropertiesCreateParameters": null, - "container_registry_management_client.models.WebhookPropertiesUpdateParameters": null, - "container_registry_management_client.models.WebhookUpdateParameters": null, - "container_registry_management_client.models.Action": null, - "container_registry_management_client.models.CreatedByType": null, - "container_registry_management_client.models.ConnectionStatus": null, - "container_registry_management_client.models.ActionsRequired": null, - "container_registry_management_client.models.ProvisioningState": null, - "container_registry_management_client.models.DefaultAction": null, - "container_registry_management_client.models.PolicyStatus": null, - "container_registry_management_client.models.TrustPolicyType": null, - "container_registry_management_client.models.ExportPolicyStatus": null, - "container_registry_management_client.models.AzureADAuthenticationAsArmPolicyStatus": null, - "container_registry_management_client.models.EncryptionStatus": null, - "container_registry_management_client.models.RegionalEndpoints": null, - "container_registry_management_client.models.EndpointProtocol": null, - "container_registry_management_client.models.PublicNetworkAccess": null, - "container_registry_management_client.models.NetworkRuleBypassOptions": null, - "container_registry_management_client.models.ZoneRedundancy": null, - "container_registry_management_client.models.MetadataSearch": null, - "container_registry_management_client.models.AutoGeneratedDomainNameLabelScope": null, - "container_registry_management_client.models.RoleAssignmentMode": null, - "container_registry_management_client.models.SkuName": null, - "container_registry_management_client.models.SkuTier": null, - "container_registry_management_client.models.ResourceIdentityType": null, - "container_registry_management_client.models.ConnectedRegistryMode": null, - "container_registry_management_client.models.ConnectionState": null, - "container_registry_management_client.models.ActivationStatus": null, - "container_registry_management_client.models.TlsStatus": null, - "container_registry_management_client.models.CertificateType": null, - "container_registry_management_client.models.LogLevel": null, - "container_registry_management_client.models.AuditLogStatus": null, - "container_registry_management_client.models.SyncTrigger": null, - "container_registry_management_client.models.SyncState": null, - "container_registry_management_client.models.CredentialName": null, - "container_registry_management_client.models.CredentialHealthStatus": null, - "container_registry_management_client.models.PipelineOptions": null, - "container_registry_management_client.models.StorageAccessMode": null, - "container_registry_management_client.models.TokenPasswordName": null, - "container_registry_management_client.models.PipelineSourceType": null, - "container_registry_management_client.models.TriggerStatus": null, - "container_registry_management_client.models.PasswordName": null, - "container_registry_management_client.models.RegistryUsageUnit": null, - "container_registry_management_client.models.PackageSourceType": null, - "container_registry_management_client.models.PipelineRunSourceType": null, - "container_registry_management_client.models.PipelineRunTargetType": null, - "container_registry_management_client.models.TokenCertificateName": null, - "container_registry_management_client.models.TokenStatus": null, - "container_registry_management_client.models.WebhookAction": null, - "container_registry_management_client.models.WebhookStatus": null, - "container_registry_management_client.models.ImportMode": null, - "container_registry_management_client.operations.Operations.list": null, - "container_registry_management_client.aio.operations.Operations.list": null, - "container_registry_management_client.operations.RegistriesOperations.check_name_availability": null, - "container_registry_management_client.aio.operations.RegistriesOperations.check_name_availability": null, - "container_registry_management_client.operations.RegistriesOperations.list": null, - "container_registry_management_client.aio.operations.RegistriesOperations.list": null, - "container_registry_management_client.operations.RegistriesOperations.list_by_resource_group": null, - "container_registry_management_client.aio.operations.RegistriesOperations.list_by_resource_group": null, - "container_registry_management_client.operations.RegistriesOperations.get": null, - "container_registry_management_client.aio.operations.RegistriesOperations.get": null, - "container_registry_management_client.operations.RegistriesOperations.begin_create": null, - "container_registry_management_client.aio.operations.RegistriesOperations.begin_create": null, - "container_registry_management_client.operations.RegistriesOperations.begin_update": null, - "container_registry_management_client.aio.operations.RegistriesOperations.begin_update": null, - "container_registry_management_client.operations.RegistriesOperations.begin_delete": null, - "container_registry_management_client.aio.operations.RegistriesOperations.begin_delete": null, - "container_registry_management_client.operations.RegistriesOperations.begin_generate_credentials": null, - "container_registry_management_client.aio.operations.RegistriesOperations.begin_generate_credentials": null, - "container_registry_management_client.operations.RegistriesOperations.begin_import_image": null, - "container_registry_management_client.aio.operations.RegistriesOperations.begin_import_image": null, - "container_registry_management_client.operations.RegistriesOperations.list_credentials": null, - "container_registry_management_client.aio.operations.RegistriesOperations.list_credentials": null, - "container_registry_management_client.operations.RegistriesOperations.list_usages": null, - "container_registry_management_client.aio.operations.RegistriesOperations.list_usages": null, - "container_registry_management_client.operations.RegistriesOperations.list_private_link_resources": null, - "container_registry_management_client.aio.operations.RegistriesOperations.list_private_link_resources": null, - "container_registry_management_client.operations.RegistriesOperations.get_private_link_resource": null, - "container_registry_management_client.aio.operations.RegistriesOperations.get_private_link_resource": null, - "container_registry_management_client.operations.RegistriesOperations.regenerate_credential": null, - "container_registry_management_client.aio.operations.RegistriesOperations.regenerate_credential": null, - "container_registry_management_client.operations.CacheRulesOperations.list": null, - "container_registry_management_client.aio.operations.CacheRulesOperations.list": null, - "container_registry_management_client.operations.CacheRulesOperations.get": null, - "container_registry_management_client.aio.operations.CacheRulesOperations.get": null, - "container_registry_management_client.operations.CacheRulesOperations.begin_create": null, - "container_registry_management_client.aio.operations.CacheRulesOperations.begin_create": null, - "container_registry_management_client.operations.CacheRulesOperations.begin_update": null, - "container_registry_management_client.aio.operations.CacheRulesOperations.begin_update": null, - "container_registry_management_client.operations.CacheRulesOperations.begin_delete": null, - "container_registry_management_client.aio.operations.CacheRulesOperations.begin_delete": null, - "container_registry_management_client.operations.ConnectedRegistriesOperations.list": null, - "container_registry_management_client.aio.operations.ConnectedRegistriesOperations.list": null, - "container_registry_management_client.operations.ConnectedRegistriesOperations.get": null, - "container_registry_management_client.aio.operations.ConnectedRegistriesOperations.get": null, - "container_registry_management_client.operations.ConnectedRegistriesOperations.begin_create": null, - "container_registry_management_client.aio.operations.ConnectedRegistriesOperations.begin_create": null, - "container_registry_management_client.operations.ConnectedRegistriesOperations.begin_update": null, - "container_registry_management_client.aio.operations.ConnectedRegistriesOperations.begin_update": null, - "container_registry_management_client.operations.ConnectedRegistriesOperations.begin_delete": null, - "container_registry_management_client.aio.operations.ConnectedRegistriesOperations.begin_delete": null, - "container_registry_management_client.operations.ConnectedRegistriesOperations.begin_deactivate": null, - "container_registry_management_client.aio.operations.ConnectedRegistriesOperations.begin_deactivate": null, - "container_registry_management_client.operations.ConnectedRegistriesOperations.resync": null, - "container_registry_management_client.aio.operations.ConnectedRegistriesOperations.resync": null, - "container_registry_management_client.operations.CredentialSetsOperations.list": null, - "container_registry_management_client.aio.operations.CredentialSetsOperations.list": null, - "container_registry_management_client.operations.CredentialSetsOperations.get": null, - "container_registry_management_client.aio.operations.CredentialSetsOperations.get": null, - "container_registry_management_client.operations.CredentialSetsOperations.begin_create": null, - "container_registry_management_client.aio.operations.CredentialSetsOperations.begin_create": null, - "container_registry_management_client.operations.CredentialSetsOperations.begin_update": null, - "container_registry_management_client.aio.operations.CredentialSetsOperations.begin_update": null, - "container_registry_management_client.operations.CredentialSetsOperations.begin_delete": null, - "container_registry_management_client.aio.operations.CredentialSetsOperations.begin_delete": null, - "container_registry_management_client.operations.ExportPipelinesOperations.list": null, - "container_registry_management_client.aio.operations.ExportPipelinesOperations.list": null, - "container_registry_management_client.operations.ExportPipelinesOperations.get": null, - "container_registry_management_client.aio.operations.ExportPipelinesOperations.get": null, - "container_registry_management_client.operations.ExportPipelinesOperations.begin_create": null, - "container_registry_management_client.aio.operations.ExportPipelinesOperations.begin_create": null, - "container_registry_management_client.operations.ExportPipelinesOperations.begin_delete": null, - "container_registry_management_client.aio.operations.ExportPipelinesOperations.begin_delete": null, - "container_registry_management_client.operations.ImportPipelinesOperations.list": null, - "container_registry_management_client.aio.operations.ImportPipelinesOperations.list": null, - "container_registry_management_client.operations.ImportPipelinesOperations.get": null, - "container_registry_management_client.aio.operations.ImportPipelinesOperations.get": null, - "container_registry_management_client.operations.ImportPipelinesOperations.begin_create": null, - "container_registry_management_client.aio.operations.ImportPipelinesOperations.begin_create": null, - "container_registry_management_client.operations.ImportPipelinesOperations.begin_delete": null, - "container_registry_management_client.aio.operations.ImportPipelinesOperations.begin_delete": null, - "container_registry_management_client.operations.ArchivesOperations.list": null, - "container_registry_management_client.aio.operations.ArchivesOperations.list": null, - "container_registry_management_client.operations.ArchivesOperations.get": null, - "container_registry_management_client.aio.operations.ArchivesOperations.get": null, - "container_registry_management_client.operations.ArchivesOperations.begin_create": null, - "container_registry_management_client.aio.operations.ArchivesOperations.begin_create": null, - "container_registry_management_client.operations.ArchivesOperations.update": null, - "container_registry_management_client.aio.operations.ArchivesOperations.update": null, - "container_registry_management_client.operations.ArchivesOperations.begin_delete": null, - "container_registry_management_client.aio.operations.ArchivesOperations.begin_delete": null, - "container_registry_management_client.operations.ArchiveVersionsOperations.list": null, - "container_registry_management_client.aio.operations.ArchiveVersionsOperations.list": null, - "container_registry_management_client.operations.ArchiveVersionsOperations.get": null, - "container_registry_management_client.aio.operations.ArchiveVersionsOperations.get": null, - "container_registry_management_client.operations.ArchiveVersionsOperations.begin_create": null, - "container_registry_management_client.aio.operations.ArchiveVersionsOperations.begin_create": null, - "container_registry_management_client.operations.ArchiveVersionsOperations.begin_delete": null, - "container_registry_management_client.aio.operations.ArchiveVersionsOperations.begin_delete": null, - "container_registry_management_client.operations.PipelineRunsOperations.list": null, - "container_registry_management_client.aio.operations.PipelineRunsOperations.list": null, - "container_registry_management_client.operations.PipelineRunsOperations.get": null, - "container_registry_management_client.aio.operations.PipelineRunsOperations.get": null, - "container_registry_management_client.operations.PipelineRunsOperations.begin_create": null, - "container_registry_management_client.aio.operations.PipelineRunsOperations.begin_create": null, - "container_registry_management_client.operations.PipelineRunsOperations.begin_delete": null, - "container_registry_management_client.aio.operations.PipelineRunsOperations.begin_delete": null, - "container_registry_management_client.operations.PrivateEndpointConnectionsOperations.list": null, - "container_registry_management_client.aio.operations.PrivateEndpointConnectionsOperations.list": null, - "container_registry_management_client.operations.PrivateEndpointConnectionsOperations.get": null, - "container_registry_management_client.aio.operations.PrivateEndpointConnectionsOperations.get": null, - "container_registry_management_client.operations.PrivateEndpointConnectionsOperations.begin_create_or_update": null, - "container_registry_management_client.aio.operations.PrivateEndpointConnectionsOperations.begin_create_or_update": null, - "container_registry_management_client.operations.PrivateEndpointConnectionsOperations.begin_delete": null, - "container_registry_management_client.aio.operations.PrivateEndpointConnectionsOperations.begin_delete": null, - "container_registry_management_client.operations.ReplicationsOperations.list": null, - "container_registry_management_client.aio.operations.ReplicationsOperations.list": null, - "container_registry_management_client.operations.ReplicationsOperations.get": null, - "container_registry_management_client.aio.operations.ReplicationsOperations.get": null, - "container_registry_management_client.operations.ReplicationsOperations.begin_create": null, - "container_registry_management_client.aio.operations.ReplicationsOperations.begin_create": null, - "container_registry_management_client.operations.ReplicationsOperations.begin_update": null, - "container_registry_management_client.aio.operations.ReplicationsOperations.begin_update": null, - "container_registry_management_client.operations.ReplicationsOperations.begin_delete": null, - "container_registry_management_client.aio.operations.ReplicationsOperations.begin_delete": null, - "container_registry_management_client.operations.ScopeMapsOperations.list": null, - "container_registry_management_client.aio.operations.ScopeMapsOperations.list": null, - "container_registry_management_client.operations.ScopeMapsOperations.get": null, - "container_registry_management_client.aio.operations.ScopeMapsOperations.get": null, - "container_registry_management_client.operations.ScopeMapsOperations.begin_create": null, - "container_registry_management_client.aio.operations.ScopeMapsOperations.begin_create": null, - "container_registry_management_client.operations.ScopeMapsOperations.begin_update": null, - "container_registry_management_client.aio.operations.ScopeMapsOperations.begin_update": null, - "container_registry_management_client.operations.ScopeMapsOperations.begin_delete": null, - "container_registry_management_client.aio.operations.ScopeMapsOperations.begin_delete": null, - "container_registry_management_client.operations.TokensOperations.list": null, - "container_registry_management_client.aio.operations.TokensOperations.list": null, - "container_registry_management_client.operations.TokensOperations.get": null, - "container_registry_management_client.aio.operations.TokensOperations.get": null, - "container_registry_management_client.operations.TokensOperations.begin_create": null, - "container_registry_management_client.aio.operations.TokensOperations.begin_create": null, - "container_registry_management_client.operations.TokensOperations.begin_update": null, - "container_registry_management_client.aio.operations.TokensOperations.begin_update": null, - "container_registry_management_client.operations.TokensOperations.begin_delete": null, - "container_registry_management_client.aio.operations.TokensOperations.begin_delete": null, - "container_registry_management_client.operations.WebhooksOperations.list": null, - "container_registry_management_client.aio.operations.WebhooksOperations.list": null, - "container_registry_management_client.operations.WebhooksOperations.get": null, - "container_registry_management_client.aio.operations.WebhooksOperations.get": null, - "container_registry_management_client.operations.WebhooksOperations.begin_create": null, - "container_registry_management_client.aio.operations.WebhooksOperations.begin_create": null, - "container_registry_management_client.operations.WebhooksOperations.begin_update": null, - "container_registry_management_client.aio.operations.WebhooksOperations.begin_update": null, - "container_registry_management_client.operations.WebhooksOperations.begin_delete": null, - "container_registry_management_client.aio.operations.WebhooksOperations.begin_delete": null, - "container_registry_management_client.operations.WebhooksOperations.get_callback_config": null, - "container_registry_management_client.aio.operations.WebhooksOperations.get_callback_config": null, - "container_registry_management_client.operations.WebhooksOperations.list_events": null, - "container_registry_management_client.aio.operations.WebhooksOperations.list_events": null, - "container_registry_management_client.operations.WebhooksOperations.ping": null, - "container_registry_management_client.aio.operations.WebhooksOperations.ping": null - } -} \ No newline at end of file diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/__init__.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/__init__.py deleted file mode 100644 index 42a0aa5c247..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/__init__.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.8, generator: @autorest/python@6.49.1) -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -# pylint: disable=wrong-import-position - -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from ._patch import * # pylint: disable=unused-wildcard-import - -from ._client import ContainerRegistryManagementClient # type: ignore - -try: - from ._patch import __all__ as _patch_all - from ._patch import * -except ImportError: - _patch_all = [] -from ._patch import patch_sdk as _patch_sdk - -__all__ = [ - "ContainerRegistryManagementClient", -] -__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore - -_patch_sdk() diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/_client.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/_client.py deleted file mode 100644 index 587ce1fa3d8..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/_client.py +++ /dev/null @@ -1,186 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.8, generator: @autorest/python@6.49.1) -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from copy import deepcopy -from typing import Any, TYPE_CHECKING -from typing_extensions import Self - -from azure.core import PipelineClient -from azure.core.pipeline import policies -from azure.core.rest import HttpRequest, HttpResponse - -from . import models as _models -from ._configuration import ContainerRegistryManagementClientConfiguration -from ._utils.serialization import Deserializer, Serializer -from .operations import ( - ArchiveVersionsOperations, - ArchivesOperations, - CacheRulesOperations, - ConnectedRegistriesOperations, - CredentialSetsOperations, - ExportPipelinesOperations, - ImportPipelinesOperations, - Operations, - PipelineRunsOperations, - PrivateEndpointConnectionsOperations, - RegistriesOperations, - ReplicationsOperations, - ScopeMapsOperations, - TokensOperations, - WebhooksOperations, -) - -if TYPE_CHECKING: - from azure.core.credentials import TokenCredential - - -class ContainerRegistryManagementClient: # pylint: disable=too-many-instance-attributes - """The Microsoft Azure Container Registry management API provides create, read, update, and delete - functionality for Azure Container Registry resources including registries, replications, - webhooks, tasks, runs, and other registry components. - - :ivar operations: Operations operations - :vartype operations: container_registry_management_client.operations.Operations - :ivar registries: RegistriesOperations operations - :vartype registries: container_registry_management_client.operations.RegistriesOperations - :ivar cache_rules: CacheRulesOperations operations - :vartype cache_rules: container_registry_management_client.operations.CacheRulesOperations - :ivar connected_registries: ConnectedRegistriesOperations operations - :vartype connected_registries: - container_registry_management_client.operations.ConnectedRegistriesOperations - :ivar credential_sets: CredentialSetsOperations operations - :vartype credential_sets: - container_registry_management_client.operations.CredentialSetsOperations - :ivar export_pipelines: ExportPipelinesOperations operations - :vartype export_pipelines: - container_registry_management_client.operations.ExportPipelinesOperations - :ivar import_pipelines: ImportPipelinesOperations operations - :vartype import_pipelines: - container_registry_management_client.operations.ImportPipelinesOperations - :ivar archives: ArchivesOperations operations - :vartype archives: container_registry_management_client.operations.ArchivesOperations - :ivar archive_versions: ArchiveVersionsOperations operations - :vartype archive_versions: - container_registry_management_client.operations.ArchiveVersionsOperations - :ivar pipeline_runs: PipelineRunsOperations operations - :vartype pipeline_runs: container_registry_management_client.operations.PipelineRunsOperations - :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations - :vartype private_endpoint_connections: - container_registry_management_client.operations.PrivateEndpointConnectionsOperations - :ivar replications: ReplicationsOperations operations - :vartype replications: container_registry_management_client.operations.ReplicationsOperations - :ivar scope_maps: ScopeMapsOperations operations - :vartype scope_maps: container_registry_management_client.operations.ScopeMapsOperations - :ivar tokens: TokensOperations operations - :vartype tokens: container_registry_management_client.operations.TokensOperations - :ivar webhooks: WebhooksOperations operations - :vartype webhooks: container_registry_management_client.operations.WebhooksOperations - :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. - :type subscription_id: str - :param credential: Credential needed for the client to connect to Azure. Required. - :type credential: ~azure.core.credentials.TokenCredential - :keyword endpoint: Service URL. Default value is "https://management.azure.com". - :paramtype endpoint: str - :keyword api_version: Api Version. Default value is "2026-01-01-preview". Note that overriding - this default value may result in unsupported behavior. - :paramtype api_version: str - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. - """ - - def __init__( - self, - credential: "TokenCredential", - subscription_id: str, - *, - endpoint: str = "https://management.azure.com", - **kwargs: Any - ) -> None: - self._config = ContainerRegistryManagementClientConfiguration( - subscription_id=subscription_id, credential=credential, **kwargs - ) - - _policies = kwargs.pop("policies", None) - if _policies is None: - _policies = [ - policies.RequestIdPolicy(**kwargs), - self._config.headers_policy, - self._config.user_agent_policy, - self._config.proxy_policy, - policies.ContentDecodePolicy(**kwargs), - self._config.redirect_policy, - self._config.retry_policy, - self._config.authentication_policy, - self._config.custom_hook_policy, - self._config.logging_policy, - policies.DistributedTracingPolicy(**kwargs), - policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, - self._config.http_logging_policy, - ] - self._client: PipelineClient = PipelineClient(policies=_policies, **kwargs) - - client_models = {k: v for k, v in _models._models.__dict__.items() if isinstance(v, type)} - client_models |= {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - self._serialize.client_side_validation = False - self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) - self.registries = RegistriesOperations(self._client, self._config, self._serialize, self._deserialize) - self.cache_rules = CacheRulesOperations(self._client, self._config, self._serialize, self._deserialize) - self.connected_registries = ConnectedRegistriesOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.credential_sets = CredentialSetsOperations(self._client, self._config, self._serialize, self._deserialize) - self.export_pipelines = ExportPipelinesOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.import_pipelines = ImportPipelinesOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.archives = ArchivesOperations(self._client, self._config, self._serialize, self._deserialize) - self.archive_versions = ArchiveVersionsOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.pipeline_runs = PipelineRunsOperations(self._client, self._config, self._serialize, self._deserialize) - self.private_endpoint_connections = PrivateEndpointConnectionsOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.replications = ReplicationsOperations(self._client, self._config, self._serialize, self._deserialize) - self.scope_maps = ScopeMapsOperations(self._client, self._config, self._serialize, self._deserialize) - self.tokens = TokensOperations(self._client, self._config, self._serialize, self._deserialize) - self.webhooks = WebhooksOperations(self._client, self._config, self._serialize, self._deserialize) - - def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: - """Runs the network request through the client's chained policies. - - >>> from azure.core.rest import HttpRequest - >>> request = HttpRequest("GET", "https://www.example.org/") - - >>> response = client.send_request(request) - - - For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request - - :param request: The network request you want to make. Required. - :type request: ~azure.core.rest.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to False. - :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.rest.HttpResponse - """ - - request_copy = deepcopy(request) - request_copy.url = self._client.format_url(request_copy.url) - return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore - - def close(self) -> None: - self._client.close() - - def __enter__(self) -> Self: - self._client.__enter__() - return self - - def __exit__(self, *exc_details: Any) -> None: - self._client.__exit__(*exc_details) diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/_configuration.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/_configuration.py deleted file mode 100644 index c3ad3409b69..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/_configuration.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.8, generator: @autorest/python@6.49.1) -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import Any, TYPE_CHECKING - -from azure.core.pipeline import policies - -if TYPE_CHECKING: - from azure.core.credentials import TokenCredential - -VERSION = "unknown" - - -class ContainerRegistryManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long - """Configuration for ContainerRegistryManagementClient. - - Note that all parameters used to create this instance are saved as instance - attributes. - - :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. - :type subscription_id: str - :param credential: Credential needed for the client to connect to Azure. Required. - :type credential: ~azure.core.credentials.TokenCredential - :keyword api_version: Api Version. Default value is "2026-01-01-preview". Note that overriding - this default value may result in unsupported behavior. - :paramtype api_version: str - """ - - def __init__(self, subscription_id: str, credential: "TokenCredential", **kwargs: Any) -> None: - api_version: str = kwargs.pop("api_version", "2026-01-01-preview") - - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if credential is None: - raise ValueError("Parameter 'credential' must not be None.") - - self.subscription_id = subscription_id - self.credential = credential - self.api_version = api_version - self.credential_scopes = kwargs.pop("credential_scopes", ["user_impersonation"]) - kwargs.setdefault("sdk_moniker", "containerregistrymanagementclient/{}".format(VERSION)) - self.polling_interval = kwargs.get("polling_interval", 30) - self._configure(**kwargs) - - def _configure(self, **kwargs: Any) -> None: - self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) - self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) - self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) - self.authentication_policy = kwargs.get("authentication_policy") - if self.credential and not self.authentication_policy: - self.authentication_policy = policies.BearerTokenCredentialPolicy( - self.credential, *self.credential_scopes, **kwargs - ) diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/_patch.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/_patch.py deleted file mode 100644 index 87676c65a8f..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/_patch.py +++ /dev/null @@ -1,21 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------- -"""Customize generated code here. - -Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize -""" - - -__all__: list[str] = [] # Add all objects you want publicly available to users at this package level - - -def patch_sdk(): - """Do not remove from this file. - - `patch_sdk` is a last resort escape hatch that allows you to do customizations - you can't accomplish using the techniques described in - https://aka.ms/azsdk/python/dpcodegen/python/customize - """ diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/_utils/__init__.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/_utils/__init__.py deleted file mode 100644 index 2566f510b64..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/_utils/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.8, generator: @autorest/python@6.49.1) -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/_utils/serialization.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/_utils/serialization.py deleted file mode 100644 index 74d041d57ca..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/_utils/serialization.py +++ /dev/null @@ -1,2039 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.8, generator: @autorest/python@6.49.1) -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -# pyright: reportUnnecessaryTypeIgnoreComment=false - -from base64 import b64decode, b64encode -import calendar -import datetime -import decimal -import email -from enum import Enum -import json -import logging -import re -import sys -import codecs -from typing import ( - Any, - cast, - Optional, - Union, - AnyStr, - IO, - Mapping, - Callable, - MutableMapping, -) - -try: - from urllib import quote # type: ignore -except ImportError: - from urllib.parse import quote -import xml.etree.ElementTree as ET - -import isodate # type: ignore -from typing_extensions import Self - -from azure.core.exceptions import DeserializationError, SerializationError -from azure.core.serialization import NULL as CoreNull - -_BOM = codecs.BOM_UTF8.decode(encoding="utf-8") - -JSON = MutableMapping[str, Any] - - -class RawDeserializer: - - # Accept "text" because we're open minded people... - JSON_REGEXP = re.compile(r"^(application|text)/([a-z+.]+\+)?json$") - - # Name used in context - CONTEXT_NAME = "deserialized_data" - - @classmethod - def deserialize_from_text(cls, data: Optional[Union[AnyStr, IO]], content_type: Optional[str] = None) -> Any: - """Decode data according to content-type. - - Accept a stream of data as well, but will be load at once in memory for now. - - If no content-type, will return the string version (not bytes, not stream) - - :param data: Input, could be bytes or stream (will be decoded with UTF8) or text - :type data: str or bytes or IO - :param str content_type: The content type. - :return: The deserialized data. - :rtype: object - """ - if hasattr(data, "read"): - # Assume a stream - data = cast(IO, data).read() - - if isinstance(data, bytes): - data_as_str = data.decode(encoding="utf-8-sig") - else: - # Explain to mypy the correct type. - data_as_str = cast(str, data) - - # Remove Byte Order Mark if present in string - data_as_str = data_as_str.lstrip(_BOM) - - if content_type is None: - return data - - if cls.JSON_REGEXP.match(content_type): - try: - return json.loads(data_as_str) - except ValueError as err: - raise DeserializationError("JSON is invalid: {}".format(err), err) from err - elif "xml" in (content_type or []): - try: - - try: - if isinstance(data, unicode): # type: ignore - # If I'm Python 2.7 and unicode XML will scream if I try a "fromstring" on unicode string - data_as_str = data_as_str.encode(encoding="utf-8") # type: ignore - except NameError: - pass - - return ET.fromstring(data_as_str) # nosec - except ET.ParseError as err: - # It might be because the server has an issue, and returned JSON with - # content-type XML.... - # So let's try a JSON load, and if it's still broken - # let's flow the initial exception - def _json_attemp(data): - try: - return True, json.loads(data) - except ValueError: - return False, None # Don't care about this one - - success, json_result = _json_attemp(data) - if success: - return json_result - # If i'm here, it's not JSON, it's not XML, let's scream - # and raise the last context in this block (the XML exception) - # The function hack is because Py2.7 messes up with exception - # context otherwise. - _LOGGER.critical("Wasn't XML not JSON, failing") - raise DeserializationError("XML is invalid") from err - elif content_type.startswith("text/"): - return data_as_str - raise DeserializationError("Cannot deserialize content-type: {}".format(content_type)) - - @classmethod - def deserialize_from_http_generics(cls, body_bytes: Optional[Union[AnyStr, IO]], headers: Mapping) -> Any: - """Deserialize from HTTP response. - - Use bytes and headers to NOT use any requests/aiohttp or whatever - specific implementation. - Headers will tested for "content-type" - - :param bytes body_bytes: The body of the response. - :param dict headers: The headers of the response. - :returns: The deserialized data. - :rtype: object - """ - # Try to use content-type from headers if available - content_type = None - if "content-type" in headers: - content_type = headers["content-type"].split(";")[0].strip().lower() - # Ouch, this server did not declare what it sent... - # Let's guess it's JSON... - # Also, since Autorest was considering that an empty body was a valid JSON, - # need that test as well.... - else: - content_type = "application/json" - - if body_bytes: - return cls.deserialize_from_text(body_bytes, content_type) - return None - - -_LOGGER = logging.getLogger(__name__) - -try: - _long_type = long # type: ignore -except NameError: - _long_type = int - -TZ_UTC = datetime.timezone.utc - -_FLATTEN = re.compile(r"(? None: - self.additional_properties: Optional[dict[str, Any]] = {} - for k in kwargs: # pylint: disable=consider-using-dict-items - if k not in self._attribute_map: - _LOGGER.warning("%s is not a known attribute of class %s and will be ignored", k, self.__class__) - elif k in self._validation and self._validation[k].get("readonly", False): - _LOGGER.warning("Readonly attribute %s will be ignored in class %s", k, self.__class__) - else: - setattr(self, k, kwargs[k]) - - def __eq__(self, other: Any) -> bool: - """Compare objects by comparing all attributes. - - :param object other: The object to compare - :returns: True if objects are equal - :rtype: bool - """ - if isinstance(other, self.__class__): - return self.__dict__ == other.__dict__ - return False - - def __ne__(self, other: Any) -> bool: - """Compare objects by comparing all attributes. - - :param object other: The object to compare - :returns: True if objects are not equal - :rtype: bool - """ - return not self.__eq__(other) - - def __str__(self) -> str: - return str(self.__dict__) - - @classmethod - def enable_additional_properties_sending(cls) -> None: - cls._attribute_map["additional_properties"] = {"key": "", "type": "{object}"} - - @classmethod - def is_xml_model(cls) -> bool: - try: - cls._xml_map # type: ignore - except AttributeError: - return False - return True - - @classmethod - def _create_xml_node(cls): - """Create XML node. - - :returns: The XML node - :rtype: xml.etree.ElementTree.Element - """ - try: - xml_map = cls._xml_map # type: ignore - except AttributeError: - xml_map = {} - - return _create_xml_node(xml_map.get("name", cls.__name__), xml_map.get("prefix", None), xml_map.get("ns", None)) - - def serialize(self, keep_readonly: bool = False, **kwargs: Any) -> JSON: - """Return the JSON that would be sent to server from this model. - - This is an alias to `as_dict(full_restapi_key_transformer, keep_readonly=False)`. - - If you want XML serialization, you can pass the kwargs is_xml=True. - - :param bool keep_readonly: If you want to serialize the readonly attributes - :returns: A dict JSON compatible object - :rtype: dict - """ - serializer = Serializer(self._infer_class_models()) - return serializer._serialize( # type: ignore # pylint: disable=protected-access - self, keep_readonly=keep_readonly, **kwargs - ) - - def as_dict( - self, - keep_readonly: bool = True, - key_transformer: Callable[[str, dict[str, Any], Any], Any] = attribute_transformer, - **kwargs: Any - ) -> JSON: - """Return a dict that can be serialized using json.dump. - - Advanced usage might optionally use a callback as parameter: - - .. code::python - - def my_key_transformer(key, attr_desc, value): - return key - - Key is the attribute name used in Python. Attr_desc - is a dict of metadata. Currently contains 'type' with the - msrest type and 'key' with the RestAPI encoded key. - Value is the current value in this object. - - The string returned will be used to serialize the key. - If the return type is a list, this is considered hierarchical - result dict. - - See the three examples in this file: - - - attribute_transformer - - full_restapi_key_transformer - - last_restapi_key_transformer - - If you want XML serialization, you can pass the kwargs is_xml=True. - - :param bool keep_readonly: If you want to serialize the readonly attributes - :param function key_transformer: A key transformer function. - :returns: A dict JSON compatible object - :rtype: dict - """ - serializer = Serializer(self._infer_class_models()) - return serializer._serialize( # type: ignore # pylint: disable=protected-access - self, key_transformer=key_transformer, keep_readonly=keep_readonly, **kwargs - ) - - @classmethod - def _infer_class_models(cls): - try: - str_models = cls.__module__.rsplit(".", 1)[0] - models = sys.modules[str_models] - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - if cls.__name__ not in client_models: - raise ValueError("Not Autorest generated code") - except Exception: # pylint: disable=broad-exception-caught - # Assume it's not Autorest generated (tests?). Add ourselves as dependencies. - client_models = {cls.__name__: cls} - return client_models - - @classmethod - def deserialize(cls, data: Any, content_type: Optional[str] = None) -> Self: - """Parse a str using the RestAPI syntax and return a model. - - :param str data: A str using RestAPI structure. JSON by default. - :param str content_type: JSON by default, set application/xml if XML. - :returns: An instance of this model - :raises DeserializationError: if something went wrong - :rtype: Self - """ - deserializer = Deserializer(cls._infer_class_models()) - return deserializer(cls.__name__, data, content_type=content_type) # type: ignore - - @classmethod - def from_dict( - cls, - data: Any, - key_extractors: Optional[Callable[[str, dict[str, Any], Any], Any]] = None, - content_type: Optional[str] = None, - ) -> Self: - """Parse a dict using given key extractor return a model. - - By default consider key - extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor - and last_rest_key_case_insensitive_extractor) - - :param dict data: A dict using RestAPI structure - :param function key_extractors: A key extractor function. - :param str content_type: JSON by default, set application/xml if XML. - :returns: An instance of this model - :raises DeserializationError: if something went wrong - :rtype: Self - """ - deserializer = Deserializer(cls._infer_class_models()) - deserializer.key_extractors = ( # type: ignore - [ # type: ignore - attribute_key_case_insensitive_extractor, - rest_key_case_insensitive_extractor, - last_rest_key_case_insensitive_extractor, - ] - if key_extractors is None - else key_extractors - ) - return deserializer(cls.__name__, data, content_type=content_type) # type: ignore - - @classmethod - def _flatten_subtype(cls, key, objects): - if "_subtype_map" not in cls.__dict__: - return {} - result = dict(cls._subtype_map[key]) - for valuetype in cls._subtype_map[key].values(): - result |= objects[valuetype]._flatten_subtype(key, objects) # pylint: disable=protected-access - return result - - @classmethod - def _classify(cls, response, objects): - """Check the class _subtype_map for any child classes. - We want to ignore any inherited _subtype_maps. - - :param dict response: The initial data - :param dict objects: The class objects - :returns: The class to be used - :rtype: class - """ - for subtype_key in cls.__dict__.get("_subtype_map", {}).keys(): - subtype_value = None - - if not isinstance(response, ET.Element): - rest_api_response_key = cls._get_rest_key_parts(subtype_key)[-1] - subtype_value = response.get(rest_api_response_key, None) or response.get(subtype_key, None) - else: - subtype_value = xml_key_extractor(subtype_key, cls._attribute_map[subtype_key], response) - if subtype_value: - # Try to match base class. Can be class name only - # (bug to fix in Autorest to support x-ms-discriminator-name) - if cls.__name__ == subtype_value: - return cls - flatten_mapping_type = cls._flatten_subtype(subtype_key, objects) - try: - return objects[flatten_mapping_type[subtype_value]] # type: ignore - except KeyError: - _LOGGER.warning( - "Subtype value %s has no mapping, use base class %s.", - subtype_value, - cls.__name__, - ) - break - else: - _LOGGER.warning("Discriminator %s is absent or null, use base class %s.", subtype_key, cls.__name__) - break - return cls - - @classmethod - def _get_rest_key_parts(cls, attr_key): - """Get the RestAPI key of this attr, split it and decode part - :param str attr_key: Attribute key must be in attribute_map. - :returns: A list of RestAPI part - :rtype: list - """ - rest_split_key = _FLATTEN.split(cls._attribute_map[attr_key]["key"]) - return [_decode_attribute_map_key(key_part) for key_part in rest_split_key] - - -def _decode_attribute_map_key(key): - """This decode a key in an _attribute_map to the actual key we want to look at - inside the received data. - - :param str key: A key string from the generated code - :returns: The decoded key - :rtype: str - """ - return key.replace("\\.", ".") - - -class Serializer: # pylint: disable=too-many-public-methods - """Request object model serializer.""" - - basic_types = {str: "str", int: "int", bool: "bool", float: "float"} - - _xml_basic_types_serializers = {"bool": lambda x: str(x).lower()} - days = {0: "Mon", 1: "Tue", 2: "Wed", 3: "Thu", 4: "Fri", 5: "Sat", 6: "Sun"} - months = { - 1: "Jan", - 2: "Feb", - 3: "Mar", - 4: "Apr", - 5: "May", - 6: "Jun", - 7: "Jul", - 8: "Aug", - 9: "Sep", - 10: "Oct", - 11: "Nov", - 12: "Dec", - } - validation = { - "min_length": lambda x, y: len(x) < y, - "max_length": lambda x, y: len(x) > y, - "minimum": lambda x, y: x < y, - "maximum": lambda x, y: x > y, - "minimum_ex": lambda x, y: x <= y, - "maximum_ex": lambda x, y: x >= y, - "min_items": lambda x, y: len(x) < y, - "max_items": lambda x, y: len(x) > y, - "pattern": lambda x, y: not re.match(y, x, re.UNICODE), - "unique": lambda x, y: len(x) != len(set(x)), - "multiple": lambda x, y: x % y != 0, - } - - def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: - self.serialize_type = { - "iso-8601": Serializer.serialize_iso, - "rfc-1123": Serializer.serialize_rfc, - "unix-time": Serializer.serialize_unix, - "duration": Serializer.serialize_duration, - "date": Serializer.serialize_date, - "time": Serializer.serialize_time, - "decimal": Serializer.serialize_decimal, - "long": Serializer.serialize_long, - "bytearray": Serializer.serialize_bytearray, - "base64": Serializer.serialize_base64, - "object": self.serialize_object, - "[]": self.serialize_iter, - "{}": self.serialize_dict, - } - self.dependencies: dict[str, type] = dict(classes) if classes else {} - self.key_transformer = full_restapi_key_transformer - self.client_side_validation = True - - def _serialize( # pylint: disable=too-many-nested-blocks, too-many-branches, too-many-statements, too-many-locals - self, target_obj, data_type=None, **kwargs - ): - """Serialize data into a string according to type. - - :param object target_obj: The data to be serialized. - :param str data_type: The type to be serialized from. - :rtype: str, dict - :raises SerializationError: if serialization fails. - :returns: The serialized data. - """ - key_transformer = kwargs.get("key_transformer", self.key_transformer) - keep_readonly = kwargs.get("keep_readonly", False) - if target_obj is None: - return None - - attr_name = None - class_name = target_obj.__class__.__name__ - - if data_type: - return self.serialize_data(target_obj, data_type, **kwargs) - - if not hasattr(target_obj, "_attribute_map"): - data_type = type(target_obj).__name__ - if data_type in self.basic_types.values(): - return self.serialize_data(target_obj, data_type, **kwargs) - - # Force "is_xml" kwargs if we detect a XML model - try: - is_xml_model_serialization = kwargs["is_xml"] - except KeyError: - is_xml_model_serialization = kwargs.setdefault("is_xml", target_obj.is_xml_model()) - - serialized = {} - if is_xml_model_serialization: - serialized = target_obj._create_xml_node() # pylint: disable=protected-access - try: - attributes = target_obj._attribute_map # pylint: disable=protected-access - for attr, attr_desc in attributes.items(): - attr_name = attr - if not keep_readonly and target_obj._validation.get( # pylint: disable=protected-access - attr_name, {} - ).get("readonly", False): - continue - - if attr_name == "additional_properties" and attr_desc["key"] == "": - if target_obj.additional_properties is not None: - serialized |= target_obj.additional_properties - continue - try: - - orig_attr = getattr(target_obj, attr) - if is_xml_model_serialization: - pass # Don't provide "transformer" for XML for now. Keep "orig_attr" - else: # JSON - keys, orig_attr = key_transformer(attr, attr_desc.copy(), orig_attr) - keys = keys if isinstance(keys, list) else [keys] - - kwargs["serialization_ctxt"] = attr_desc - new_attr = self.serialize_data(orig_attr, attr_desc["type"], **kwargs) - - if is_xml_model_serialization: - xml_desc = attr_desc.get("xml", {}) - xml_name = xml_desc.get("name", attr_desc["key"]) - xml_prefix = xml_desc.get("prefix", None) - xml_ns = xml_desc.get("ns", None) - if xml_desc.get("attr", False): - if xml_ns: - ET.register_namespace(xml_prefix, xml_ns) - xml_name = "{{{}}}{}".format(xml_ns, xml_name) - serialized.set(xml_name, new_attr) # type: ignore - continue - if xml_desc.get("text", False): - serialized.text = new_attr # type: ignore - continue - if isinstance(new_attr, list): - serialized.extend(new_attr) # type: ignore - elif isinstance(new_attr, ET.Element): - # If the down XML has no XML/Name, - # we MUST replace the tag with the local tag. But keeping the namespaces. - if "name" not in getattr(orig_attr, "_xml_map", {}): - splitted_tag = new_attr.tag.split("}") - if len(splitted_tag) == 2: # Namespace - new_attr.tag = "}".join([splitted_tag[0], xml_name]) - else: - new_attr.tag = xml_name - serialized.append(new_attr) # type: ignore - else: # That's a basic type - # Integrate namespace if necessary - local_node = _create_xml_node(xml_name, xml_prefix, xml_ns) - local_node.text = str(new_attr) - serialized.append(local_node) # type: ignore - else: # JSON - for k in reversed(keys): # type: ignore - new_attr = {k: new_attr} - - _new_attr = new_attr - _serialized = serialized - for k in keys: # type: ignore - if k not in _serialized: - _serialized.update(_new_attr) # type: ignore - _new_attr = _new_attr[k] # type: ignore - _serialized = _serialized[k] - except ValueError as err: - if isinstance(err, SerializationError): - raise - - except (AttributeError, KeyError, TypeError) as err: - msg = "Attribute {} in object {} cannot be serialized.\n{}".format(attr_name, class_name, str(target_obj)) - raise SerializationError(msg) from err - return serialized - - def body(self, data, data_type, **kwargs): - """Serialize data intended for a request body. - - :param object data: The data to be serialized. - :param str data_type: The type to be serialized from. - :rtype: dict - :raises SerializationError: if serialization fails. - :raises ValueError: if data is None - :returns: The serialized request body - """ - - # Just in case this is a dict - internal_data_type_str = data_type.strip("[]{}") - internal_data_type = self.dependencies.get(internal_data_type_str, None) - try: - is_xml_model_serialization = kwargs["is_xml"] - except KeyError: - if internal_data_type and issubclass(internal_data_type, Model): - is_xml_model_serialization = kwargs.setdefault("is_xml", internal_data_type.is_xml_model()) - else: - is_xml_model_serialization = False - if internal_data_type and not isinstance(internal_data_type, Enum): - try: - deserializer = Deserializer(self.dependencies) - # Since it's on serialization, it's almost sure that format is not JSON REST - # We're not able to deal with additional properties for now. - deserializer.additional_properties_detection = False - if is_xml_model_serialization: - deserializer.key_extractors = [ # type: ignore - attribute_key_case_insensitive_extractor, - ] - else: - deserializer.key_extractors = [ - rest_key_case_insensitive_extractor, - attribute_key_case_insensitive_extractor, - last_rest_key_case_insensitive_extractor, - ] - data = deserializer._deserialize(data_type, data) # pylint: disable=protected-access - except DeserializationError as err: - raise SerializationError("Unable to build a model: " + str(err)) from err - - return self._serialize(data, data_type, **kwargs) - - def url(self, name, data, data_type, **kwargs): - """Serialize data intended for a URL path. - - :param str name: The name of the URL path parameter. - :param object data: The data to be serialized. - :param str data_type: The type to be serialized from. - :rtype: str - :returns: The serialized URL path - :raises TypeError: if serialization fails. - :raises ValueError: if data is None - """ - try: - output = self.serialize_data(data, data_type, **kwargs) - if data_type == "bool": - output = json.dumps(output) - - if kwargs.get("skip_quote") is True: - output = str(output) - output = output.replace("{", quote("{")).replace("}", quote("}")) - else: - output = quote(str(output), safe="") - except SerializationError as exc: - raise TypeError("{} must be type {}.".format(name, data_type)) from exc - return output - - def query(self, name, data, data_type, **kwargs): - """Serialize data intended for a URL query. - - :param str name: The name of the query parameter. - :param object data: The data to be serialized. - :param str data_type: The type to be serialized from. - :rtype: str, list - :raises TypeError: if serialization fails. - :raises ValueError: if data is None - :returns: The serialized query parameter - """ - try: - # Treat the list aside, since we don't want to encode the div separator - if data_type.startswith("["): - internal_data_type = data_type[1:-1] - do_quote = not kwargs.get("skip_quote", False) - return self.serialize_iter(data, internal_data_type, do_quote=do_quote, **kwargs) - - # Not a list, regular serialization - output = self.serialize_data(data, data_type, **kwargs) - if data_type == "bool": - output = json.dumps(output) - if kwargs.get("skip_quote") is True: - output = str(output) - else: - output = quote(str(output), safe="") - except SerializationError as exc: - raise TypeError("{} must be type {}.".format(name, data_type)) from exc - return str(output) - - def header(self, name, data, data_type, **kwargs): - """Serialize data intended for a request header. - - :param str name: The name of the header. - :param object data: The data to be serialized. - :param str data_type: The type to be serialized from. - :rtype: str - :raises TypeError: if serialization fails. - :raises ValueError: if data is None - :returns: The serialized header - """ - try: - if data_type in ["[str]"]: - data = ["" if d is None else d for d in data] - - output = self.serialize_data(data, data_type, **kwargs) - if data_type == "bool": - output = json.dumps(output) - except SerializationError as exc: - raise TypeError("{} must be type {}.".format(name, data_type)) from exc - return str(output) - - def serialize_data(self, data, data_type, **kwargs): - """Serialize generic data according to supplied data type. - - :param object data: The data to be serialized. - :param str data_type: The type to be serialized from. - :raises AttributeError: if required data is None. - :raises ValueError: if data is None - :raises SerializationError: if serialization fails. - :returns: The serialized data. - :rtype: str, int, float, bool, dict, list - """ - if data is None: - raise ValueError("No value for given attribute") - - try: - if data is CoreNull: - return None - if data_type in self.basic_types.values(): - return self.serialize_basic(data, data_type, **kwargs) - - if data_type in self.serialize_type: - return self.serialize_type[data_type](data, **kwargs) - - # If dependencies is empty, try with current data class - # It has to be a subclass of Enum anyway - enum_type = self.dependencies.get(data_type, cast(type, data.__class__)) - if issubclass(enum_type, Enum): - return Serializer.serialize_enum(data, enum_obj=enum_type) - - iter_type = data_type[0] + data_type[-1] - if iter_type in self.serialize_type: - return self.serialize_type[iter_type](data, data_type[1:-1], **kwargs) - - except (ValueError, TypeError) as err: - msg = "Unable to serialize value: {!r} as type: {!r}." - raise SerializationError(msg.format(data, data_type)) from err - return self._serialize(data, **kwargs) - - @classmethod - def _get_custom_serializers(cls, data_type, **kwargs): # pylint: disable=inconsistent-return-statements - custom_serializer = kwargs.get("basic_types_serializers", {}).get(data_type) - if custom_serializer: - return custom_serializer - if kwargs.get("is_xml", False): - return cls._xml_basic_types_serializers.get(data_type) - - @classmethod - def serialize_basic(cls, data, data_type, **kwargs): - """Serialize basic builting data type. - Serializes objects to str, int, float or bool. - - Possible kwargs: - - basic_types_serializers dict[str, callable] : If set, use the callable as serializer - - is_xml bool : If set, use xml_basic_types_serializers - - :param obj data: Object to be serialized. - :param str data_type: Type of object in the iterable. - :rtype: str, int, float, bool - :return: serialized object - :raises TypeError: raise if data_type is not one of str, int, float, bool. - """ - custom_serializer = cls._get_custom_serializers(data_type, **kwargs) - if custom_serializer: - return custom_serializer(data) - if data_type == "str": - return cls.serialize_unicode(data) - if data_type == "int": - return int(data) - if data_type == "float": - return float(data) - if data_type == "bool": - return bool(data) - raise TypeError("Unknown basic data type: {}".format(data_type)) - - @classmethod - def serialize_unicode(cls, data): - """Special handling for serializing unicode strings in Py2. - Encode to UTF-8 if unicode, otherwise handle as a str. - - :param str data: Object to be serialized. - :rtype: str - :return: serialized object - """ - try: # If I received an enum, return its value - return data.value - except AttributeError: - pass - - try: - if isinstance(data, unicode): # type: ignore - # Don't change it, JSON and XML ElementTree are totally able - # to serialize correctly u'' strings - return data - except NameError: - return str(data) - return str(data) - - def serialize_iter(self, data, iter_type, div=None, **kwargs): - """Serialize iterable. - - Supported kwargs: - - serialization_ctxt dict : The current entry of _attribute_map, or same format. - serialization_ctxt['type'] should be same as data_type. - - is_xml bool : If set, serialize as XML - - :param list data: Object to be serialized. - :param str iter_type: Type of object in the iterable. - :param str div: If set, this str will be used to combine the elements - in the iterable into a combined string. Default is 'None'. - Defaults to False. - :rtype: list, str - :return: serialized iterable - """ - if isinstance(data, str): - raise SerializationError("Refuse str type as a valid iter type.") - - serialization_ctxt = kwargs.get("serialization_ctxt", {}) - is_xml = kwargs.get("is_xml", False) - - serialized = [] - for d in data: - try: - serialized.append(self.serialize_data(d, iter_type, **kwargs)) - except ValueError as err: - if isinstance(err, SerializationError): - raise - serialized.append(None) - - if kwargs.get("do_quote", False): - serialized = ["" if s is None else quote(str(s), safe="") for s in serialized] - - if div: - serialized = ["" if s is None else str(s) for s in serialized] - serialized = div.join(serialized) - - if "xml" in serialization_ctxt or is_xml: - # XML serialization is more complicated - xml_desc = serialization_ctxt.get("xml", {}) - xml_name = xml_desc.get("name") - if not xml_name: - xml_name = serialization_ctxt["key"] - - # Create a wrap node if necessary (use the fact that Element and list have "append") - is_wrapped = xml_desc.get("wrapped", False) - node_name = xml_desc.get("itemsName", xml_name) - if is_wrapped: - final_result = _create_xml_node(xml_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) - else: - final_result = [] - # All list elements to "local_node" - for el in serialized: - if isinstance(el, ET.Element): - el_node = el - else: - el_node = _create_xml_node(node_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) - if el is not None: # Otherwise it writes "None" :-p - el_node.text = str(el) - final_result.append(el_node) - return final_result - return serialized - - def serialize_dict(self, attr, dict_type, **kwargs): - """Serialize a dictionary of objects. - - :param dict attr: Object to be serialized. - :param str dict_type: Type of object in the dictionary. - :rtype: dict - :return: serialized dictionary - """ - serialization_ctxt = kwargs.get("serialization_ctxt", {}) - serialized = {} - for key, value in attr.items(): - try: - serialized[self.serialize_unicode(key)] = self.serialize_data(value, dict_type, **kwargs) - except ValueError as err: - if isinstance(err, SerializationError): - raise - serialized[self.serialize_unicode(key)] = None - - if "xml" in serialization_ctxt: - # XML serialization is more complicated - xml_desc = serialization_ctxt["xml"] - xml_name = xml_desc["name"] - - final_result = _create_xml_node(xml_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) - for key, value in serialized.items(): - ET.SubElement(final_result, key).text = value - return final_result - - return serialized - - def serialize_object(self, attr, **kwargs): # pylint: disable=too-many-return-statements - """Serialize a generic object. - This will be handled as a dictionary. If object passed in is not - a basic type (str, int, float, dict, list) it will simply be - cast to str. - - :param dict attr: Object to be serialized. - :rtype: dict or str - :return: serialized object - """ - if attr is None: - return None - if isinstance(attr, ET.Element): - return attr - obj_type = type(attr) - if obj_type in self.basic_types: - return self.serialize_basic(attr, self.basic_types[obj_type], **kwargs) - if obj_type is _long_type: - return self.serialize_long(attr) - if obj_type is str: - return self.serialize_unicode(attr) - if obj_type is datetime.datetime: - return self.serialize_iso(attr) - if obj_type is datetime.date: - return self.serialize_date(attr) - if obj_type is datetime.time: - return self.serialize_time(attr) - if obj_type is datetime.timedelta: - return self.serialize_duration(attr) - if obj_type is decimal.Decimal: - return self.serialize_decimal(attr) - - # If it's a model or I know this dependency, serialize as a Model - if obj_type in self.dependencies.values() or isinstance(attr, Model): - return self._serialize(attr) - - if obj_type == dict: - serialized = {} - for key, value in attr.items(): - try: - serialized[self.serialize_unicode(key)] = self.serialize_object(value, **kwargs) - except ValueError: - serialized[self.serialize_unicode(key)] = None - return serialized - - if obj_type == list: - serialized = [] - for obj in attr: - try: - serialized.append(self.serialize_object(obj, **kwargs)) - except ValueError: - pass - return serialized - return str(attr) - - @staticmethod - def serialize_enum(attr, enum_obj=None): - try: - result = attr.value - except AttributeError: - result = attr - try: - enum_obj(result) # type: ignore - return result - except ValueError as exc: - for enum_value in enum_obj: # type: ignore - if enum_value.value.lower() == str(attr).lower(): - return enum_value.value - error = "{!r} is not valid value for enum {!r}" - raise SerializationError(error.format(attr, enum_obj)) from exc - - @staticmethod - def serialize_bytearray(attr, **kwargs): # pylint: disable=unused-argument - """Serialize bytearray into base-64 string. - - :param str attr: Object to be serialized. - :rtype: str - :return: serialized base64 - """ - return b64encode(attr).decode() - - @staticmethod - def serialize_base64(attr, **kwargs): # pylint: disable=unused-argument - """Serialize str into base-64 string. - - :param str attr: Object to be serialized. - :rtype: str - :return: serialized base64 - """ - encoded = b64encode(attr).decode("ascii") - return encoded.strip("=").replace("+", "-").replace("/", "_") - - @staticmethod - def serialize_decimal(attr, **kwargs): # pylint: disable=unused-argument - """Serialize Decimal object to float. - - :param decimal attr: Object to be serialized. - :rtype: float - :return: serialized decimal - """ - return float(attr) - - @staticmethod - def serialize_long(attr, **kwargs): # pylint: disable=unused-argument - """Serialize long (Py2) or int (Py3). - - :param int attr: Object to be serialized. - :rtype: int/long - :return: serialized long - """ - return _long_type(attr) - - @staticmethod - def serialize_date(attr, **kwargs): # pylint: disable=unused-argument - """Serialize Date object into ISO-8601 formatted string. - - :param Date attr: Object to be serialized. - :rtype: str - :return: serialized date - """ - if isinstance(attr, str): - attr = isodate.parse_date(attr) - t = "{:04}-{:02}-{:02}".format(attr.year, attr.month, attr.day) - return t - - @staticmethod - def serialize_time(attr, **kwargs): # pylint: disable=unused-argument - """Serialize Time object into ISO-8601 formatted string. - - :param datetime.time attr: Object to be serialized. - :rtype: str - :return: serialized time - """ - if isinstance(attr, str): - attr = isodate.parse_time(attr) - t = "{:02}:{:02}:{:02}".format(attr.hour, attr.minute, attr.second) - if attr.microsecond: - t += ".{:02}".format(attr.microsecond) - return t - - @staticmethod - def serialize_duration(attr, **kwargs): # pylint: disable=unused-argument - """Serialize TimeDelta object into ISO-8601 formatted string. - - :param TimeDelta attr: Object to be serialized. - :rtype: str - :return: serialized duration - """ - if isinstance(attr, str): - attr = isodate.parse_duration(attr) - return isodate.duration_isoformat(attr) - - @staticmethod - def serialize_rfc(attr, **kwargs): # pylint: disable=unused-argument - """Serialize Datetime object into RFC-1123 formatted string. - - :param Datetime attr: Object to be serialized. - :rtype: str - :raises TypeError: if format invalid. - :return: serialized rfc - """ - try: - if not attr.tzinfo: - _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") - utc = attr.utctimetuple() - except AttributeError as exc: - raise TypeError("RFC1123 object must be valid Datetime object.") from exc - - return "{}, {:02} {} {:04} {:02}:{:02}:{:02} GMT".format( - Serializer.days[utc.tm_wday], - utc.tm_mday, - Serializer.months[utc.tm_mon], - utc.tm_year, - utc.tm_hour, - utc.tm_min, - utc.tm_sec, - ) - - @staticmethod - def serialize_iso(attr, **kwargs): # pylint: disable=unused-argument - """Serialize Datetime object into ISO-8601 formatted string. - - :param Datetime attr: Object to be serialized. - :rtype: str - :raises SerializationError: if format invalid. - :return: serialized iso - """ - if isinstance(attr, str): - attr = isodate.parse_datetime(attr) - try: - if not attr.tzinfo: - _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") - utc = attr.utctimetuple() - if utc.tm_year > 9999 or utc.tm_year < 1: - raise OverflowError("Hit max or min date") - - microseconds = str(attr.microsecond).rjust(6, "0").rstrip("0").ljust(3, "0") - if microseconds: - microseconds = "." + microseconds - date = "{:04}-{:02}-{:02}T{:02}:{:02}:{:02}".format( - utc.tm_year, utc.tm_mon, utc.tm_mday, utc.tm_hour, utc.tm_min, utc.tm_sec - ) - return date + microseconds + "Z" - except (ValueError, OverflowError) as err: - msg = "Unable to serialize datetime object." - raise SerializationError(msg) from err - except AttributeError as err: - msg = "ISO-8601 object must be valid Datetime object." - raise TypeError(msg) from err - - @staticmethod - def serialize_unix(attr, **kwargs): # pylint: disable=unused-argument - """Serialize Datetime object into IntTime format. - This is represented as seconds. - - :param Datetime attr: Object to be serialized. - :rtype: int - :raises SerializationError: if format invalid - :return: serialied unix - """ - if isinstance(attr, int): - return attr - try: - if not attr.tzinfo: - _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") - return int(calendar.timegm(attr.utctimetuple())) - except AttributeError as exc: - raise TypeError("Unix time object must be valid Datetime object.") from exc - - -def rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument - key = attr_desc["key"] - working_data = data - - while "." in key: - # Need the cast, as for some reasons "split" is typed as list[str | Any] - dict_keys = cast(list[str], _FLATTEN.split(key)) - if len(dict_keys) == 1: - key = _decode_attribute_map_key(dict_keys[0]) - break - working_key = _decode_attribute_map_key(dict_keys[0]) - working_data = working_data.get(working_key, data) - if working_data is None: - # If at any point while following flatten JSON path see None, it means - # that all properties under are None as well - return None - key = ".".join(dict_keys[1:]) - - return working_data.get(key) - - -def rest_key_case_insensitive_extractor( # pylint: disable=unused-argument, inconsistent-return-statements - attr, attr_desc, data -): - key = attr_desc["key"] - working_data = data - - while "." in key: - dict_keys = _FLATTEN.split(key) - if len(dict_keys) == 1: - key = _decode_attribute_map_key(dict_keys[0]) - break - working_key = _decode_attribute_map_key(dict_keys[0]) - working_data = attribute_key_case_insensitive_extractor(working_key, None, working_data) - if working_data is None: - # If at any point while following flatten JSON path see None, it means - # that all properties under are None as well - return None - key = ".".join(dict_keys[1:]) - - if working_data: - return attribute_key_case_insensitive_extractor(key, None, working_data) - - -def last_rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument - """Extract the attribute in "data" based on the last part of the JSON path key. - - :param str attr: The attribute to extract - :param dict attr_desc: The attribute description - :param dict data: The data to extract from - :rtype: object - :returns: The extracted attribute - """ - key = attr_desc["key"] - dict_keys = _FLATTEN.split(key) - return attribute_key_extractor(dict_keys[-1], None, data) - - -def last_rest_key_case_insensitive_extractor(attr, attr_desc, data): # pylint: disable=unused-argument - """Extract the attribute in "data" based on the last part of the JSON path key. - - This is the case insensitive version of "last_rest_key_extractor" - :param str attr: The attribute to extract - :param dict attr_desc: The attribute description - :param dict data: The data to extract from - :rtype: object - :returns: The extracted attribute - """ - key = attr_desc["key"] - dict_keys = _FLATTEN.split(key) - return attribute_key_case_insensitive_extractor(dict_keys[-1], None, data) - - -def attribute_key_extractor(attr, _, data): - return data.get(attr) - - -def attribute_key_case_insensitive_extractor(attr, _, data): - found_key = None - lower_attr = attr.lower() - for key in data: - if lower_attr == key.lower(): - found_key = key - break - - return data.get(found_key) - - -def _extract_name_from_internal_type(internal_type): - """Given an internal type XML description, extract correct XML name with namespace. - - :param dict internal_type: An model type - :rtype: tuple - :returns: A tuple XML name + namespace dict - """ - internal_type_xml_map = getattr(internal_type, "_xml_map", {}) - xml_name = internal_type_xml_map.get("name", internal_type.__name__) - xml_ns = internal_type_xml_map.get("ns", None) - if xml_ns: - xml_name = "{{{}}}{}".format(xml_ns, xml_name) - return xml_name - - -def xml_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument,too-many-return-statements - if isinstance(data, dict): - return None - - # Test if this model is XML ready first - if not isinstance(data, ET.Element): - return None - - xml_desc = attr_desc.get("xml", {}) - xml_name = xml_desc.get("name", attr_desc["key"]) - - # Look for a children - is_iter_type = attr_desc["type"].startswith("[") - is_wrapped = xml_desc.get("wrapped", False) - internal_type = attr_desc.get("internalType", None) - internal_type_xml_map = getattr(internal_type, "_xml_map", {}) - - # Integrate namespace if necessary - xml_ns = xml_desc.get("ns", internal_type_xml_map.get("ns", None)) - if xml_ns: - xml_name = "{{{}}}{}".format(xml_ns, xml_name) - - # If it's an attribute, that's simple - if xml_desc.get("attr", False): - return data.get(xml_name) - - # If it's x-ms-text, that's simple too - if xml_desc.get("text", False): - return data.text - - # Scenario where I take the local name: - # - Wrapped node - # - Internal type is an enum (considered basic types) - # - Internal type has no XML/Name node - if is_wrapped or (internal_type and (issubclass(internal_type, Enum) or "name" not in internal_type_xml_map)): - children = data.findall(xml_name) - # If internal type has a local name and it's not a list, I use that name - elif not is_iter_type and internal_type and "name" in internal_type_xml_map: - xml_name = _extract_name_from_internal_type(internal_type) - children = data.findall(xml_name) - # That's an array - else: - if internal_type: # Complex type, ignore itemsName and use the complex type name - items_name = _extract_name_from_internal_type(internal_type) - else: - items_name = xml_desc.get("itemsName", xml_name) - children = data.findall(items_name) - - if len(children) == 0: - if is_iter_type: - if is_wrapped: - return None # is_wrapped no node, we want None - return [] # not wrapped, assume empty list - return None # Assume it's not there, maybe an optional node. - - # If is_iter_type and not wrapped, return all found children - if is_iter_type: - if not is_wrapped: - return children - # Iter and wrapped, should have found one node only (the wrap one) - if len(children) != 1: - raise DeserializationError( - "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( - xml_name - ) - ) - return list(children[0]) # Might be empty list and that's ok. - - # Here it's not a itertype, we should have found one element only or empty - if len(children) > 1: - raise DeserializationError("Find several XML '{}' where it was not expected".format(xml_name)) - return children[0] - - -class Deserializer: - """Response object model deserializer. - - :param dict classes: Class type dictionary for deserializing complex types. - :ivar list key_extractors: Ordered list of extractors to be used by this deserializer. - """ - - basic_types = {str: "str", int: "int", bool: "bool", float: "float"} - - valid_date = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") - - def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: - self.deserialize_type = { - "iso-8601": Deserializer.deserialize_iso, - "rfc-1123": Deserializer.deserialize_rfc, - "unix-time": Deserializer.deserialize_unix, - "duration": Deserializer.deserialize_duration, - "date": Deserializer.deserialize_date, - "time": Deserializer.deserialize_time, - "decimal": Deserializer.deserialize_decimal, - "long": Deserializer.deserialize_long, - "bytearray": Deserializer.deserialize_bytearray, - "base64": Deserializer.deserialize_base64, - "object": self.deserialize_object, - "[]": self.deserialize_iter, - "{}": self.deserialize_dict, - } - self.deserialize_expected_types = { - "duration": (isodate.Duration, datetime.timedelta), - "iso-8601": (datetime.datetime), - } - self.dependencies: dict[str, type] = dict(classes) if classes else {} - self.key_extractors = [rest_key_extractor, xml_key_extractor] - # Additional properties only works if the "rest_key_extractor" is used to - # extract the keys. Making it to work whatever the key extractor is too much - # complicated, with no real scenario for now. - # So adding a flag to disable additional properties detection. This flag should be - # used if your expect the deserialization to NOT come from a JSON REST syntax. - # Otherwise, result are unexpected - self.additional_properties_detection = True - - def __call__(self, target_obj, response_data, content_type=None): - """Call the deserializer to process a REST response. - - :param str target_obj: Target data type to deserialize to. - :param requests.Response response_data: REST response object. - :param str content_type: Swagger "produces" if available. - :raises DeserializationError: if deserialization fails. - :return: Deserialized object. - :rtype: object - """ - data = self._unpack_content(response_data, content_type) - return self._deserialize(target_obj, data) - - def _deserialize(self, target_obj, data): # pylint: disable=inconsistent-return-statements - """Call the deserializer on a model. - - Data needs to be already deserialized as JSON or XML ElementTree - - :param str target_obj: Target data type to deserialize to. - :param object data: Object to deserialize. - :raises DeserializationError: if deserialization fails. - :return: Deserialized object. - :rtype: object - """ - # This is already a model, go recursive just in case - if hasattr(data, "_attribute_map"): - constants = [name for name, config in getattr(data, "_validation", {}).items() if config.get("constant")] - try: - for attr, mapconfig in data._attribute_map.items(): # pylint: disable=protected-access - if attr in constants: - continue - value = getattr(data, attr) - if value is None: - continue - local_type = mapconfig["type"] - internal_data_type = local_type.strip("[]{}") - if internal_data_type not in self.dependencies or isinstance(internal_data_type, Enum): - continue - setattr(data, attr, self._deserialize(local_type, value)) - return data - except AttributeError: - return - - response, class_name = self._classify_target(target_obj, data) - - if isinstance(response, str): - return self.deserialize_data(data, response) - if isinstance(response, type) and issubclass(response, Enum): - return self.deserialize_enum(data, response) - - if data is None or data is CoreNull: - return data - try: - attributes = response._attribute_map # type: ignore # pylint: disable=protected-access - d_attrs = {} - for attr, attr_desc in attributes.items(): - # Check empty string. If it's not empty, someone has a real "additionalProperties"... - if attr == "additional_properties" and attr_desc["key"] == "": - continue - raw_value = None - # Enhance attr_desc with some dynamic data - attr_desc = attr_desc.copy() # Do a copy, do not change the real one - internal_data_type = attr_desc["type"].strip("[]{}") - if internal_data_type in self.dependencies: - attr_desc["internalType"] = self.dependencies[internal_data_type] - - for key_extractor in self.key_extractors: - found_value = key_extractor(attr, attr_desc, data) - if found_value is not None: - if raw_value is not None and raw_value != found_value: - msg = ( - "Ignoring extracted value '%s' from %s for key '%s'" - " (duplicate extraction, follow extractors order)" - ) - _LOGGER.warning(msg, found_value, key_extractor, attr) - continue - raw_value = found_value - - value = self.deserialize_data(raw_value, attr_desc["type"]) - d_attrs[attr] = value - except (AttributeError, TypeError, KeyError) as err: - msg = "Unable to deserialize to object: " + class_name # type: ignore - raise DeserializationError(msg) from err - additional_properties = self._build_additional_properties(attributes, data) - return self._instantiate_model(response, d_attrs, additional_properties) - - def _build_additional_properties(self, attribute_map, data): - if not self.additional_properties_detection: - return None - if "additional_properties" in attribute_map and attribute_map.get("additional_properties", {}).get("key") != "": - # Check empty string. If it's not empty, someone has a real "additionalProperties" - return None - if isinstance(data, ET.Element): - data = {el.tag: el.text for el in data} - - known_keys = { - _decode_attribute_map_key(_FLATTEN.split(desc["key"])[0]) - for desc in attribute_map.values() - if desc["key"] != "" - } - present_keys = set(data.keys()) - missing_keys = present_keys - known_keys - return {key: data[key] for key in missing_keys} - - def _classify_target(self, target, data): - """Check to see whether the deserialization target object can - be classified into a subclass. - Once classification has been determined, initialize object. - - :param str target: The target object type to deserialize to. - :param str/dict data: The response data to deserialize. - :return: The classified target object and its class name. - :rtype: tuple - """ - if target is None: - return None, None - - if isinstance(target, str): - try: - target = self.dependencies[target] - except KeyError: - return target, target - - try: - target = target._classify(data, self.dependencies) # type: ignore # pylint: disable=protected-access - except AttributeError: - pass # Target is not a Model, no classify - return target, target.__class__.__name__ # type: ignore - - def failsafe_deserialize(self, target_obj, data, content_type=None): - """Ignores any errors encountered in deserialization, - and falls back to not deserializing the object. Recommended - for use in error deserialization, as we want to return the - HttpResponseError to users, and not have them deal with - a deserialization error. - - :param str target_obj: The target object type to deserialize to. - :param str/dict data: The response data to deserialize. - :param str content_type: Swagger "produces" if available. - :return: Deserialized object. - :rtype: object - """ - try: - return self(target_obj, data, content_type=content_type) - except: # pylint: disable=bare-except - _LOGGER.debug( - "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True - ) - return None - - @staticmethod - def _unpack_content(raw_data, content_type=None): - """Extract the correct structure for deserialization. - - If raw_data is a PipelineResponse, try to extract the result of RawDeserializer. - if we can't, raise. Your Pipeline should have a RawDeserializer. - - If not a pipeline response and raw_data is bytes or string, use content-type - to decode it. If no content-type, try JSON. - - If raw_data is something else, bypass all logic and return it directly. - - :param obj raw_data: Data to be processed. - :param str content_type: How to parse if raw_data is a string/bytes. - :raises JSONDecodeError: If JSON is requested and parsing is impossible. - :raises UnicodeDecodeError: If bytes is not UTF8 - :rtype: object - :return: Unpacked content. - """ - # Assume this is enough to detect a Pipeline Response without importing it - context = getattr(raw_data, "context", {}) - if context: - if RawDeserializer.CONTEXT_NAME in context: - return context[RawDeserializer.CONTEXT_NAME] - raise ValueError("This pipeline didn't have the RawDeserializer policy; can't deserialize") - - # Assume this is enough to recognize universal_http.ClientResponse without importing it - if hasattr(raw_data, "body"): - return RawDeserializer.deserialize_from_http_generics(raw_data.text(), raw_data.headers) - - # Assume this enough to recognize requests.Response without importing it. - if hasattr(raw_data, "_content_consumed"): - return RawDeserializer.deserialize_from_http_generics(raw_data.text, raw_data.headers) - - if isinstance(raw_data, (str, bytes)) or hasattr(raw_data, "read"): - return RawDeserializer.deserialize_from_text(raw_data, content_type) # type: ignore - return raw_data - - def _instantiate_model(self, response, attrs, additional_properties=None): - """Instantiate a response model passing in deserialized args. - - :param Response response: The response model class. - :param dict attrs: The deserialized response attributes. - :param dict additional_properties: Additional properties to be set. - :rtype: Response - :return: The instantiated response model. - """ - if callable(response): - subtype = getattr(response, "_subtype_map", {}) - try: - readonly = [ - k - for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore - if v.get("readonly") - ] - const = [ - k - for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore - if v.get("constant") - ] - kwargs = {k: v for k, v in attrs.items() if k not in subtype and k not in readonly + const} - response_obj = response(**kwargs) - for attr in readonly: - setattr(response_obj, attr, attrs.get(attr)) - if additional_properties: - response_obj.additional_properties = additional_properties # type: ignore - return response_obj - except TypeError as err: - msg = "Unable to deserialize {} into model {}. ".format(kwargs, response) # type: ignore - raise DeserializationError(msg + str(err)) from err - else: - try: - for attr, value in attrs.items(): - setattr(response, attr, value) - return response - except Exception as exp: - msg = "Unable to populate response model. " - msg += "Type: {}, Error: {}".format(type(response), exp) - raise DeserializationError(msg) from exp - - def deserialize_data(self, data, data_type): # pylint: disable=too-many-return-statements - """Process data for deserialization according to data type. - - :param str data: The response string to be deserialized. - :param str data_type: The type to deserialize to. - :raises DeserializationError: if deserialization fails. - :return: Deserialized object. - :rtype: object - """ - if data is None: - return data - - try: - if not data_type: - return data - if data_type in self.basic_types.values(): - return self.deserialize_basic(data, data_type) - if data_type in self.deserialize_type: - if isinstance(data, self.deserialize_expected_types.get(data_type, tuple())): - return data - - is_a_text_parsing_type = lambda x: x not in [ # pylint: disable=unnecessary-lambda-assignment - "object", - "[]", - r"{}", - ] - if isinstance(data, ET.Element) and is_a_text_parsing_type(data_type) and not data.text: - return None - data_val = self.deserialize_type[data_type](data) - return data_val - - iter_type = data_type[0] + data_type[-1] - if iter_type in self.deserialize_type: - return self.deserialize_type[iter_type](data, data_type[1:-1]) - - obj_type = self.dependencies[data_type] - if issubclass(obj_type, Enum): - if isinstance(data, ET.Element): - data = data.text - return self.deserialize_enum(data, obj_type) - - except (ValueError, TypeError, AttributeError) as err: - msg = "Unable to deserialize response data." - msg += " Data: {}, {}".format(data, data_type) - raise DeserializationError(msg) from err - return self._deserialize(obj_type, data) - - def deserialize_iter(self, attr, iter_type): - """Deserialize an iterable. - - :param list attr: Iterable to be deserialized. - :param str iter_type: The type of object in the iterable. - :return: Deserialized iterable. - :rtype: list - """ - if attr is None: - return None - if isinstance(attr, ET.Element): # If I receive an element here, get the children - attr = list(attr) - if not isinstance(attr, (list, set)): - raise DeserializationError("Cannot deserialize as [{}] an object of type {}".format(iter_type, type(attr))) - return [self.deserialize_data(a, iter_type) for a in attr] - - def deserialize_dict(self, attr, dict_type): - """Deserialize a dictionary. - - :param dict/list attr: Dictionary to be deserialized. Also accepts - a list of key, value pairs. - :param str dict_type: The object type of the items in the dictionary. - :return: Deserialized dictionary. - :rtype: dict - """ - if isinstance(attr, list): - return {x["key"]: self.deserialize_data(x["value"], dict_type) for x in attr} - - if isinstance(attr, ET.Element): - # Transform value into {"Key": "value"} - attr = {el.tag: el.text for el in attr} - return {k: self.deserialize_data(v, dict_type) for k, v in attr.items()} - - def deserialize_object(self, attr, **kwargs): # pylint: disable=too-many-return-statements - """Deserialize a generic object. - This will be handled as a dictionary. - - :param dict attr: Dictionary to be deserialized. - :return: Deserialized object. - :rtype: dict - :raises TypeError: if non-builtin datatype encountered. - """ - if attr is None: - return None - if isinstance(attr, ET.Element): - # Do no recurse on XML, just return the tree as-is - return attr - if isinstance(attr, str): - return self.deserialize_basic(attr, "str") - obj_type = type(attr) - if obj_type in self.basic_types: - return self.deserialize_basic(attr, self.basic_types[obj_type]) - if obj_type is _long_type: - return self.deserialize_long(attr) - - if obj_type == dict: - deserialized = {} - for key, value in attr.items(): - try: - deserialized[key] = self.deserialize_object(value, **kwargs) - except ValueError: - deserialized[key] = None - return deserialized - - if obj_type == list: - deserialized = [] - for obj in attr: - try: - deserialized.append(self.deserialize_object(obj, **kwargs)) - except ValueError: - pass - return deserialized - - error = "Cannot deserialize generic object with type: " - raise TypeError(error + str(obj_type)) - - def deserialize_basic(self, attr, data_type): # pylint: disable=too-many-return-statements - """Deserialize basic builtin data type from string. - Will attempt to convert to str, int, float and bool. - This function will also accept '1', '0', 'true' and 'false' as - valid bool values. - - :param str attr: response string to be deserialized. - :param str data_type: deserialization data type. - :return: Deserialized basic type. - :rtype: str, int, float or bool - :raises TypeError: if string format is not valid or data_type is not one of str, int, float, bool. - """ - # If we're here, data is supposed to be a basic type. - # If it's still an XML node, take the text - if isinstance(attr, ET.Element): - attr = attr.text - if not attr: - if data_type == "str": - # None or '', node is empty string. - return "" - # None or '', node with a strong type is None. - # Don't try to model "empty bool" or "empty int" - return None - - if data_type == "bool": - if attr in [True, False, 1, 0]: - return bool(attr) - if isinstance(attr, str): - if attr.lower() in ["true", "1"]: - return True - if attr.lower() in ["false", "0"]: - return False - raise TypeError("Invalid boolean value: {}".format(attr)) - - if data_type == "str": - return self.deserialize_unicode(attr) - if data_type == "int": - return int(attr) - if data_type == "float": - return float(attr) - raise TypeError("Unknown basic data type: {}".format(data_type)) - - @staticmethod - def deserialize_unicode(data): - """Preserve unicode objects in Python 2, otherwise return data - as a string. - - :param str data: response string to be deserialized. - :return: Deserialized string. - :rtype: str or unicode - """ - # We might be here because we have an enum modeled as string, - # and we try to deserialize a partial dict with enum inside - if isinstance(data, Enum): - return data - - # Consider this is real string - try: - if isinstance(data, unicode): # type: ignore - return data - except NameError: - return str(data) - return str(data) - - @staticmethod - def deserialize_enum(data, enum_obj): - """Deserialize string into enum object. - - If the string is not a valid enum value it will be returned as-is - and a warning will be logged. - - :param str data: Response string to be deserialized. If this value is - None or invalid it will be returned as-is. - :param Enum enum_obj: Enum object to deserialize to. - :return: Deserialized enum object. - :rtype: Enum - """ - if isinstance(data, enum_obj) or data is None: - return data - if isinstance(data, Enum): - data = data.value - if isinstance(data, int): - # Workaround. We might consider remove it in the future. - try: - return list(enum_obj.__members__.values())[data] - except IndexError as exc: - error = "{!r} is not a valid index for enum {!r}" - raise DeserializationError(error.format(data, enum_obj)) from exc - try: - return enum_obj(str(data)) - except ValueError: - for enum_value in enum_obj: - if enum_value.value.lower() == str(data).lower(): - return enum_value - # We don't fail anymore for unknown value, we deserialize as a string - _LOGGER.warning("Deserializer is not able to find %s as valid enum in %s", data, enum_obj) - return Deserializer.deserialize_unicode(data) - - @staticmethod - def deserialize_bytearray(attr): - """Deserialize string into bytearray. - - :param str attr: response string to be deserialized. - :return: Deserialized bytearray - :rtype: bytearray - :raises TypeError: if string format invalid. - """ - if isinstance(attr, ET.Element): - attr = attr.text - return bytearray(b64decode(attr)) # type: ignore - - @staticmethod - def deserialize_base64(attr): - """Deserialize base64 encoded string into string. - - :param str attr: response string to be deserialized. - :return: Deserialized base64 string - :rtype: bytearray - :raises TypeError: if string format invalid. - """ - if isinstance(attr, ET.Element): - attr = attr.text - padding = "=" * (3 - (len(attr) + 3) % 4) # type: ignore - attr = attr + padding # type: ignore - encoded = attr.replace("-", "+").replace("_", "/") - return b64decode(encoded) - - @staticmethod - def deserialize_decimal(attr): - """Deserialize string into Decimal object. - - :param str attr: response string to be deserialized. - :return: Deserialized decimal - :raises DeserializationError: if string format invalid. - :rtype: decimal - """ - if isinstance(attr, ET.Element): - attr = attr.text - try: - return decimal.Decimal(str(attr)) # type: ignore - except decimal.DecimalException as err: - msg = "Invalid decimal {}".format(attr) - raise DeserializationError(msg) from err - - @staticmethod - def deserialize_long(attr): - """Deserialize string into long (Py2) or int (Py3). - - :param str attr: response string to be deserialized. - :return: Deserialized int - :rtype: long or int - :raises ValueError: if string format invalid. - """ - if isinstance(attr, ET.Element): - attr = attr.text - return _long_type(attr) # type: ignore - - @staticmethod - def deserialize_duration(attr): - """Deserialize ISO-8601 formatted string into TimeDelta object. - - :param str attr: response string to be deserialized. - :return: Deserialized duration - :rtype: TimeDelta - :raises DeserializationError: if string format invalid. - """ - if isinstance(attr, ET.Element): - attr = attr.text - try: - duration = isodate.parse_duration(attr) - except (ValueError, OverflowError, AttributeError) as err: - msg = "Cannot deserialize duration object." - raise DeserializationError(msg) from err - return duration - - @staticmethod - def deserialize_date(attr): - """Deserialize ISO-8601 formatted string into Date object. - - :param str attr: response string to be deserialized. - :return: Deserialized date - :rtype: Date - :raises DeserializationError: if string format invalid. - """ - if isinstance(attr, ET.Element): - attr = attr.text - if re.search(r"[^\W\d_]", attr, re.I + re.U): # type: ignore - raise DeserializationError("Date must have only digits and -. Received: %s" % attr) - # This must NOT use defaultmonth/defaultday. Using None ensure this raises an exception. - return isodate.parse_date(attr, defaultmonth=0, defaultday=0) - - @staticmethod - def deserialize_time(attr): - """Deserialize ISO-8601 formatted string into time object. - - :param str attr: response string to be deserialized. - :return: Deserialized time - :rtype: datetime.time - :raises DeserializationError: if string format invalid. - """ - if isinstance(attr, ET.Element): - attr = attr.text - if re.search(r"[^\W\d_]", attr, re.I + re.U): # type: ignore - raise DeserializationError("Date must have only digits and -. Received: %s" % attr) - return isodate.parse_time(attr) - - @staticmethod - def deserialize_rfc(attr): - """Deserialize RFC-1123 formatted string into Datetime object. - - :param str attr: response string to be deserialized. - :return: Deserialized RFC datetime - :rtype: Datetime - :raises DeserializationError: if string format invalid. - """ - if isinstance(attr, ET.Element): - attr = attr.text - try: - parsed_date = email.utils.parsedate_tz(attr) # type: ignore - date_obj = datetime.datetime( - *parsed_date[:6], tzinfo=datetime.timezone(datetime.timedelta(minutes=(parsed_date[9] or 0) / 60)) - ) - if not date_obj.tzinfo: - date_obj = date_obj.astimezone(tz=TZ_UTC) - except ValueError as err: - msg = "Cannot deserialize to rfc datetime object." - raise DeserializationError(msg) from err - return date_obj - - @staticmethod - def deserialize_iso(attr): - """Deserialize ISO-8601 formatted string into Datetime object. - - :param str attr: response string to be deserialized. - :return: Deserialized ISO datetime - :rtype: Datetime - :raises DeserializationError: if string format invalid. - """ - if isinstance(attr, ET.Element): - attr = attr.text - try: - attr = attr.upper() # type: ignore - match = Deserializer.valid_date.match(attr) - if not match: - raise ValueError("Invalid datetime string: " + attr) - - check_decimal = attr.split(".") - if len(check_decimal) > 1: - decimal_str = "" - for digit in check_decimal[1]: - if digit.isdigit(): - decimal_str += digit - else: - break - if len(decimal_str) > 6: - attr = attr.replace(decimal_str, decimal_str[0:6]) - - date_obj = isodate.parse_datetime(attr) - test_utc = date_obj.utctimetuple() - if test_utc.tm_year > 9999 or test_utc.tm_year < 1: - raise OverflowError("Hit max or min date") - except (ValueError, OverflowError, AttributeError) as err: - msg = "Cannot deserialize datetime object." - raise DeserializationError(msg) from err - return date_obj - - @staticmethod - def deserialize_unix(attr): - """Serialize Datetime object into IntTime format. - This is represented as seconds. - - :param int attr: Object to be serialized. - :return: Deserialized datetime - :rtype: Datetime - :raises DeserializationError: if format invalid - """ - if isinstance(attr, ET.Element): - attr = int(attr.text) # type: ignore - try: - attr = int(attr) - date_obj = datetime.datetime.fromtimestamp(attr, TZ_UTC) - except ValueError as err: - msg = "Cannot deserialize to unix datetime object." - raise DeserializationError(msg) from err - return date_obj diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/aio/__init__.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/aio/__init__.py deleted file mode 100644 index 42a0aa5c247..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/aio/__init__.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.8, generator: @autorest/python@6.49.1) -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -# pylint: disable=wrong-import-position - -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from ._patch import * # pylint: disable=unused-wildcard-import - -from ._client import ContainerRegistryManagementClient # type: ignore - -try: - from ._patch import __all__ as _patch_all - from ._patch import * -except ImportError: - _patch_all = [] -from ._patch import patch_sdk as _patch_sdk - -__all__ = [ - "ContainerRegistryManagementClient", -] -__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore - -_patch_sdk() diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/aio/_client.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/aio/_client.py deleted file mode 100644 index 2ac593f503f..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/aio/_client.py +++ /dev/null @@ -1,190 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.8, generator: @autorest/python@6.49.1) -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from copy import deepcopy -from typing import Any, Awaitable, TYPE_CHECKING -from typing_extensions import Self - -from azure.core import AsyncPipelineClient -from azure.core.pipeline import policies -from azure.core.rest import AsyncHttpResponse, HttpRequest - -from .. import models as _models -from .._utils.serialization import Deserializer, Serializer -from ._configuration import ContainerRegistryManagementClientConfiguration -from .operations import ( - ArchiveVersionsOperations, - ArchivesOperations, - CacheRulesOperations, - ConnectedRegistriesOperations, - CredentialSetsOperations, - ExportPipelinesOperations, - ImportPipelinesOperations, - Operations, - PipelineRunsOperations, - PrivateEndpointConnectionsOperations, - RegistriesOperations, - ReplicationsOperations, - ScopeMapsOperations, - TokensOperations, - WebhooksOperations, -) - -if TYPE_CHECKING: - from azure.core.credentials_async import AsyncTokenCredential - - -class ContainerRegistryManagementClient: # pylint: disable=too-many-instance-attributes - """The Microsoft Azure Container Registry management API provides create, read, update, and delete - functionality for Azure Container Registry resources including registries, replications, - webhooks, tasks, runs, and other registry components. - - :ivar operations: Operations operations - :vartype operations: container_registry_management_client.aio.operations.Operations - :ivar registries: RegistriesOperations operations - :vartype registries: container_registry_management_client.aio.operations.RegistriesOperations - :ivar cache_rules: CacheRulesOperations operations - :vartype cache_rules: container_registry_management_client.aio.operations.CacheRulesOperations - :ivar connected_registries: ConnectedRegistriesOperations operations - :vartype connected_registries: - container_registry_management_client.aio.operations.ConnectedRegistriesOperations - :ivar credential_sets: CredentialSetsOperations operations - :vartype credential_sets: - container_registry_management_client.aio.operations.CredentialSetsOperations - :ivar export_pipelines: ExportPipelinesOperations operations - :vartype export_pipelines: - container_registry_management_client.aio.operations.ExportPipelinesOperations - :ivar import_pipelines: ImportPipelinesOperations operations - :vartype import_pipelines: - container_registry_management_client.aio.operations.ImportPipelinesOperations - :ivar archives: ArchivesOperations operations - :vartype archives: container_registry_management_client.aio.operations.ArchivesOperations - :ivar archive_versions: ArchiveVersionsOperations operations - :vartype archive_versions: - container_registry_management_client.aio.operations.ArchiveVersionsOperations - :ivar pipeline_runs: PipelineRunsOperations operations - :vartype pipeline_runs: - container_registry_management_client.aio.operations.PipelineRunsOperations - :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations - :vartype private_endpoint_connections: - container_registry_management_client.aio.operations.PrivateEndpointConnectionsOperations - :ivar replications: ReplicationsOperations operations - :vartype replications: - container_registry_management_client.aio.operations.ReplicationsOperations - :ivar scope_maps: ScopeMapsOperations operations - :vartype scope_maps: container_registry_management_client.aio.operations.ScopeMapsOperations - :ivar tokens: TokensOperations operations - :vartype tokens: container_registry_management_client.aio.operations.TokensOperations - :ivar webhooks: WebhooksOperations operations - :vartype webhooks: container_registry_management_client.aio.operations.WebhooksOperations - :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. - :type subscription_id: str - :param credential: Credential needed for the client to connect to Azure. Required. - :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :keyword endpoint: Service URL. Default value is "https://management.azure.com". - :paramtype endpoint: str - :keyword api_version: Api Version. Default value is "2026-01-01-preview". Note that overriding - this default value may result in unsupported behavior. - :paramtype api_version: str - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no - Retry-After header is present. - """ - - def __init__( - self, - subscription_id: str, - credential: "AsyncTokenCredential", - *, - endpoint: str = "https://management.azure.com", - **kwargs: Any - ) -> None: - self._config = ContainerRegistryManagementClientConfiguration( - subscription_id=subscription_id, credential=credential, **kwargs - ) - - _policies = kwargs.pop("policies", None) - if _policies is None: - _policies = [ - policies.RequestIdPolicy(**kwargs), - self._config.headers_policy, - self._config.user_agent_policy, - self._config.proxy_policy, - policies.ContentDecodePolicy(**kwargs), - self._config.redirect_policy, - self._config.retry_policy, - self._config.authentication_policy, - self._config.custom_hook_policy, - self._config.logging_policy, - policies.DistributedTracingPolicy(**kwargs), - policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, - self._config.http_logging_policy, - ] - self._client: AsyncPipelineClient = AsyncPipelineClient(base_url=endpoint, policies=_policies, **kwargs) - - client_models = {k: v for k, v in _models._models.__dict__.items() if isinstance(v, type)} - client_models |= {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - self._serialize.client_side_validation = False - self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) - self.registries = RegistriesOperations(self._client, self._config, self._serialize, self._deserialize) - self.cache_rules = CacheRulesOperations(self._client, self._config, self._serialize, self._deserialize) - self.connected_registries = ConnectedRegistriesOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.credential_sets = CredentialSetsOperations(self._client, self._config, self._serialize, self._deserialize) - self.export_pipelines = ExportPipelinesOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.import_pipelines = ImportPipelinesOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.archives = ArchivesOperations(self._client, self._config, self._serialize, self._deserialize) - self.archive_versions = ArchiveVersionsOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.pipeline_runs = PipelineRunsOperations(self._client, self._config, self._serialize, self._deserialize) - self.private_endpoint_connections = PrivateEndpointConnectionsOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.replications = ReplicationsOperations(self._client, self._config, self._serialize, self._deserialize) - self.scope_maps = ScopeMapsOperations(self._client, self._config, self._serialize, self._deserialize) - self.tokens = TokensOperations(self._client, self._config, self._serialize, self._deserialize) - self.webhooks = WebhooksOperations(self._client, self._config, self._serialize, self._deserialize) - - def send_request( - self, request: HttpRequest, *, stream: bool = False, **kwargs: Any - ) -> Awaitable[AsyncHttpResponse]: - """Runs the network request through the client's chained policies. - - >>> from azure.core.rest import HttpRequest - >>> request = HttpRequest("GET", "https://www.example.org/") - - >>> response = await client.send_request(request) - - - For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request - - :param request: The network request you want to make. Required. - :type request: ~azure.core.rest.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to False. - :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.rest.AsyncHttpResponse - """ - - request_copy = deepcopy(request) - request_copy.url = self._client.format_url(request_copy.url) - return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore - - async def close(self) -> None: - await self._client.close() - - async def __aenter__(self) -> Self: - await self._client.__aenter__() - return self - - async def __aexit__(self, *exc_details: Any) -> None: - await self._client.__aexit__(*exc_details) diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/aio/_configuration.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/aio/_configuration.py deleted file mode 100644 index 29164b10190..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/aio/_configuration.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.8, generator: @autorest/python@6.49.1) -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import Any, TYPE_CHECKING - -from azure.core.pipeline import policies - -if TYPE_CHECKING: - from azure.core.credentials_async import AsyncTokenCredential - -VERSION = "unknown" - - -class ContainerRegistryManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long - """Configuration for ContainerRegistryManagementClient. - - Note that all parameters used to create this instance are saved as instance - attributes. - - :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. - :type subscription_id: str - :param credential: Credential needed for the client to connect to Azure. Required. - :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :keyword api_version: Api Version. Default value is "2026-01-01-preview". Note that overriding - this default value may result in unsupported behavior. - :paramtype api_version: str - """ - - def __init__(self, subscription_id: str, credential: "AsyncTokenCredential", **kwargs: Any) -> None: - api_version: str = kwargs.pop("api_version", "2026-01-01-preview") - - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if credential is None: - raise ValueError("Parameter 'credential' must not be None.") - - self.subscription_id = subscription_id - self.credential = credential - self.api_version = api_version - self.credential_scopes = kwargs.pop("credential_scopes", ["user_impersonation"]) - kwargs.setdefault("sdk_moniker", "containerregistrymanagementclient/{}".format(VERSION)) - self.polling_interval = kwargs.get("polling_interval", 30) - self._configure(**kwargs) - - def _configure(self, **kwargs: Any) -> None: - self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) - self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs) - self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) - self.authentication_policy = kwargs.get("authentication_policy") - if self.credential and not self.authentication_policy: - self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy( - self.credential, *self.credential_scopes, **kwargs - ) diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/aio/_patch.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/aio/_patch.py deleted file mode 100644 index 87676c65a8f..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/aio/_patch.py +++ /dev/null @@ -1,21 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------- -"""Customize generated code here. - -Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize -""" - - -__all__: list[str] = [] # Add all objects you want publicly available to users at this package level - - -def patch_sdk(): - """Do not remove from this file. - - `patch_sdk` is a last resort escape hatch that allows you to do customizations - you can't accomplish using the techniques described in - https://aka.ms/azsdk/python/dpcodegen/python/customize - """ diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/aio/operations/__init__.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/aio/operations/__init__.py deleted file mode 100644 index de865704f5c..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/aio/operations/__init__.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.8, generator: @autorest/python@6.49.1) -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -# pylint: disable=wrong-import-position - -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from ._patch import * # pylint: disable=unused-wildcard-import - -from ._operations import Operations # type: ignore -from ._operations import RegistriesOperations # type: ignore -from ._operations import CacheRulesOperations # type: ignore -from ._operations import ConnectedRegistriesOperations # type: ignore -from ._operations import CredentialSetsOperations # type: ignore -from ._operations import ExportPipelinesOperations # type: ignore -from ._operations import ImportPipelinesOperations # type: ignore -from ._operations import ArchivesOperations # type: ignore -from ._operations import ArchiveVersionsOperations # type: ignore -from ._operations import PipelineRunsOperations # type: ignore -from ._operations import PrivateEndpointConnectionsOperations # type: ignore -from ._operations import ReplicationsOperations # type: ignore -from ._operations import ScopeMapsOperations # type: ignore -from ._operations import TokensOperations # type: ignore -from ._operations import WebhooksOperations # type: ignore - -from ._patch import __all__ as _patch_all -from ._patch import * -from ._patch import patch_sdk as _patch_sdk - -__all__ = [ - "Operations", - "RegistriesOperations", - "CacheRulesOperations", - "ConnectedRegistriesOperations", - "CredentialSetsOperations", - "ExportPipelinesOperations", - "ImportPipelinesOperations", - "ArchivesOperations", - "ArchiveVersionsOperations", - "PipelineRunsOperations", - "PrivateEndpointConnectionsOperations", - "ReplicationsOperations", - "ScopeMapsOperations", - "TokensOperations", - "WebhooksOperations", -] -__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore -_patch_sdk() diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/aio/operations/_operations.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/aio/operations/_operations.py deleted file mode 100644 index 35e6619ba8d..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/aio/operations/_operations.py +++ /dev/null @@ -1,10536 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.8, generator: @autorest/python@6.49.1) -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.polling.async_base_polling import AsyncLROBasePolling -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._operations import ( - build_archive_versions_create_request, - build_archive_versions_delete_request, - build_archive_versions_get_request, - build_archive_versions_list_request, - build_archives_create_request, - build_archives_delete_request, - build_archives_get_request, - build_archives_list_request, - build_archives_update_request, - build_cache_rules_create_request, - build_cache_rules_delete_request, - build_cache_rules_get_request, - build_cache_rules_list_request, - build_cache_rules_update_request, - build_connected_registries_create_request, - build_connected_registries_deactivate_request, - build_connected_registries_delete_request, - build_connected_registries_get_request, - build_connected_registries_list_request, - build_connected_registries_resync_request, - build_connected_registries_update_request, - build_credential_sets_create_request, - build_credential_sets_delete_request, - build_credential_sets_get_request, - build_credential_sets_list_request, - build_credential_sets_update_request, - build_export_pipelines_create_request, - build_export_pipelines_delete_request, - build_export_pipelines_get_request, - build_export_pipelines_list_request, - build_import_pipelines_create_request, - build_import_pipelines_delete_request, - build_import_pipelines_get_request, - build_import_pipelines_list_request, - build_operations_list_request, - build_pipeline_runs_create_request, - build_pipeline_runs_delete_request, - build_pipeline_runs_get_request, - build_pipeline_runs_list_request, - build_private_endpoint_connections_create_or_update_request, - build_private_endpoint_connections_delete_request, - build_private_endpoint_connections_get_request, - build_private_endpoint_connections_list_request, - build_registries_check_name_availability_request, - build_registries_create_request, - build_registries_delete_request, - build_registries_generate_credentials_request, - build_registries_get_private_link_resource_request, - build_registries_get_request, - build_registries_import_image_request, - build_registries_list_by_resource_group_request, - build_registries_list_credentials_request, - build_registries_list_private_link_resources_request, - build_registries_list_request, - build_registries_list_usages_request, - build_registries_regenerate_credential_request, - build_registries_update_request, - build_replications_create_request, - build_replications_delete_request, - build_replications_get_request, - build_replications_list_request, - build_replications_update_request, - build_scope_maps_create_request, - build_scope_maps_delete_request, - build_scope_maps_get_request, - build_scope_maps_list_request, - build_scope_maps_update_request, - build_tokens_create_request, - build_tokens_delete_request, - build_tokens_get_request, - build_tokens_list_request, - build_tokens_update_request, - build_webhooks_create_request, - build_webhooks_delete_request, - build_webhooks_get_callback_config_request, - build_webhooks_get_request, - build_webhooks_list_events_request, - build_webhooks_list_request, - build_webhooks_ping_request, - build_webhooks_update_request, -) -from .._configuration import ContainerRegistryManagementClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class Operations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~container_registry_management_client.aio.ContainerRegistryManagementClient`'s - :attr:`operations` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerRegistryManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list(self, **kwargs: Any) -> AsyncItemPaged["_models.OperationDefinition"]: - """List the operations for the provider. - - :return: An iterator like instance of OperationDefinition - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~container_registry_management_client.models.OperationDefinition] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models._models.OperationListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_operations_list_request( - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize( - _models._models.OperationListResult, pipeline_response # pylint: disable=protected-access - ) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - -class RegistriesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~container_registry_management_client.aio.ContainerRegistryManagementClient`'s - :attr:`registries` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerRegistryManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @overload - async def check_name_availability( - self, - registry_name_check_request: _models.RegistryNameCheckRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.RegistryNameStatus: - """Checks whether the container registry name is available for use. The name must contain only - alphanumeric characters, be globally unique, and between 5 and 50 characters in length. - - :param registry_name_check_request: The request body. Required. - :type registry_name_check_request: - ~container_registry_management_client.models.RegistryNameCheckRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: RegistryNameStatus - :rtype: ~container_registry_management_client.models.RegistryNameStatus - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def check_name_availability( - self, registry_name_check_request: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.RegistryNameStatus: - """Checks whether the container registry name is available for use. The name must contain only - alphanumeric characters, be globally unique, and between 5 and 50 characters in length. - - :param registry_name_check_request: The request body. Required. - :type registry_name_check_request: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: RegistryNameStatus - :rtype: ~container_registry_management_client.models.RegistryNameStatus - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def check_name_availability( - self, registry_name_check_request: Union[_models.RegistryNameCheckRequest, IO[bytes]], **kwargs: Any - ) -> _models.RegistryNameStatus: - """Checks whether the container registry name is available for use. The name must contain only - alphanumeric characters, be globally unique, and between 5 and 50 characters in length. - - :param registry_name_check_request: The request body. Is either a RegistryNameCheckRequest type - or a IO[bytes] type. Required. - :type registry_name_check_request: - ~container_registry_management_client.models.RegistryNameCheckRequest or IO[bytes] - :return: RegistryNameStatus - :rtype: ~container_registry_management_client.models.RegistryNameStatus - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.RegistryNameStatus] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(registry_name_check_request, (IOBase, bytes)): - _content = registry_name_check_request - else: - _json = self._serialize.body(registry_name_check_request, "RegistryNameCheckRequest") - - _request = build_registries_check_name_availability_request( - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize("RegistryNameStatus", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def list(self, **kwargs: Any) -> AsyncItemPaged["_models.Registry"]: - """Lists all the container registries under the specified subscription. - - :return: An iterator like instance of Registry - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~container_registry_management_client.models.Registry] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models._models.RegistryListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_registries_list_request( - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize( - _models._models.RegistryListResult, pipeline_response # pylint: disable=protected-access - ) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> AsyncItemPaged["_models.Registry"]: - """Lists all the container registries under the specified resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of Registry - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~container_registry_management_client.models.Registry] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models._models.RegistryListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_registries_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize( - _models._models.RegistryListResult, pipeline_response # pylint: disable=protected-access - ) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> _models.Registry: - """Gets the properties of the specified container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :return: Registry - :rtype: ~container_registry_management_client.models.Registry - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.Registry] = kwargs.pop("cls", None) - - _request = build_registries_get_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize("Registry", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_initial( - self, resource_group_name: str, registry_name: str, registry: Union[_models.Registry, IO[bytes]], **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(registry, (IOBase, bytes)): - _content = registry - else: - _json = self._serialize.body(registry, "Registry") - - _request = build_registries_create_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create( - self, - resource_group_name: str, - registry_name: str, - registry: _models.Registry, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Registry]: - """Creates a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param registry: The parameters for creating a container registry. Required. - :type registry: ~container_registry_management_client.models.Registry - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns Registry - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Registry] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create( - self, - resource_group_name: str, - registry_name: str, - registry: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Registry]: - """Creates a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param registry: The parameters for creating a container registry. Required. - :type registry: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns Registry - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Registry] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create( - self, resource_group_name: str, registry_name: str, registry: Union[_models.Registry, IO[bytes]], **kwargs: Any - ) -> AsyncLROPoller[_models.Registry]: - """Creates a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param registry: The parameters for creating a container registry. Is either a Registry type or - a IO[bytes] type. Required. - :type registry: ~container_registry_management_client.models.Registry or IO[bytes] - :return: An instance of AsyncLROPoller that returns Registry - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Registry] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Registry] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - registry=registry, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Registry", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.Registry].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.Registry]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _update_initial( - self, - resource_group_name: str, - registry_name: str, - registry_update_parameters: Union[_models.RegistryUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(registry_update_parameters, (IOBase, bytes)): - _content = registry_update_parameters - else: - _json = self._serialize.body(registry_update_parameters, "RegistryUpdateParameters") - - _request = build_registries_update_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - registry_name: str, - registry_update_parameters: _models.RegistryUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Registry]: - """Updates a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param registry_update_parameters: The parameters for updating a container registry. Required. - :type registry_update_parameters: - ~container_registry_management_client.models.RegistryUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns Registry - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Registry] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - registry_name: str, - registry_update_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Registry]: - """Updates a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param registry_update_parameters: The parameters for updating a container registry. Required. - :type registry_update_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns Registry - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Registry] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - registry_name: str, - registry_update_parameters: Union[_models.RegistryUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.Registry]: - """Updates a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param registry_update_parameters: The parameters for updating a container registry. Is either - a RegistryUpdateParameters type or a IO[bytes] type. Required. - :type registry_update_parameters: - ~container_registry_management_client.models.RegistryUpdateParameters or IO[bytes] - :return: An instance of AsyncLROPoller that returns Registry - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Registry] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Registry] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - registry_update_parameters=registry_update_parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Registry", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.Registry].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.Registry]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, registry_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_registries_delete_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> AsyncLROPoller[None]: - """Deletes a container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :return: An instance of AsyncLROPoller that returns None - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - async def _generate_credentials_initial( - self, - resource_group_name: str, - registry_name: str, - generate_credentials_parameters: Union[_models.GenerateCredentialsParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(generate_credentials_parameters, (IOBase, bytes)): - _content = generate_credentials_parameters - else: - _json = self._serialize.body(generate_credentials_parameters, "GenerateCredentialsParameters") - - _request = build_registries_generate_credentials_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_generate_credentials( - self, - resource_group_name: str, - registry_name: str, - generate_credentials_parameters: _models.GenerateCredentialsParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.GenerateCredentialsResult]: - """Generate keys for a token of a specified container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param generate_credentials_parameters: The parameters for generating credentials. Required. - :type generate_credentials_parameters: - ~container_registry_management_client.models.GenerateCredentialsParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns GenerateCredentialsResult - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.GenerateCredentialsResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_generate_credentials( - self, - resource_group_name: str, - registry_name: str, - generate_credentials_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.GenerateCredentialsResult]: - """Generate keys for a token of a specified container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param generate_credentials_parameters: The parameters for generating credentials. Required. - :type generate_credentials_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns GenerateCredentialsResult - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.GenerateCredentialsResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_generate_credentials( - self, - resource_group_name: str, - registry_name: str, - generate_credentials_parameters: Union[_models.GenerateCredentialsParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.GenerateCredentialsResult]: - """Generate keys for a token of a specified container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param generate_credentials_parameters: The parameters for generating credentials. Is either a - GenerateCredentialsParameters type or a IO[bytes] type. Required. - :type generate_credentials_parameters: - ~container_registry_management_client.models.GenerateCredentialsParameters or IO[bytes] - :return: An instance of AsyncLROPoller that returns GenerateCredentialsResult - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.GenerateCredentialsResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.GenerateCredentialsResult] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._generate_credentials_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - generate_credentials_parameters=generate_credentials_parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("GenerateCredentialsResult", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.GenerateCredentialsResult].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.GenerateCredentialsResult]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _import_image_initial( - self, - resource_group_name: str, - registry_name: str, - parameters: Union[_models.ImportImageParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ImportImageParameters") - - _request = build_registries_import_image_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_import_image( - self, - resource_group_name: str, - registry_name: str, - parameters: _models.ImportImageParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Copies an image to this container registry from the specified container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param parameters: The parameters specifying the image to copy and the source container - registry. Required. - :type parameters: ~container_registry_management_client.models.ImportImageParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns None - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_import_image( - self, - resource_group_name: str, - registry_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Copies an image to this container registry from the specified container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param parameters: The parameters specifying the image to copy and the source container - registry. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns None - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_import_image( - self, - resource_group_name: str, - registry_name: str, - parameters: Union[_models.ImportImageParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Copies an image to this container registry from the specified container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param parameters: The parameters specifying the image to copy and the source container - registry. Is either a ImportImageParameters type or a IO[bytes] type. Required. - :type parameters: ~container_registry_management_client.models.ImportImageParameters or - IO[bytes] - :return: An instance of AsyncLROPoller that returns None - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._import_image_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - parameters=parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace_async - async def list_credentials( - self, resource_group_name: str, registry_name: str, **kwargs: Any - ) -> _models.RegistryListCredentialsResult: - """Lists the login credentials for the specified container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :return: RegistryListCredentialsResult - :rtype: ~container_registry_management_client.models.RegistryListCredentialsResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.RegistryListCredentialsResult] = kwargs.pop("cls", None) - - _request = build_registries_list_credentials_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize("RegistryListCredentialsResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def list_usages( - self, resource_group_name: str, registry_name: str, **kwargs: Any - ) -> _models.RegistryUsageListResult: - """Gets the quota usages for the specified container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :return: RegistryUsageListResult - :rtype: ~container_registry_management_client.models.RegistryUsageListResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.RegistryUsageListResult] = kwargs.pop("cls", None) - - _request = build_registries_list_usages_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize("RegistryUsageListResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def list_private_link_resources( - self, resource_group_name: str, registry_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.PrivateLinkResource"]: - """Lists the private link resources for a container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :return: An iterator like instance of PrivateLinkResource - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~container_registry_management_client.models.PrivateLinkResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models._models.PrivateLinkResourceListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_registries_list_private_link_resources_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize( - _models._models.PrivateLinkResourceListResult, pipeline_response # pylint: disable=protected-access - ) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_private_link_resource( - self, resource_group_name: str, registry_name: str, group_name: str, **kwargs: Any - ) -> _models.PrivateLinkResource: - """Gets a private link resource by a specified group name for a container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param group_name: The name of the private link associated with the Azure resource. Required. - :type group_name: str - :return: PrivateLinkResource - :rtype: ~container_registry_management_client.models.PrivateLinkResource - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.PrivateLinkResource] = kwargs.pop("cls", None) - - _request = build_registries_get_private_link_resource_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - group_name=group_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize("PrivateLinkResource", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def regenerate_credential( - self, - resource_group_name: str, - registry_name: str, - regenerate_credential_parameters: _models.RegenerateCredentialParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.RegistryListCredentialsResult: - """Regenerates one of the login credentials for the specified container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param regenerate_credential_parameters: Specifies name of the password which should be - regenerated -- password or password2. Required. - :type regenerate_credential_parameters: - ~container_registry_management_client.models.RegenerateCredentialParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: RegistryListCredentialsResult - :rtype: ~container_registry_management_client.models.RegistryListCredentialsResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def regenerate_credential( - self, - resource_group_name: str, - registry_name: str, - regenerate_credential_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.RegistryListCredentialsResult: - """Regenerates one of the login credentials for the specified container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param regenerate_credential_parameters: Specifies name of the password which should be - regenerated -- password or password2. Required. - :type regenerate_credential_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: RegistryListCredentialsResult - :rtype: ~container_registry_management_client.models.RegistryListCredentialsResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def regenerate_credential( - self, - resource_group_name: str, - registry_name: str, - regenerate_credential_parameters: Union[_models.RegenerateCredentialParameters, IO[bytes]], - **kwargs: Any - ) -> _models.RegistryListCredentialsResult: - """Regenerates one of the login credentials for the specified container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param regenerate_credential_parameters: Specifies name of the password which should be - regenerated -- password or password2. Is either a RegenerateCredentialParameters type or a - IO[bytes] type. Required. - :type regenerate_credential_parameters: - ~container_registry_management_client.models.RegenerateCredentialParameters or IO[bytes] - :return: RegistryListCredentialsResult - :rtype: ~container_registry_management_client.models.RegistryListCredentialsResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.RegistryListCredentialsResult] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(regenerate_credential_parameters, (IOBase, bytes)): - _content = regenerate_credential_parameters - else: - _json = self._serialize.body(regenerate_credential_parameters, "RegenerateCredentialParameters") - - _request = build_registries_regenerate_credential_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize("RegistryListCredentialsResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - -class CacheRulesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~container_registry_management_client.aio.ContainerRegistryManagementClient`'s - :attr:`cache_rules` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerRegistryManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> AsyncItemPaged["_models.CacheRule"]: - """Lists all cache rule resources for the specified container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :return: An iterator like instance of CacheRule - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~container_registry_management_client.models.CacheRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models._models.CacheRulesListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_cache_rules_list_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize( - _models._models.CacheRulesListResult, pipeline_response # pylint: disable=protected-access - ) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, resource_group_name: str, registry_name: str, cache_rule_name: str, **kwargs: Any - ) -> _models.CacheRule: - """Gets the properties of the specified cache rule resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param cache_rule_name: The name of the cache rule. Required. - :type cache_rule_name: str - :return: CacheRule - :rtype: ~container_registry_management_client.models.CacheRule - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.CacheRule] = kwargs.pop("cls", None) - - _request = build_cache_rules_get_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - cache_rule_name=cache_rule_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize("CacheRule", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_initial( - self, - resource_group_name: str, - registry_name: str, - cache_rule_name: str, - cache_rule_create_parameters: Union[_models.CacheRule, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(cache_rule_create_parameters, (IOBase, bytes)): - _content = cache_rule_create_parameters - else: - _json = self._serialize.body(cache_rule_create_parameters, "CacheRule") - - _request = build_cache_rules_create_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - cache_rule_name=cache_rule_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create( - self, - resource_group_name: str, - registry_name: str, - cache_rule_name: str, - cache_rule_create_parameters: _models.CacheRule, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CacheRule]: - """Creates a cache rule for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param cache_rule_name: The name of the cache rule. Required. - :type cache_rule_name: str - :param cache_rule_create_parameters: The parameters for creating a cache rule. Required. - :type cache_rule_create_parameters: ~container_registry_management_client.models.CacheRule - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns CacheRule - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.CacheRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create( - self, - resource_group_name: str, - registry_name: str, - cache_rule_name: str, - cache_rule_create_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CacheRule]: - """Creates a cache rule for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param cache_rule_name: The name of the cache rule. Required. - :type cache_rule_name: str - :param cache_rule_create_parameters: The parameters for creating a cache rule. Required. - :type cache_rule_create_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns CacheRule - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.CacheRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create( - self, - resource_group_name: str, - registry_name: str, - cache_rule_name: str, - cache_rule_create_parameters: Union[_models.CacheRule, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.CacheRule]: - """Creates a cache rule for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param cache_rule_name: The name of the cache rule. Required. - :type cache_rule_name: str - :param cache_rule_create_parameters: The parameters for creating a cache rule. Is either a - CacheRule type or a IO[bytes] type. Required. - :type cache_rule_create_parameters: ~container_registry_management_client.models.CacheRule or - IO[bytes] - :return: An instance of AsyncLROPoller that returns CacheRule - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.CacheRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CacheRule] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - cache_rule_name=cache_rule_name, - cache_rule_create_parameters=cache_rule_create_parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CacheRule", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.CacheRule].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.CacheRule]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _update_initial( - self, - resource_group_name: str, - registry_name: str, - cache_rule_name: str, - cache_rule_update_parameters: Union[_models.CacheRuleUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(cache_rule_update_parameters, (IOBase, bytes)): - _content = cache_rule_update_parameters - else: - _json = self._serialize.body(cache_rule_update_parameters, "CacheRuleUpdateParameters") - - _request = build_cache_rules_update_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - cache_rule_name=cache_rule_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - registry_name: str, - cache_rule_name: str, - cache_rule_update_parameters: _models.CacheRuleUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CacheRule]: - """Updates a cache rule for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param cache_rule_name: The name of the cache rule. Required. - :type cache_rule_name: str - :param cache_rule_update_parameters: The parameters for updating a cache rule. Required. - :type cache_rule_update_parameters: - ~container_registry_management_client.models.CacheRuleUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns CacheRule - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.CacheRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - registry_name: str, - cache_rule_name: str, - cache_rule_update_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CacheRule]: - """Updates a cache rule for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param cache_rule_name: The name of the cache rule. Required. - :type cache_rule_name: str - :param cache_rule_update_parameters: The parameters for updating a cache rule. Required. - :type cache_rule_update_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns CacheRule - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.CacheRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - registry_name: str, - cache_rule_name: str, - cache_rule_update_parameters: Union[_models.CacheRuleUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.CacheRule]: - """Updates a cache rule for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param cache_rule_name: The name of the cache rule. Required. - :type cache_rule_name: str - :param cache_rule_update_parameters: The parameters for updating a cache rule. Is either a - CacheRuleUpdateParameters type or a IO[bytes] type. Required. - :type cache_rule_update_parameters: - ~container_registry_management_client.models.CacheRuleUpdateParameters or IO[bytes] - :return: An instance of AsyncLROPoller that returns CacheRule - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.CacheRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CacheRule] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - cache_rule_name=cache_rule_name, - cache_rule_update_parameters=cache_rule_update_parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CacheRule", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.CacheRule].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.CacheRule]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, registry_name: str, cache_rule_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_cache_rules_delete_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - cache_rule_name=cache_rule_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, registry_name: str, cache_rule_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes a cache rule resource from a container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param cache_rule_name: The name of the cache rule. Required. - :type cache_rule_name: str - :return: An instance of AsyncLROPoller that returns None - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - cache_rule_name=cache_rule_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - -class ConnectedRegistriesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~container_registry_management_client.aio.ContainerRegistryManagementClient`'s - :attr:`connected_registries` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerRegistryManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, resource_group_name: str, registry_name: str, *, filter: Optional[str] = None, **kwargs: Any - ) -> AsyncItemPaged["_models.ConnectedRegistry"]: - """Lists all connected registries for the specified container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :keyword filter: An OData filter expression that describes a subset of connectedRegistries to - return. The parameters that can be filtered are parent.id (the resource id of the - connectedRegistry parent), mode, and connectionState. The supported operator is eq. Default - value is None. - :paramtype filter: str - :return: An iterator like instance of ConnectedRegistry - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~container_registry_management_client.models.ConnectedRegistry] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models._models.ConnectedRegistryListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_connected_registries_list_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - subscription_id=self._config.subscription_id, - filter=filter, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize( - _models._models.ConnectedRegistryListResult, pipeline_response # pylint: disable=protected-access - ) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, resource_group_name: str, registry_name: str, connected_registry_name: str, **kwargs: Any - ) -> _models.ConnectedRegistry: - """Gets the properties of the connected registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param connected_registry_name: The name of the connected registry. Required. - :type connected_registry_name: str - :return: ConnectedRegistry - :rtype: ~container_registry_management_client.models.ConnectedRegistry - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.ConnectedRegistry] = kwargs.pop("cls", None) - - _request = build_connected_registries_get_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - connected_registry_name=connected_registry_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize("ConnectedRegistry", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_initial( - self, - resource_group_name: str, - registry_name: str, - connected_registry_name: str, - connected_registry_create_parameters: Union[_models.ConnectedRegistry, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(connected_registry_create_parameters, (IOBase, bytes)): - _content = connected_registry_create_parameters - else: - _json = self._serialize.body(connected_registry_create_parameters, "ConnectedRegistry") - - _request = build_connected_registries_create_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - connected_registry_name=connected_registry_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create( - self, - resource_group_name: str, - registry_name: str, - connected_registry_name: str, - connected_registry_create_parameters: _models.ConnectedRegistry, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ConnectedRegistry]: - """Creates a connected registry for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param connected_registry_name: The name of the connected registry. Required. - :type connected_registry_name: str - :param connected_registry_create_parameters: The parameters for creating a connectedRegistry. - Required. - :type connected_registry_create_parameters: - ~container_registry_management_client.models.ConnectedRegistry - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ConnectedRegistry - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.ConnectedRegistry] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create( - self, - resource_group_name: str, - registry_name: str, - connected_registry_name: str, - connected_registry_create_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ConnectedRegistry]: - """Creates a connected registry for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param connected_registry_name: The name of the connected registry. Required. - :type connected_registry_name: str - :param connected_registry_create_parameters: The parameters for creating a connectedRegistry. - Required. - :type connected_registry_create_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ConnectedRegistry - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.ConnectedRegistry] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create( - self, - resource_group_name: str, - registry_name: str, - connected_registry_name: str, - connected_registry_create_parameters: Union[_models.ConnectedRegistry, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.ConnectedRegistry]: - """Creates a connected registry for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param connected_registry_name: The name of the connected registry. Required. - :type connected_registry_name: str - :param connected_registry_create_parameters: The parameters for creating a connectedRegistry. - Is either a ConnectedRegistry type or a IO[bytes] type. Required. - :type connected_registry_create_parameters: - ~container_registry_management_client.models.ConnectedRegistry or IO[bytes] - :return: An instance of AsyncLROPoller that returns ConnectedRegistry - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.ConnectedRegistry] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ConnectedRegistry] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - connected_registry_name=connected_registry_name, - connected_registry_create_parameters=connected_registry_create_parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ConnectedRegistry", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ConnectedRegistry].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ConnectedRegistry]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _update_initial( - self, - resource_group_name: str, - registry_name: str, - connected_registry_name: str, - connected_registry_update_parameters: Union[_models.ConnectedRegistryUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(connected_registry_update_parameters, (IOBase, bytes)): - _content = connected_registry_update_parameters - else: - _json = self._serialize.body(connected_registry_update_parameters, "ConnectedRegistryUpdateParameters") - - _request = build_connected_registries_update_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - connected_registry_name=connected_registry_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - registry_name: str, - connected_registry_name: str, - connected_registry_update_parameters: _models.ConnectedRegistryUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ConnectedRegistry]: - """Updates a connected registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param connected_registry_name: The name of the connected registry. Required. - :type connected_registry_name: str - :param connected_registry_update_parameters: The parameters for updating a connectedRegistry. - Required. - :type connected_registry_update_parameters: - ~container_registry_management_client.models.ConnectedRegistryUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ConnectedRegistry - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.ConnectedRegistry] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - registry_name: str, - connected_registry_name: str, - connected_registry_update_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ConnectedRegistry]: - """Updates a connected registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param connected_registry_name: The name of the connected registry. Required. - :type connected_registry_name: str - :param connected_registry_update_parameters: The parameters for updating a connectedRegistry. - Required. - :type connected_registry_update_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ConnectedRegistry - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.ConnectedRegistry] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - registry_name: str, - connected_registry_name: str, - connected_registry_update_parameters: Union[_models.ConnectedRegistryUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.ConnectedRegistry]: - """Updates a connected registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param connected_registry_name: The name of the connected registry. Required. - :type connected_registry_name: str - :param connected_registry_update_parameters: The parameters for updating a connectedRegistry. - Is either a ConnectedRegistryUpdateParameters type or a IO[bytes] type. Required. - :type connected_registry_update_parameters: - ~container_registry_management_client.models.ConnectedRegistryUpdateParameters or IO[bytes] - :return: An instance of AsyncLROPoller that returns ConnectedRegistry - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.ConnectedRegistry] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ConnectedRegistry] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - connected_registry_name=connected_registry_name, - connected_registry_update_parameters=connected_registry_update_parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ConnectedRegistry", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ConnectedRegistry].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ConnectedRegistry]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, registry_name: str, connected_registry_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_connected_registries_delete_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - connected_registry_name=connected_registry_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, registry_name: str, connected_registry_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes a connected registry from a container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param connected_registry_name: The name of the connected registry. Required. - :type connected_registry_name: str - :return: An instance of AsyncLROPoller that returns None - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - connected_registry_name=connected_registry_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - async def _deactivate_initial( - self, resource_group_name: str, registry_name: str, connected_registry_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_connected_registries_deactivate_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - connected_registry_name=connected_registry_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_deactivate( - self, resource_group_name: str, registry_name: str, connected_registry_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deactivates the connected registry instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param connected_registry_name: The name of the connected registry. Required. - :type connected_registry_name: str - :return: An instance of AsyncLROPoller that returns None - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._deactivate_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - connected_registry_name=connected_registry_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace_async - async def resync( - self, resource_group_name: str, registry_name: str, connected_registry_name: str, **kwargs: Any - ) -> _models.ConnectedRegistry: - """Resync the connected registry instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param connected_registry_name: The name of the connected registry. Required. - :type connected_registry_name: str - :return: ConnectedRegistry - :rtype: ~container_registry_management_client.models.ConnectedRegistry - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.ConnectedRegistry] = kwargs.pop("cls", None) - - _request = build_connected_registries_resync_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - connected_registry_name=connected_registry_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize("ConnectedRegistry", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - -class CredentialSetsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~container_registry_management_client.aio.ContainerRegistryManagementClient`'s - :attr:`credential_sets` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerRegistryManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, resource_group_name: str, registry_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.CredentialSet"]: - """Lists all credential set resources for the specified container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :return: An iterator like instance of CredentialSet - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~container_registry_management_client.models.CredentialSet] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models._models.CredentialSetListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_credential_sets_list_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize( - _models._models.CredentialSetListResult, pipeline_response # pylint: disable=protected-access - ) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, resource_group_name: str, registry_name: str, credential_set_name: str, **kwargs: Any - ) -> _models.CredentialSet: - """Gets the properties of the specified credential set resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param credential_set_name: The name of the credential set. Required. - :type credential_set_name: str - :return: CredentialSet - :rtype: ~container_registry_management_client.models.CredentialSet - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.CredentialSet] = kwargs.pop("cls", None) - - _request = build_credential_sets_get_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - credential_set_name=credential_set_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize("CredentialSet", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_initial( - self, - resource_group_name: str, - registry_name: str, - credential_set_name: str, - credential_set_create_parameters: Union[_models.CredentialSet, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(credential_set_create_parameters, (IOBase, bytes)): - _content = credential_set_create_parameters - else: - _json = self._serialize.body(credential_set_create_parameters, "CredentialSet") - - _request = build_credential_sets_create_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - credential_set_name=credential_set_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create( - self, - resource_group_name: str, - registry_name: str, - credential_set_name: str, - credential_set_create_parameters: _models.CredentialSet, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CredentialSet]: - """Creates a credential set for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param credential_set_name: The name of the credential set. Required. - :type credential_set_name: str - :param credential_set_create_parameters: The parameters for creating a credential set. - Required. - :type credential_set_create_parameters: - ~container_registry_management_client.models.CredentialSet - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns CredentialSet - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.CredentialSet] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create( - self, - resource_group_name: str, - registry_name: str, - credential_set_name: str, - credential_set_create_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CredentialSet]: - """Creates a credential set for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param credential_set_name: The name of the credential set. Required. - :type credential_set_name: str - :param credential_set_create_parameters: The parameters for creating a credential set. - Required. - :type credential_set_create_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns CredentialSet - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.CredentialSet] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create( - self, - resource_group_name: str, - registry_name: str, - credential_set_name: str, - credential_set_create_parameters: Union[_models.CredentialSet, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.CredentialSet]: - """Creates a credential set for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param credential_set_name: The name of the credential set. Required. - :type credential_set_name: str - :param credential_set_create_parameters: The parameters for creating a credential set. Is - either a CredentialSet type or a IO[bytes] type. Required. - :type credential_set_create_parameters: - ~container_registry_management_client.models.CredentialSet or IO[bytes] - :return: An instance of AsyncLROPoller that returns CredentialSet - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.CredentialSet] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CredentialSet] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - credential_set_name=credential_set_name, - credential_set_create_parameters=credential_set_create_parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CredentialSet", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.CredentialSet].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.CredentialSet]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _update_initial( - self, - resource_group_name: str, - registry_name: str, - credential_set_name: str, - credential_set_update_parameters: Union[_models.CredentialSetUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(credential_set_update_parameters, (IOBase, bytes)): - _content = credential_set_update_parameters - else: - _json = self._serialize.body(credential_set_update_parameters, "CredentialSetUpdateParameters") - - _request = build_credential_sets_update_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - credential_set_name=credential_set_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - registry_name: str, - credential_set_name: str, - credential_set_update_parameters: _models.CredentialSetUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CredentialSet]: - """Updates a credential set for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param credential_set_name: The name of the credential set. Required. - :type credential_set_name: str - :param credential_set_update_parameters: The parameters for updating a credential set. - Required. - :type credential_set_update_parameters: - ~container_registry_management_client.models.CredentialSetUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns CredentialSet - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.CredentialSet] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - registry_name: str, - credential_set_name: str, - credential_set_update_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.CredentialSet]: - """Updates a credential set for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param credential_set_name: The name of the credential set. Required. - :type credential_set_name: str - :param credential_set_update_parameters: The parameters for updating a credential set. - Required. - :type credential_set_update_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns CredentialSet - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.CredentialSet] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - registry_name: str, - credential_set_name: str, - credential_set_update_parameters: Union[_models.CredentialSetUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.CredentialSet]: - """Updates a credential set for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param credential_set_name: The name of the credential set. Required. - :type credential_set_name: str - :param credential_set_update_parameters: The parameters for updating a credential set. Is - either a CredentialSetUpdateParameters type or a IO[bytes] type. Required. - :type credential_set_update_parameters: - ~container_registry_management_client.models.CredentialSetUpdateParameters or IO[bytes] - :return: An instance of AsyncLROPoller that returns CredentialSet - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.CredentialSet] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CredentialSet] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - credential_set_name=credential_set_name, - credential_set_update_parameters=credential_set_update_parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CredentialSet", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.CredentialSet].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.CredentialSet]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, registry_name: str, credential_set_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_credential_sets_delete_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - credential_set_name=credential_set_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, registry_name: str, credential_set_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes a credential set from a container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param credential_set_name: The name of the credential set. Required. - :type credential_set_name: str - :return: An instance of AsyncLROPoller that returns None - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - credential_set_name=credential_set_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - -class ExportPipelinesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~container_registry_management_client.aio.ContainerRegistryManagementClient`'s - :attr:`export_pipelines` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerRegistryManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, resource_group_name: str, registry_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.ExportPipeline"]: - """Lists all export pipelines for the specified container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :return: An iterator like instance of ExportPipeline - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~container_registry_management_client.models.ExportPipeline] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models._models.ExportPipelineListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_export_pipelines_list_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize( - _models._models.ExportPipelineListResult, pipeline_response # pylint: disable=protected-access - ) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, resource_group_name: str, registry_name: str, export_pipeline_name: str, **kwargs: Any - ) -> _models.ExportPipeline: - """Gets the properties of the export pipeline. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param export_pipeline_name: The name of the export pipeline. Required. - :type export_pipeline_name: str - :return: ExportPipeline - :rtype: ~container_registry_management_client.models.ExportPipeline - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.ExportPipeline] = kwargs.pop("cls", None) - - _request = build_export_pipelines_get_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - export_pipeline_name=export_pipeline_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize("ExportPipeline", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_initial( - self, - resource_group_name: str, - registry_name: str, - export_pipeline_name: str, - export_pipeline_create_parameters: Union[_models.ExportPipeline, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(export_pipeline_create_parameters, (IOBase, bytes)): - _content = export_pipeline_create_parameters - else: - _json = self._serialize.body(export_pipeline_create_parameters, "ExportPipeline") - - _request = build_export_pipelines_create_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - export_pipeline_name=export_pipeline_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create( - self, - resource_group_name: str, - registry_name: str, - export_pipeline_name: str, - export_pipeline_create_parameters: _models.ExportPipeline, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ExportPipeline]: - """Creates an export pipeline for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param export_pipeline_name: The name of the export pipeline. Required. - :type export_pipeline_name: str - :param export_pipeline_create_parameters: The parameters for creating an export pipeline. - Required. - :type export_pipeline_create_parameters: - ~container_registry_management_client.models.ExportPipeline - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ExportPipeline - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.ExportPipeline] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create( - self, - resource_group_name: str, - registry_name: str, - export_pipeline_name: str, - export_pipeline_create_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ExportPipeline]: - """Creates an export pipeline for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param export_pipeline_name: The name of the export pipeline. Required. - :type export_pipeline_name: str - :param export_pipeline_create_parameters: The parameters for creating an export pipeline. - Required. - :type export_pipeline_create_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ExportPipeline - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.ExportPipeline] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create( - self, - resource_group_name: str, - registry_name: str, - export_pipeline_name: str, - export_pipeline_create_parameters: Union[_models.ExportPipeline, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.ExportPipeline]: - """Creates an export pipeline for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param export_pipeline_name: The name of the export pipeline. Required. - :type export_pipeline_name: str - :param export_pipeline_create_parameters: The parameters for creating an export pipeline. Is - either a ExportPipeline type or a IO[bytes] type. Required. - :type export_pipeline_create_parameters: - ~container_registry_management_client.models.ExportPipeline or IO[bytes] - :return: An instance of AsyncLROPoller that returns ExportPipeline - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.ExportPipeline] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ExportPipeline] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - export_pipeline_name=export_pipeline_name, - export_pipeline_create_parameters=export_pipeline_create_parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ExportPipeline", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ExportPipeline].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ExportPipeline]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, registry_name: str, export_pipeline_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_export_pipelines_delete_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - export_pipeline_name=export_pipeline_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, registry_name: str, export_pipeline_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes an export pipeline from a container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param export_pipeline_name: The name of the export pipeline. Required. - :type export_pipeline_name: str - :return: An instance of AsyncLROPoller that returns None - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - export_pipeline_name=export_pipeline_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - -class ImportPipelinesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~container_registry_management_client.aio.ContainerRegistryManagementClient`'s - :attr:`import_pipelines` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerRegistryManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, resource_group_name: str, registry_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.ImportPipeline"]: - """Lists all import pipelines for the specified container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :return: An iterator like instance of ImportPipeline - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~container_registry_management_client.models.ImportPipeline] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models._models.ImportPipelineListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_import_pipelines_list_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize( - _models._models.ImportPipelineListResult, pipeline_response # pylint: disable=protected-access - ) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, resource_group_name: str, registry_name: str, import_pipeline_name: str, **kwargs: Any - ) -> _models.ImportPipeline: - """Gets the properties of the import pipeline. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param import_pipeline_name: The name of the import pipeline. Required. - :type import_pipeline_name: str - :return: ImportPipeline - :rtype: ~container_registry_management_client.models.ImportPipeline - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.ImportPipeline] = kwargs.pop("cls", None) - - _request = build_import_pipelines_get_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - import_pipeline_name=import_pipeline_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize("ImportPipeline", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_initial( - self, - resource_group_name: str, - registry_name: str, - import_pipeline_name: str, - import_pipeline_create_parameters: Union[_models.ImportPipeline, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(import_pipeline_create_parameters, (IOBase, bytes)): - _content = import_pipeline_create_parameters - else: - _json = self._serialize.body(import_pipeline_create_parameters, "ImportPipeline") - - _request = build_import_pipelines_create_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - import_pipeline_name=import_pipeline_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create( - self, - resource_group_name: str, - registry_name: str, - import_pipeline_name: str, - import_pipeline_create_parameters: _models.ImportPipeline, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ImportPipeline]: - """Creates an import pipeline for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param import_pipeline_name: The name of the import pipeline. Required. - :type import_pipeline_name: str - :param import_pipeline_create_parameters: The parameters for creating an import pipeline. - Required. - :type import_pipeline_create_parameters: - ~container_registry_management_client.models.ImportPipeline - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ImportPipeline - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.ImportPipeline] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create( - self, - resource_group_name: str, - registry_name: str, - import_pipeline_name: str, - import_pipeline_create_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ImportPipeline]: - """Creates an import pipeline for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param import_pipeline_name: The name of the import pipeline. Required. - :type import_pipeline_name: str - :param import_pipeline_create_parameters: The parameters for creating an import pipeline. - Required. - :type import_pipeline_create_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ImportPipeline - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.ImportPipeline] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create( - self, - resource_group_name: str, - registry_name: str, - import_pipeline_name: str, - import_pipeline_create_parameters: Union[_models.ImportPipeline, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.ImportPipeline]: - """Creates an import pipeline for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param import_pipeline_name: The name of the import pipeline. Required. - :type import_pipeline_name: str - :param import_pipeline_create_parameters: The parameters for creating an import pipeline. Is - either a ImportPipeline type or a IO[bytes] type. Required. - :type import_pipeline_create_parameters: - ~container_registry_management_client.models.ImportPipeline or IO[bytes] - :return: An instance of AsyncLROPoller that returns ImportPipeline - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.ImportPipeline] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ImportPipeline] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - import_pipeline_name=import_pipeline_name, - import_pipeline_create_parameters=import_pipeline_create_parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ImportPipeline", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ImportPipeline].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ImportPipeline]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, registry_name: str, import_pipeline_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_import_pipelines_delete_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - import_pipeline_name=import_pipeline_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, registry_name: str, import_pipeline_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes an import pipeline from a container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param import_pipeline_name: The name of the import pipeline. Required. - :type import_pipeline_name: str - :return: An instance of AsyncLROPoller that returns None - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - import_pipeline_name=import_pipeline_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - -class ArchivesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~container_registry_management_client.aio.ContainerRegistryManagementClient`'s - :attr:`archives` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerRegistryManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, resource_group_name: str, registry_name: str, package_type: str, **kwargs: Any - ) -> AsyncItemPaged["_models.Archive"]: - """Lists all archives for the specified container registry and package type. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param package_type: The package type. Required. - :type package_type: str - :return: An iterator like instance of Archive - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~container_registry_management_client.models.Archive] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models._models.ArchiveListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_archives_list_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - package_type=package_type, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize( - _models._models.ArchiveListResult, pipeline_response # pylint: disable=protected-access - ) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, resource_group_name: str, registry_name: str, package_type: str, archive_name: str, **kwargs: Any - ) -> _models.Archive: - """Gets the properties of the archive. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param package_type: The package type. Required. - :type package_type: str - :param archive_name: The name of the archive resource. Required. - :type archive_name: str - :return: Archive - :rtype: ~container_registry_management_client.models.Archive - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.Archive] = kwargs.pop("cls", None) - - _request = build_archives_get_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - package_type=package_type, - archive_name=archive_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize("Archive", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_initial( - self, - resource_group_name: str, - registry_name: str, - package_type: str, - archive_name: str, - archive_create_parameters: Union[_models.Archive, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(archive_create_parameters, (IOBase, bytes)): - _content = archive_create_parameters - else: - _json = self._serialize.body(archive_create_parameters, "Archive") - - _request = build_archives_create_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - package_type=package_type, - archive_name=archive_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create( - self, - resource_group_name: str, - registry_name: str, - package_type: str, - archive_name: str, - archive_create_parameters: _models.Archive, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Archive]: - """Creates a archive for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param package_type: The package type. Required. - :type package_type: str - :param archive_name: The name of the archive resource. Required. - :type archive_name: str - :param archive_create_parameters: The parameters for creating a archive. Required. - :type archive_create_parameters: ~container_registry_management_client.models.Archive - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns Archive - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Archive] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create( - self, - resource_group_name: str, - registry_name: str, - package_type: str, - archive_name: str, - archive_create_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Archive]: - """Creates a archive for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param package_type: The package type. Required. - :type package_type: str - :param archive_name: The name of the archive resource. Required. - :type archive_name: str - :param archive_create_parameters: The parameters for creating a archive. Required. - :type archive_create_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns Archive - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Archive] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create( - self, - resource_group_name: str, - registry_name: str, - package_type: str, - archive_name: str, - archive_create_parameters: Union[_models.Archive, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.Archive]: - """Creates a archive for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param package_type: The package type. Required. - :type package_type: str - :param archive_name: The name of the archive resource. Required. - :type archive_name: str - :param archive_create_parameters: The parameters for creating a archive. Is either a Archive - type or a IO[bytes] type. Required. - :type archive_create_parameters: ~container_registry_management_client.models.Archive or - IO[bytes] - :return: An instance of AsyncLROPoller that returns Archive - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Archive] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Archive] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - package_type=package_type, - archive_name=archive_name, - archive_create_parameters=archive_create_parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Archive", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.Archive].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.Archive]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @overload - async def update( - self, - resource_group_name: str, - registry_name: str, - package_type: str, - archive_name: str, - archive_update_parameters: _models.ArchiveUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.Archive: - """Updates a archive for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param package_type: The package type. Required. - :type package_type: str - :param archive_name: The name of the archive resource. Required. - :type archive_name: str - :param archive_update_parameters: The parameters for updating a archive. Required. - :type archive_update_parameters: - ~container_registry_management_client.models.ArchiveUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: Archive - :rtype: ~container_registry_management_client.models.Archive - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - registry_name: str, - package_type: str, - archive_name: str, - archive_update_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.Archive: - """Updates a archive for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param package_type: The package type. Required. - :type package_type: str - :param archive_name: The name of the archive resource. Required. - :type archive_name: str - :param archive_update_parameters: The parameters for updating a archive. Required. - :type archive_update_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: Archive - :rtype: ~container_registry_management_client.models.Archive - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - registry_name: str, - package_type: str, - archive_name: str, - archive_update_parameters: Union[_models.ArchiveUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> _models.Archive: - """Updates a archive for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param package_type: The package type. Required. - :type package_type: str - :param archive_name: The name of the archive resource. Required. - :type archive_name: str - :param archive_update_parameters: The parameters for updating a archive. Is either a - ArchiveUpdateParameters type or a IO[bytes] type. Required. - :type archive_update_parameters: - ~container_registry_management_client.models.ArchiveUpdateParameters or IO[bytes] - :return: Archive - :rtype: ~container_registry_management_client.models.Archive - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Archive] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(archive_update_parameters, (IOBase, bytes)): - _content = archive_update_parameters - else: - _json = self._serialize.body(archive_update_parameters, "ArchiveUpdateParameters") - - _request = build_archives_update_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - package_type=package_type, - archive_name=archive_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize("Archive", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _delete_initial( - self, resource_group_name: str, registry_name: str, package_type: str, archive_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_archives_delete_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - package_type=package_type, - archive_name=archive_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, registry_name: str, package_type: str, archive_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes a archive from a container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param package_type: The package type. Required. - :type package_type: str - :param archive_name: The name of the archive resource. Required. - :type archive_name: str - :return: An instance of AsyncLROPoller that returns None - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - package_type=package_type, - archive_name=archive_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - -class ArchiveVersionsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~container_registry_management_client.aio.ContainerRegistryManagementClient`'s - :attr:`archive_versions` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerRegistryManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, resource_group_name: str, registry_name: str, package_type: str, archive_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.ArchiveVersion"]: - """Lists all archive versions for the specified container registry, repository type and archive - name. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param package_type: The package type. Required. - :type package_type: str - :param archive_name: The name of the archive resource. Required. - :type archive_name: str - :return: An iterator like instance of ArchiveVersion - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~container_registry_management_client.models.ArchiveVersion] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models._models.ArchiveVersionListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_archive_versions_list_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - package_type=package_type, - archive_name=archive_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize( - _models._models.ArchiveVersionListResult, pipeline_response # pylint: disable=protected-access - ) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - registry_name: str, - package_type: str, - archive_name: str, - archive_version_name: str, - **kwargs: Any - ) -> _models.ArchiveVersion: - """Gets the properties of the archive version. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param package_type: The package type. Required. - :type package_type: str - :param archive_name: The name of the archive resource. Required. - :type archive_name: str - :param archive_version_name: The name of the archive version resource. Required. - :type archive_version_name: str - :return: ArchiveVersion - :rtype: ~container_registry_management_client.models.ArchiveVersion - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.ArchiveVersion] = kwargs.pop("cls", None) - - _request = build_archive_versions_get_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - package_type=package_type, - archive_name=archive_name, - archive_version_name=archive_version_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize("ArchiveVersion", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_initial( - self, - resource_group_name: str, - registry_name: str, - package_type: str, - archive_name: str, - archive_version_name: str, - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_archive_versions_create_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - package_type=package_type, - archive_name=archive_name, - archive_version_name=archive_version_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_create( - self, - resource_group_name: str, - registry_name: str, - package_type: str, - archive_name: str, - archive_version_name: str, - **kwargs: Any - ) -> AsyncLROPoller[_models.ArchiveVersion]: - """Creates a archive version for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param package_type: The package type. Required. - :type package_type: str - :param archive_name: The name of the archive resource. Required. - :type archive_name: str - :param archive_version_name: The name of the archive version resource. Required. - :type archive_version_name: str - :return: An instance of AsyncLROPoller that returns ArchiveVersion - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.ArchiveVersion] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.ArchiveVersion] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - package_type=package_type, - archive_name=archive_name, - archive_version_name=archive_version_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ArchiveVersion", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ArchiveVersion].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ArchiveVersion]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, - resource_group_name: str, - registry_name: str, - package_type: str, - archive_name: str, - archive_version_name: str, - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_archive_versions_delete_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - package_type=package_type, - archive_name=archive_name, - archive_version_name=archive_version_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, - resource_group_name: str, - registry_name: str, - package_type: str, - archive_name: str, - archive_version_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes a archive version from a container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param package_type: The package type. Required. - :type package_type: str - :param archive_name: The name of the archive resource. Required. - :type archive_name: str - :param archive_version_name: The name of the archive version resource. Required. - :type archive_version_name: str - :return: An instance of AsyncLROPoller that returns None - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - package_type=package_type, - archive_name=archive_name, - archive_version_name=archive_version_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - -class PipelineRunsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~container_registry_management_client.aio.ContainerRegistryManagementClient`'s - :attr:`pipeline_runs` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerRegistryManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, resource_group_name: str, registry_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.PipelineRun"]: - """Lists all the pipeline runs for the specified container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :return: An iterator like instance of PipelineRun - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~container_registry_management_client.models.PipelineRun] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models._models.PipelineRunListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_pipeline_runs_list_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize( - _models._models.PipelineRunListResult, pipeline_response # pylint: disable=protected-access - ) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, resource_group_name: str, registry_name: str, pipeline_run_name: str, **kwargs: Any - ) -> _models.PipelineRun: - """Gets the detailed information for a given pipeline run. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param pipeline_run_name: The name of the pipeline run. Required. - :type pipeline_run_name: str - :return: PipelineRun - :rtype: ~container_registry_management_client.models.PipelineRun - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.PipelineRun] = kwargs.pop("cls", None) - - _request = build_pipeline_runs_get_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - pipeline_run_name=pipeline_run_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize("PipelineRun", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_initial( - self, - resource_group_name: str, - registry_name: str, - pipeline_run_name: str, - pipeline_run_create_parameters: Union[_models.PipelineRun, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(pipeline_run_create_parameters, (IOBase, bytes)): - _content = pipeline_run_create_parameters - else: - _json = self._serialize.body(pipeline_run_create_parameters, "PipelineRun") - - _request = build_pipeline_runs_create_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - pipeline_run_name=pipeline_run_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create( - self, - resource_group_name: str, - registry_name: str, - pipeline_run_name: str, - pipeline_run_create_parameters: _models.PipelineRun, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.PipelineRun]: - """Creates a pipeline run for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param pipeline_run_name: The name of the pipeline run. Required. - :type pipeline_run_name: str - :param pipeline_run_create_parameters: The parameters for creating a pipeline run. Required. - :type pipeline_run_create_parameters: ~container_registry_management_client.models.PipelineRun - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns PipelineRun - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.PipelineRun] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create( - self, - resource_group_name: str, - registry_name: str, - pipeline_run_name: str, - pipeline_run_create_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.PipelineRun]: - """Creates a pipeline run for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param pipeline_run_name: The name of the pipeline run. Required. - :type pipeline_run_name: str - :param pipeline_run_create_parameters: The parameters for creating a pipeline run. Required. - :type pipeline_run_create_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns PipelineRun - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.PipelineRun] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create( - self, - resource_group_name: str, - registry_name: str, - pipeline_run_name: str, - pipeline_run_create_parameters: Union[_models.PipelineRun, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.PipelineRun]: - """Creates a pipeline run for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param pipeline_run_name: The name of the pipeline run. Required. - :type pipeline_run_name: str - :param pipeline_run_create_parameters: The parameters for creating a pipeline run. Is either a - PipelineRun type or a IO[bytes] type. Required. - :type pipeline_run_create_parameters: ~container_registry_management_client.models.PipelineRun - or IO[bytes] - :return: An instance of AsyncLROPoller that returns PipelineRun - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.PipelineRun] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PipelineRun] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - pipeline_run_name=pipeline_run_name, - pipeline_run_create_parameters=pipeline_run_create_parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("PipelineRun", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.PipelineRun].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.PipelineRun]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, registry_name: str, pipeline_run_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_pipeline_runs_delete_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - pipeline_run_name=pipeline_run_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, registry_name: str, pipeline_run_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes a pipeline run from a container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param pipeline_run_name: The name of the pipeline run. Required. - :type pipeline_run_name: str - :return: An instance of AsyncLROPoller that returns None - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - pipeline_run_name=pipeline_run_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - -class PrivateEndpointConnectionsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~container_registry_management_client.aio.ContainerRegistryManagementClient`'s - :attr:`private_endpoint_connections` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerRegistryManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, resource_group_name: str, registry_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.PrivateEndpointConnection"]: - """List all private endpoint connections in a container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :return: An iterator like instance of PrivateEndpointConnection - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~container_registry_management_client.models.PrivateEndpointConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models._models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_private_endpoint_connections_list_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize( - _models._models.PrivateEndpointConnectionListResult, # pylint: disable=protected-access - pipeline_response, - ) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, resource_group_name: str, registry_name: str, private_endpoint_connection_name: str, **kwargs: Any - ) -> _models.PrivateEndpointConnection: - """Get the specified private endpoint connection associated with the container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :return: PrivateEndpointConnection - :rtype: ~container_registry_management_client.models.PrivateEndpointConnection - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) - - _request = build_private_endpoint_connections_get_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - private_endpoint_connection_name=private_endpoint_connection_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_or_update_initial( - self, - resource_group_name: str, - registry_name: str, - private_endpoint_connection_name: str, - private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(private_endpoint_connection, (IOBase, bytes)): - _content = private_endpoint_connection - else: - _json = self._serialize.body(private_endpoint_connection, "PrivateEndpointConnection") - - _request = build_private_endpoint_connections_create_or_update_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - private_endpoint_connection_name=private_endpoint_connection_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - registry_name: str, - private_endpoint_connection_name: str, - private_endpoint_connection: _models.PrivateEndpointConnection, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.PrivateEndpointConnection]: - """Update the state of specified private endpoint connection associated with the container - registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :param private_endpoint_connection: The parameters for creating a private endpoint connection. - Required. - :type private_endpoint_connection: - ~container_registry_management_client.models.PrivateEndpointConnection - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns PrivateEndpointConnection - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.PrivateEndpointConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - registry_name: str, - private_endpoint_connection_name: str, - private_endpoint_connection: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.PrivateEndpointConnection]: - """Update the state of specified private endpoint connection associated with the container - registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :param private_endpoint_connection: The parameters for creating a private endpoint connection. - Required. - :type private_endpoint_connection: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns PrivateEndpointConnection - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.PrivateEndpointConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update( - self, - resource_group_name: str, - registry_name: str, - private_endpoint_connection_name: str, - private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.PrivateEndpointConnection]: - """Update the state of specified private endpoint connection associated with the container - registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :param private_endpoint_connection: The parameters for creating a private endpoint connection. - Is either a PrivateEndpointConnection type or a IO[bytes] type. Required. - :type private_endpoint_connection: - ~container_registry_management_client.models.PrivateEndpointConnection or IO[bytes] - :return: An instance of AsyncLROPoller that returns PrivateEndpointConnection - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.PrivateEndpointConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - private_endpoint_connection_name=private_endpoint_connection_name, - private_endpoint_connection=private_endpoint_connection, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.PrivateEndpointConnection].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.PrivateEndpointConnection]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, registry_name: str, private_endpoint_connection_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_private_endpoint_connections_delete_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - private_endpoint_connection_name=private_endpoint_connection_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, registry_name: str, private_endpoint_connection_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the specified private endpoint connection associated with the container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :return: An instance of AsyncLROPoller that returns None - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - private_endpoint_connection_name=private_endpoint_connection_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - -class ReplicationsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~container_registry_management_client.aio.ContainerRegistryManagementClient`'s - :attr:`replications` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerRegistryManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, resource_group_name: str, registry_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.Replication"]: - """Lists all the replications for the specified container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :return: An iterator like instance of Replication - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~container_registry_management_client.models.Replication] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models._models.ReplicationListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_replications_list_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize( - _models._models.ReplicationListResult, pipeline_response # pylint: disable=protected-access - ) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, resource_group_name: str, registry_name: str, replication_name: str, **kwargs: Any - ) -> _models.Replication: - """Gets the properties of the specified replication. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param replication_name: The name of the replication. Required. - :type replication_name: str - :return: Replication - :rtype: ~container_registry_management_client.models.Replication - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.Replication] = kwargs.pop("cls", None) - - _request = build_replications_get_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - replication_name=replication_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize("Replication", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_initial( - self, - resource_group_name: str, - registry_name: str, - replication_name: str, - replication: Union[_models.Replication, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(replication, (IOBase, bytes)): - _content = replication - else: - _json = self._serialize.body(replication, "Replication") - - _request = build_replications_create_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - replication_name=replication_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create( - self, - resource_group_name: str, - registry_name: str, - replication_name: str, - replication: _models.Replication, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Replication]: - """Creates a replication for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param replication_name: The name of the replication. Required. - :type replication_name: str - :param replication: The parameters for creating a replication. Required. - :type replication: ~container_registry_management_client.models.Replication - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns Replication - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Replication] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create( - self, - resource_group_name: str, - registry_name: str, - replication_name: str, - replication: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Replication]: - """Creates a replication for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param replication_name: The name of the replication. Required. - :type replication_name: str - :param replication: The parameters for creating a replication. Required. - :type replication: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns Replication - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Replication] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create( - self, - resource_group_name: str, - registry_name: str, - replication_name: str, - replication: Union[_models.Replication, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.Replication]: - """Creates a replication for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param replication_name: The name of the replication. Required. - :type replication_name: str - :param replication: The parameters for creating a replication. Is either a Replication type or - a IO[bytes] type. Required. - :type replication: ~container_registry_management_client.models.Replication or IO[bytes] - :return: An instance of AsyncLROPoller that returns Replication - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Replication] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Replication] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - replication_name=replication_name, - replication=replication, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Replication", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.Replication].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.Replication]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _update_initial( - self, - resource_group_name: str, - registry_name: str, - replication_name: str, - replication_update_parameters: Union[_models.ReplicationUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(replication_update_parameters, (IOBase, bytes)): - _content = replication_update_parameters - else: - _json = self._serialize.body(replication_update_parameters, "ReplicationUpdateParameters") - - _request = build_replications_update_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - replication_name=replication_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - registry_name: str, - replication_name: str, - replication_update_parameters: _models.ReplicationUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Replication]: - """Updates a replication for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param replication_name: The name of the replication. Required. - :type replication_name: str - :param replication_update_parameters: The parameters for updating a replication. Required. - :type replication_update_parameters: - ~container_registry_management_client.models.ReplicationUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns Replication - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Replication] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - registry_name: str, - replication_name: str, - replication_update_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Replication]: - """Updates a replication for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param replication_name: The name of the replication. Required. - :type replication_name: str - :param replication_update_parameters: The parameters for updating a replication. Required. - :type replication_update_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns Replication - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Replication] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - registry_name: str, - replication_name: str, - replication_update_parameters: Union[_models.ReplicationUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.Replication]: - """Updates a replication for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param replication_name: The name of the replication. Required. - :type replication_name: str - :param replication_update_parameters: The parameters for updating a replication. Is either a - ReplicationUpdateParameters type or a IO[bytes] type. Required. - :type replication_update_parameters: - ~container_registry_management_client.models.ReplicationUpdateParameters or IO[bytes] - :return: An instance of AsyncLROPoller that returns Replication - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Replication] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Replication] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - replication_name=replication_name, - replication_update_parameters=replication_update_parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Replication", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.Replication].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.Replication]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, registry_name: str, replication_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_replications_delete_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - replication_name=replication_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, registry_name: str, replication_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes a replication from a container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param replication_name: The name of the replication. Required. - :type replication_name: str - :return: An instance of AsyncLROPoller that returns None - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - replication_name=replication_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - -class ScopeMapsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~container_registry_management_client.aio.ContainerRegistryManagementClient`'s - :attr:`scope_maps` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerRegistryManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> AsyncItemPaged["_models.ScopeMap"]: - """Lists all the scope maps for the specified container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :return: An iterator like instance of ScopeMap - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~container_registry_management_client.models.ScopeMap] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models._models.ScopeMapListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_scope_maps_list_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize( - _models._models.ScopeMapListResult, pipeline_response # pylint: disable=protected-access - ) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, resource_group_name: str, registry_name: str, scope_map_name: str, **kwargs: Any - ) -> _models.ScopeMap: - """Gets the properties of the specified scope map. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param scope_map_name: The name of the scope map. Required. - :type scope_map_name: str - :return: ScopeMap - :rtype: ~container_registry_management_client.models.ScopeMap - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.ScopeMap] = kwargs.pop("cls", None) - - _request = build_scope_maps_get_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - scope_map_name=scope_map_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize("ScopeMap", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_initial( - self, - resource_group_name: str, - registry_name: str, - scope_map_name: str, - scope_map_create_parameters: Union[_models.ScopeMap, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(scope_map_create_parameters, (IOBase, bytes)): - _content = scope_map_create_parameters - else: - _json = self._serialize.body(scope_map_create_parameters, "ScopeMap") - - _request = build_scope_maps_create_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - scope_map_name=scope_map_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create( - self, - resource_group_name: str, - registry_name: str, - scope_map_name: str, - scope_map_create_parameters: _models.ScopeMap, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ScopeMap]: - """Creates a scope map for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param scope_map_name: The name of the scope map. Required. - :type scope_map_name: str - :param scope_map_create_parameters: The parameters for creating a scope map. Required. - :type scope_map_create_parameters: ~container_registry_management_client.models.ScopeMap - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ScopeMap - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.ScopeMap] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create( - self, - resource_group_name: str, - registry_name: str, - scope_map_name: str, - scope_map_create_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ScopeMap]: - """Creates a scope map for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param scope_map_name: The name of the scope map. Required. - :type scope_map_name: str - :param scope_map_create_parameters: The parameters for creating a scope map. Required. - :type scope_map_create_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ScopeMap - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.ScopeMap] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create( - self, - resource_group_name: str, - registry_name: str, - scope_map_name: str, - scope_map_create_parameters: Union[_models.ScopeMap, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.ScopeMap]: - """Creates a scope map for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param scope_map_name: The name of the scope map. Required. - :type scope_map_name: str - :param scope_map_create_parameters: The parameters for creating a scope map. Is either a - ScopeMap type or a IO[bytes] type. Required. - :type scope_map_create_parameters: ~container_registry_management_client.models.ScopeMap or - IO[bytes] - :return: An instance of AsyncLROPoller that returns ScopeMap - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.ScopeMap] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ScopeMap] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - scope_map_name=scope_map_name, - scope_map_create_parameters=scope_map_create_parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ScopeMap", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ScopeMap].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ScopeMap]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _update_initial( - self, - resource_group_name: str, - registry_name: str, - scope_map_name: str, - scope_map_update_parameters: Union[_models.ScopeMapUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(scope_map_update_parameters, (IOBase, bytes)): - _content = scope_map_update_parameters - else: - _json = self._serialize.body(scope_map_update_parameters, "ScopeMapUpdateParameters") - - _request = build_scope_maps_update_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - scope_map_name=scope_map_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - registry_name: str, - scope_map_name: str, - scope_map_update_parameters: _models.ScopeMapUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ScopeMap]: - """Updates a scope map with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param scope_map_name: The name of the scope map. Required. - :type scope_map_name: str - :param scope_map_update_parameters: The parameters for updating a scope map. Required. - :type scope_map_update_parameters: - ~container_registry_management_client.models.ScopeMapUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ScopeMap - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.ScopeMap] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - registry_name: str, - scope_map_name: str, - scope_map_update_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ScopeMap]: - """Updates a scope map with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param scope_map_name: The name of the scope map. Required. - :type scope_map_name: str - :param scope_map_update_parameters: The parameters for updating a scope map. Required. - :type scope_map_update_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ScopeMap - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.ScopeMap] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - registry_name: str, - scope_map_name: str, - scope_map_update_parameters: Union[_models.ScopeMapUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.ScopeMap]: - """Updates a scope map with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param scope_map_name: The name of the scope map. Required. - :type scope_map_name: str - :param scope_map_update_parameters: The parameters for updating a scope map. Is either a - ScopeMapUpdateParameters type or a IO[bytes] type. Required. - :type scope_map_update_parameters: - ~container_registry_management_client.models.ScopeMapUpdateParameters or IO[bytes] - :return: An instance of AsyncLROPoller that returns ScopeMap - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.ScopeMap] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ScopeMap] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - scope_map_name=scope_map_name, - scope_map_update_parameters=scope_map_update_parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ScopeMap", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ScopeMap].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ScopeMap]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, registry_name: str, scope_map_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_scope_maps_delete_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - scope_map_name=scope_map_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, registry_name: str, scope_map_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes a scope map from a container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param scope_map_name: The name of the scope map. Required. - :type scope_map_name: str - :return: An instance of AsyncLROPoller that returns None - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - scope_map_name=scope_map_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - -class TokensOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~container_registry_management_client.aio.ContainerRegistryManagementClient`'s - :attr:`tokens` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerRegistryManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> AsyncItemPaged["_models.Token"]: - """Lists all the tokens for the specified container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :return: An iterator like instance of Token - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~container_registry_management_client.models.Token] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models._models.TokenListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_tokens_list_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize( - _models._models.TokenListResult, pipeline_response # pylint: disable=protected-access - ) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get(self, resource_group_name: str, registry_name: str, token_name: str, **kwargs: Any) -> _models.Token: - """Gets the properties of the specified token. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param token_name: The name of the token. Required. - :type token_name: str - :return: Token - :rtype: ~container_registry_management_client.models.Token - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.Token] = kwargs.pop("cls", None) - - _request = build_tokens_get_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - token_name=token_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize("Token", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_initial( - self, - resource_group_name: str, - registry_name: str, - token_name: str, - token_create_parameters: Union[_models.Token, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(token_create_parameters, (IOBase, bytes)): - _content = token_create_parameters - else: - _json = self._serialize.body(token_create_parameters, "Token") - - _request = build_tokens_create_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - token_name=token_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create( - self, - resource_group_name: str, - registry_name: str, - token_name: str, - token_create_parameters: _models.Token, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Token]: - """Creates a token for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param token_name: The name of the token. Required. - :type token_name: str - :param token_create_parameters: The parameters for creating a token. Required. - :type token_create_parameters: ~container_registry_management_client.models.Token - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns Token - :rtype: ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Token] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create( - self, - resource_group_name: str, - registry_name: str, - token_name: str, - token_create_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Token]: - """Creates a token for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param token_name: The name of the token. Required. - :type token_name: str - :param token_create_parameters: The parameters for creating a token. Required. - :type token_create_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns Token - :rtype: ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Token] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create( - self, - resource_group_name: str, - registry_name: str, - token_name: str, - token_create_parameters: Union[_models.Token, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.Token]: - """Creates a token for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param token_name: The name of the token. Required. - :type token_name: str - :param token_create_parameters: The parameters for creating a token. Is either a Token type or - a IO[bytes] type. Required. - :type token_create_parameters: ~container_registry_management_client.models.Token or IO[bytes] - :return: An instance of AsyncLROPoller that returns Token - :rtype: ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Token] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Token] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - token_name=token_name, - token_create_parameters=token_create_parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Token", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.Token].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.Token]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _update_initial( - self, - resource_group_name: str, - registry_name: str, - token_name: str, - token_update_parameters: Union[_models.TokenUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(token_update_parameters, (IOBase, bytes)): - _content = token_update_parameters - else: - _json = self._serialize.body(token_update_parameters, "TokenUpdateParameters") - - _request = build_tokens_update_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - token_name=token_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - registry_name: str, - token_name: str, - token_update_parameters: _models.TokenUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Token]: - """Updates a token with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param token_name: The name of the token. Required. - :type token_name: str - :param token_update_parameters: The parameters for updating a token. Required. - :type token_update_parameters: - ~container_registry_management_client.models.TokenUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns Token - :rtype: ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Token] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - registry_name: str, - token_name: str, - token_update_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Token]: - """Updates a token with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param token_name: The name of the token. Required. - :type token_name: str - :param token_update_parameters: The parameters for updating a token. Required. - :type token_update_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns Token - :rtype: ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Token] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - registry_name: str, - token_name: str, - token_update_parameters: Union[_models.TokenUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.Token]: - """Updates a token with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param token_name: The name of the token. Required. - :type token_name: str - :param token_update_parameters: The parameters for updating a token. Is either a - TokenUpdateParameters type or a IO[bytes] type. Required. - :type token_update_parameters: - ~container_registry_management_client.models.TokenUpdateParameters or IO[bytes] - :return: An instance of AsyncLROPoller that returns Token - :rtype: ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Token] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Token] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - token_name=token_name, - token_update_parameters=token_update_parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Token", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.Token].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.Token]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, registry_name: str, token_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_tokens_delete_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - token_name=token_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, registry_name: str, token_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes a token from a container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param token_name: The name of the token. Required. - :type token_name: str - :return: An instance of AsyncLROPoller that returns None - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - token_name=token_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - -class WebhooksOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~container_registry_management_client.aio.ContainerRegistryManagementClient`'s - :attr:`webhooks` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerRegistryManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> AsyncItemPaged["_models.Webhook"]: - """Lists all the webhooks for the specified container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :return: An iterator like instance of Webhook - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~container_registry_management_client.models.Webhook] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models._models.WebhookListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_webhooks_list_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize( - _models._models.WebhookListResult, pipeline_response # pylint: disable=protected-access - ) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, resource_group_name: str, registry_name: str, webhook_name: str, **kwargs: Any - ) -> _models.Webhook: - """Gets the properties of the specified webhook. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param webhook_name: The name of the webhook. Required. - :type webhook_name: str - :return: Webhook - :rtype: ~container_registry_management_client.models.Webhook - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.Webhook] = kwargs.pop("cls", None) - - _request = build_webhooks_get_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - webhook_name=webhook_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize("Webhook", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_initial( - self, - resource_group_name: str, - registry_name: str, - webhook_name: str, - webhook_create_parameters: Union[_models.WebhookCreateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(webhook_create_parameters, (IOBase, bytes)): - _content = webhook_create_parameters - else: - _json = self._serialize.body(webhook_create_parameters, "WebhookCreateParameters") - - _request = build_webhooks_create_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - webhook_name=webhook_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create( - self, - resource_group_name: str, - registry_name: str, - webhook_name: str, - webhook_create_parameters: _models.WebhookCreateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Webhook]: - """Creates a webhook for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param webhook_name: The name of the webhook. Required. - :type webhook_name: str - :param webhook_create_parameters: The parameters for creating a webhook. Required. - :type webhook_create_parameters: - ~container_registry_management_client.models.WebhookCreateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns Webhook - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Webhook] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create( - self, - resource_group_name: str, - registry_name: str, - webhook_name: str, - webhook_create_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Webhook]: - """Creates a webhook for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param webhook_name: The name of the webhook. Required. - :type webhook_name: str - :param webhook_create_parameters: The parameters for creating a webhook. Required. - :type webhook_create_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns Webhook - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Webhook] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create( - self, - resource_group_name: str, - registry_name: str, - webhook_name: str, - webhook_create_parameters: Union[_models.WebhookCreateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.Webhook]: - """Creates a webhook for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param webhook_name: The name of the webhook. Required. - :type webhook_name: str - :param webhook_create_parameters: The parameters for creating a webhook. Is either a - WebhookCreateParameters type or a IO[bytes] type. Required. - :type webhook_create_parameters: - ~container_registry_management_client.models.WebhookCreateParameters or IO[bytes] - :return: An instance of AsyncLROPoller that returns Webhook - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Webhook] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Webhook] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - webhook_name=webhook_name, - webhook_create_parameters=webhook_create_parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Webhook", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.Webhook].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.Webhook]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _update_initial( - self, - resource_group_name: str, - registry_name: str, - webhook_name: str, - webhook_update_parameters: Union[_models.WebhookUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(webhook_update_parameters, (IOBase, bytes)): - _content = webhook_update_parameters - else: - _json = self._serialize.body(webhook_update_parameters, "WebhookUpdateParameters") - - _request = build_webhooks_update_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - webhook_name=webhook_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - registry_name: str, - webhook_name: str, - webhook_update_parameters: _models.WebhookUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Webhook]: - """Updates a webhook with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param webhook_name: The name of the webhook. Required. - :type webhook_name: str - :param webhook_update_parameters: The parameters for updating a webhook. Required. - :type webhook_update_parameters: - ~container_registry_management_client.models.WebhookUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns Webhook - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Webhook] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - registry_name: str, - webhook_name: str, - webhook_update_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Webhook]: - """Updates a webhook with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param webhook_name: The name of the webhook. Required. - :type webhook_name: str - :param webhook_update_parameters: The parameters for updating a webhook. Required. - :type webhook_update_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns Webhook - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Webhook] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - registry_name: str, - webhook_name: str, - webhook_update_parameters: Union[_models.WebhookUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.Webhook]: - """Updates a webhook with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param webhook_name: The name of the webhook. Required. - :type webhook_name: str - :param webhook_update_parameters: The parameters for updating a webhook. Is either a - WebhookUpdateParameters type or a IO[bytes] type. Required. - :type webhook_update_parameters: - ~container_registry_management_client.models.WebhookUpdateParameters or IO[bytes] - :return: An instance of AsyncLROPoller that returns Webhook - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Webhook] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Webhook] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - webhook_name=webhook_name, - webhook_update_parameters=webhook_update_parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Webhook", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.Webhook].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.Webhook]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, registry_name: str, webhook_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_webhooks_delete_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - webhook_name=webhook_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, registry_name: str, webhook_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes a webhook from a container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param webhook_name: The name of the webhook. Required. - :type webhook_name: str - :return: An instance of AsyncLROPoller that returns None - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - webhook_name=webhook_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs), - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace_async - async def get_callback_config( - self, resource_group_name: str, registry_name: str, webhook_name: str, **kwargs: Any - ) -> _models.CallbackConfig: - """Gets the configuration of service URI and custom headers for the webhook. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param webhook_name: The name of the webhook. Required. - :type webhook_name: str - :return: CallbackConfig - :rtype: ~container_registry_management_client.models.CallbackConfig - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.CallbackConfig] = kwargs.pop("cls", None) - - _request = build_webhooks_get_callback_config_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - webhook_name=webhook_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize("CallbackConfig", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def list_events( - self, resource_group_name: str, registry_name: str, webhook_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.Event"]: - """Lists recent events for the specified webhook. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param webhook_name: The name of the webhook. Required. - :type webhook_name: str - :return: An iterator like instance of Event - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~container_registry_management_client.models.Event] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models._models.EventListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_webhooks_list_events_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - webhook_name=webhook_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize( - _models._models.EventListResult, pipeline_response # pylint: disable=protected-access - ) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def ping( - self, resource_group_name: str, registry_name: str, webhook_name: str, **kwargs: Any - ) -> _models.EventInfo: - """Triggers a ping event to be sent to the webhook. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param webhook_name: The name of the webhook. Required. - :type webhook_name: str - :return: EventInfo - :rtype: ~container_registry_management_client.models.EventInfo - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.EventInfo] = kwargs.pop("cls", None) - - _request = build_webhooks_ping_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - webhook_name=webhook_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize("EventInfo", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/aio/operations/_patch.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/aio/operations/_patch.py deleted file mode 100644 index 87676c65a8f..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/aio/operations/_patch.py +++ /dev/null @@ -1,21 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------- -"""Customize generated code here. - -Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize -""" - - -__all__: list[str] = [] # Add all objects you want publicly available to users at this package level - - -def patch_sdk(): - """Do not remove from this file. - - `patch_sdk` is a last resort escape hatch that allows you to do customizations - you can't accomplish using the techniques described in - https://aka.ms/azsdk/python/dpcodegen/python/customize - """ diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/models/__init__.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/models/__init__.py deleted file mode 100644 index 14bbdf73dcd..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/models/__init__.py +++ /dev/null @@ -1,386 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.8, generator: @autorest/python@6.49.1) -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -# pylint: disable=wrong-import-position - -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from ._patch import * # pylint: disable=unused-wildcard-import - - -from ._models import ( # type: ignore - ActivationProperties, - Actor, - Archive, - ArchivePackageSourceProperties, - ArchiveProperties, - ArchiveUpdateParameters, - ArchiveUpdateProperties, - ArchiveVersion, - ArchiveVersionProperties, - AuthCredential, - AzureADAuthenticationAsArmPolicy, - CacheRule, - CacheRuleProperties, - CacheRuleUpdateParameters, - CacheRuleUpdateProperties, - CallbackConfig, - ConnectedRegistry, - ConnectedRegistryProperties, - ConnectedRegistryUpdateParameters, - ConnectedRegistryUpdateProperties, - CredentialHealth, - CredentialSet, - CredentialSetProperties, - CredentialSetUpdateParameters, - CredentialSetUpdateProperties, - DebianArchivePackageSourceProperties, - DebianArchiveProperties, - EncryptionProperty, - ErrorAdditionalInfo, - ErrorDetail, - ErrorResponse, - Event, - EventContent, - EventInfo, - EventRequestMessage, - EventResponseMessage, - ExportPipeline, - ExportPipelineProperties, - ExportPipelineTargetProperties, - ExportPolicy, - GarbageCollectionProperties, - GenerateCredentialsParameters, - GenerateCredentialsResult, - IPRule, - IdentityProperties, - ImportImageParameters, - ImportPipeline, - ImportPipelineProperties, - ImportPipelineSourceProperties, - ImportSource, - ImportSourceCredentials, - KeyVaultProperties, - LoggingProperties, - LoginServerProperties, - NetworkRuleSet, - OperationDefinition, - OperationDisplayDefinition, - OperationLogSpecificationDefinition, - OperationMetricSpecificationDefinition, - OperationPropertiesDefinition, - OperationServiceSpecificationDefinition, - ParentProperties, - PipelineRun, - PipelineRunProperties, - PipelineRunRequest, - PipelineRunResponse, - PipelineRunSourceProperties, - PipelineRunTargetProperties, - PipelineSourceTriggerDescriptor, - PipelineSourceTriggerProperties, - PipelineTriggerDescriptor, - PipelineTriggerProperties, - Policies, - PrivateEndpoint, - PrivateEndpointConnection, - PrivateEndpointConnectionProperties, - PrivateLinkResource, - PrivateLinkResourceProperties, - PrivateLinkServiceConnectionState, - ProgressProperties, - ProxyResource, - QuarantinePolicy, - RegenerateCredentialParameters, - Registry, - RegistryListCredentialsResult, - RegistryNameCheckRequest, - RegistryNameStatus, - RegistryPassword, - RegistryProperties, - RegistryPropertiesUpdateParameters, - RegistrySyncResult, - RegistryUpdateParameters, - RegistryUsage, - RegistryUsageListResult, - Replication, - ReplicationProperties, - ReplicationUpdateParameters, - ReplicationUpdateParametersProperties, - Request, - Resource, - RetentionPolicy, - ScopeMap, - ScopeMapProperties, - ScopeMapPropertiesUpdateParameters, - ScopeMapUpdateParameters, - Sku, - SoftDeletePolicy, - Source, - Status, - StatusDetailProperties, - SyncProperties, - SyncUpdateProperties, - SystemData, - Target, - TlsCertificateProperties, - TlsProperties, - Token, - TokenCertificate, - TokenCredentialsProperties, - TokenPassword, - TokenProperties, - TokenUpdateParameters, - TokenUpdateProperties, - TrackedResource, - TrustPolicy, - UserIdentityProperties, - Webhook, - WebhookCreateParameters, - WebhookProperties, - WebhookPropertiesCreateParameters, - WebhookPropertiesUpdateParameters, - WebhookUpdateParameters, -) - -from ._enums import ( # type: ignore - Action, - ActionsRequired, - ActivationStatus, - AuditLogStatus, - AutoGeneratedDomainNameLabelScope, - AzureADAuthenticationAsArmPolicyStatus, - CertificateType, - ConnectedRegistryMode, - ConnectionState, - ConnectionStatus, - CreatedByType, - CredentialHealthStatus, - CredentialName, - DefaultAction, - EncryptionStatus, - EndpointProtocol, - ExportPolicyStatus, - ImportMode, - LogLevel, - MetadataSearch, - NetworkRuleBypassOptions, - PackageSourceType, - PasswordName, - PipelineOptions, - PipelineRunSourceType, - PipelineRunTargetType, - PipelineSourceType, - PolicyStatus, - ProvisioningState, - PublicNetworkAccess, - RegionalEndpoints, - RegistryUsageUnit, - ResourceIdentityType, - RoleAssignmentMode, - SkuName, - SkuTier, - StorageAccessMode, - SyncState, - SyncTrigger, - TlsStatus, - TokenCertificateName, - TokenPasswordName, - TokenStatus, - TriggerStatus, - TrustPolicyType, - WebhookAction, - WebhookStatus, - ZoneRedundancy, -) -from ._patch import __all__ as _patch_all -from ._patch import * -from ._patch import patch_sdk as _patch_sdk - -__all__ = [ - "ActivationProperties", - "Actor", - "Archive", - "ArchivePackageSourceProperties", - "ArchiveProperties", - "ArchiveUpdateParameters", - "ArchiveUpdateProperties", - "ArchiveVersion", - "ArchiveVersionProperties", - "AuthCredential", - "AzureADAuthenticationAsArmPolicy", - "CacheRule", - "CacheRuleProperties", - "CacheRuleUpdateParameters", - "CacheRuleUpdateProperties", - "CallbackConfig", - "ConnectedRegistry", - "ConnectedRegistryProperties", - "ConnectedRegistryUpdateParameters", - "ConnectedRegistryUpdateProperties", - "CredentialHealth", - "CredentialSet", - "CredentialSetProperties", - "CredentialSetUpdateParameters", - "CredentialSetUpdateProperties", - "DebianArchivePackageSourceProperties", - "DebianArchiveProperties", - "EncryptionProperty", - "ErrorAdditionalInfo", - "ErrorDetail", - "ErrorResponse", - "Event", - "EventContent", - "EventInfo", - "EventRequestMessage", - "EventResponseMessage", - "ExportPipeline", - "ExportPipelineProperties", - "ExportPipelineTargetProperties", - "ExportPolicy", - "GarbageCollectionProperties", - "GenerateCredentialsParameters", - "GenerateCredentialsResult", - "IPRule", - "IdentityProperties", - "ImportImageParameters", - "ImportPipeline", - "ImportPipelineProperties", - "ImportPipelineSourceProperties", - "ImportSource", - "ImportSourceCredentials", - "KeyVaultProperties", - "LoggingProperties", - "LoginServerProperties", - "NetworkRuleSet", - "OperationDefinition", - "OperationDisplayDefinition", - "OperationLogSpecificationDefinition", - "OperationMetricSpecificationDefinition", - "OperationPropertiesDefinition", - "OperationServiceSpecificationDefinition", - "ParentProperties", - "PipelineRun", - "PipelineRunProperties", - "PipelineRunRequest", - "PipelineRunResponse", - "PipelineRunSourceProperties", - "PipelineRunTargetProperties", - "PipelineSourceTriggerDescriptor", - "PipelineSourceTriggerProperties", - "PipelineTriggerDescriptor", - "PipelineTriggerProperties", - "Policies", - "PrivateEndpoint", - "PrivateEndpointConnection", - "PrivateEndpointConnectionProperties", - "PrivateLinkResource", - "PrivateLinkResourceProperties", - "PrivateLinkServiceConnectionState", - "ProgressProperties", - "ProxyResource", - "QuarantinePolicy", - "RegenerateCredentialParameters", - "Registry", - "RegistryListCredentialsResult", - "RegistryNameCheckRequest", - "RegistryNameStatus", - "RegistryPassword", - "RegistryProperties", - "RegistryPropertiesUpdateParameters", - "RegistrySyncResult", - "RegistryUpdateParameters", - "RegistryUsage", - "RegistryUsageListResult", - "Replication", - "ReplicationProperties", - "ReplicationUpdateParameters", - "ReplicationUpdateParametersProperties", - "Request", - "Resource", - "RetentionPolicy", - "ScopeMap", - "ScopeMapProperties", - "ScopeMapPropertiesUpdateParameters", - "ScopeMapUpdateParameters", - "Sku", - "SoftDeletePolicy", - "Source", - "Status", - "StatusDetailProperties", - "SyncProperties", - "SyncUpdateProperties", - "SystemData", - "Target", - "TlsCertificateProperties", - "TlsProperties", - "Token", - "TokenCertificate", - "TokenCredentialsProperties", - "TokenPassword", - "TokenProperties", - "TokenUpdateParameters", - "TokenUpdateProperties", - "TrackedResource", - "TrustPolicy", - "UserIdentityProperties", - "Webhook", - "WebhookCreateParameters", - "WebhookProperties", - "WebhookPropertiesCreateParameters", - "WebhookPropertiesUpdateParameters", - "WebhookUpdateParameters", - "Action", - "ActionsRequired", - "ActivationStatus", - "AuditLogStatus", - "AutoGeneratedDomainNameLabelScope", - "AzureADAuthenticationAsArmPolicyStatus", - "CertificateType", - "ConnectedRegistryMode", - "ConnectionState", - "ConnectionStatus", - "CreatedByType", - "CredentialHealthStatus", - "CredentialName", - "DefaultAction", - "EncryptionStatus", - "EndpointProtocol", - "ExportPolicyStatus", - "ImportMode", - "LogLevel", - "MetadataSearch", - "NetworkRuleBypassOptions", - "PackageSourceType", - "PasswordName", - "PipelineOptions", - "PipelineRunSourceType", - "PipelineRunTargetType", - "PipelineSourceType", - "PolicyStatus", - "ProvisioningState", - "PublicNetworkAccess", - "RegionalEndpoints", - "RegistryUsageUnit", - "ResourceIdentityType", - "RoleAssignmentMode", - "SkuName", - "SkuTier", - "StorageAccessMode", - "SyncState", - "SyncTrigger", - "TlsStatus", - "TokenCertificateName", - "TokenPasswordName", - "TokenStatus", - "TriggerStatus", - "TrustPolicyType", - "WebhookAction", - "WebhookStatus", - "ZoneRedundancy", -] -__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore -_patch_sdk() diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/models/_enums.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/models/_enums.py deleted file mode 100644 index 484cf43c57e..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/models/_enums.py +++ /dev/null @@ -1,391 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.8, generator: @autorest/python@6.49.1) -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum -from azure.core import CaseInsensitiveEnumMeta - - -class Action(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The action of IP ACL rule.""" - - ALLOW = "Allow" - - -class ActionsRequired(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """A message indicating if changes on the service provider require any updates on the consumer.""" - - NONE = "None" - RECREATE = "Recreate" - - -class ActivationStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The activation status of the connected registry.""" - - ACTIVE = "Active" - INACTIVE = "Inactive" - - -class AuditLogStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Indicates whether audit logs are enabled on the connected registry.""" - - ENABLED = "Enabled" - DISABLED = "Disabled" - - -class AutoGeneratedDomainNameLabelScope(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The auto generated domain name label of the container registry. This value defaults to - "Unsecure". - """ - - UNSECURE = "Unsecure" - TENANT_REUSE = "TenantReuse" - SUBSCRIPTION_REUSE = "SubscriptionReuse" - RESOURCE_GROUP_REUSE = "ResourceGroupReuse" - NO_REUSE = "NoReuse" - - -class AzureADAuthenticationAsArmPolicyStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The value that indicates whether the policy is enabled or not.""" - - ENABLED = "enabled" - DISABLED = "disabled" - - -class CertificateType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The type of certificate location.""" - - LOCAL_DIRECTORY = "LocalDirectory" - - -class ConnectedRegistryMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The mode of the connected registry resource that indicates the permissions of the registry.""" - - READ_WRITE = "ReadWrite" - READ_ONLY = "ReadOnly" - REGISTRY = "Registry" - MIRROR = "Mirror" - - -class ConnectionState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The current connection state of the connected registry.""" - - ONLINE = "Online" - OFFLINE = "Offline" - SYNCING = "Syncing" - UNHEALTHY = "Unhealthy" - - -class ConnectionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The private link service connection status.""" - - APPROVED = "Approved" - PENDING = "Pending" - REJECTED = "Rejected" - DISCONNECTED = "Disconnected" - - -class CreatedByType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The type of identity that created the resource.""" - - USER = "User" - APPLICATION = "Application" - MANAGED_IDENTITY = "ManagedIdentity" - KEY = "Key" - - -class CredentialHealthStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The health status of credential.""" - - HEALTHY = "Healthy" - UNHEALTHY = "Unhealthy" - - -class CredentialName(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The name of the credential.""" - - CREDENTIAL1 = "Credential1" - - -class DefaultAction(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The default action of allow or deny when no other rules match.""" - - ALLOW = "Allow" - DENY = "Deny" - - -class EncryptionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Indicates whether or not the encryption is enabled for container registry.""" - - ENABLED = "enabled" - DISABLED = "disabled" - - -class EndpointProtocol(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The connectivity protocol for the registry.""" - - I_PV4 = "IPv4" - """IPv4 connectivity only""" - I_PV4_AND_I_PV6 = "IPv4AndIPv6" - """IPv4 and IPv6 (dual stack) connectivity""" - - -class ExportPolicyStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The value that indicates whether the policy is enabled or not.""" - - ENABLED = "enabled" - DISABLED = "disabled" - - -class ImportMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """When Force, any existing target tags will be overwritten. When NoForce, any existing target - tags will fail the operation before any copying begins. - """ - - NO_FORCE = "NoForce" - FORCE = "Force" - - -class LogLevel(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The verbosity of logs persisted on the connected registry.""" - - DEBUG = "Debug" - INFORMATION = "Information" - WARNING = "Warning" - ERROR = "Error" - NONE = "None" - - -class MetadataSearch(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Determines whether registry artifacts are indexed for metadata search.""" - - ENABLED = "Enabled" - DISABLED = "Disabled" - - -class NetworkRuleBypassOptions(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Whether to allow trusted Azure services to access a network restricted registry.""" - - AZURE_SERVICES = "AzureServices" - NONE = "None" - - -class PackageSourceType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The type of package source for a archive.""" - - REMOTE = "remote" - - -class PasswordName(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The password name.""" - - PASSWORD = "password" - PASSWORD2 = "password2" - - -class PipelineOptions(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """PipelineOptions.""" - - OVERWRITE_TAGS = "OverwriteTags" - OVERWRITE_BLOBS = "OverwriteBlobs" - DELETE_SOURCE_BLOB_ON_SUCCESS = "DeleteSourceBlobOnSuccess" - CONTINUE_ON_ERRORS = "ContinueOnErrors" - - -class PipelineRunSourceType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The type of the source.""" - - AZURE_STORAGE_BLOB = "AzureStorageBlob" - - -class PipelineRunTargetType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The type of the target.""" - - AZURE_STORAGE_BLOB = "AzureStorageBlob" - - -class PipelineSourceType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The type of source for the import pipeline.""" - - AZURE_STORAGE_BLOB_CONTAINER = "AzureStorageBlobContainer" - - -class PolicyStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The value that indicates whether the policy is enabled or not.""" - - ENABLED = "enabled" - DISABLED = "disabled" - - -class ProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The provisioning state of the archive at the time the operation was called.""" - - CREATING = "Creating" - UPDATING = "Updating" - DELETING = "Deleting" - SUCCEEDED = "Succeeded" - FAILED = "Failed" - CANCELED = "Canceled" - - -class PublicNetworkAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Whether or not public network access is allowed for the container registry.""" - - ENABLED = "Enabled" - DISABLED = "Disabled" - - -class RegionalEndpoints(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Whether or not per-region endpoints are enabled for accessing the registry.""" - - ENABLED = "Enabled" - """Regional endpoints are enabled.""" - DISABLED = "Disabled" - """Regional endpoints are disabled.""" - - -class RegistryUsageUnit(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The unit of measurement.""" - - COUNT = "Count" - BYTES = "Bytes" - - -class ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The identity type.""" - - SYSTEM_ASSIGNED = "SystemAssigned" - USER_ASSIGNED = "UserAssigned" - SYSTEM_ASSIGNED_USER_ASSIGNED = "SystemAssigned, UserAssigned" - NONE = "None" - - -class RoleAssignmentMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Determines registry role assignment mode.""" - - ABAC_REPOSITORY_PERMISSIONS = "AbacRepositoryPermissions" - LEGACY_REGISTRY_PERMISSIONS = "LegacyRegistryPermissions" - - -class SkuName(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The SKU name of the container registry. Required for registry creation.""" - - CLASSIC = "Classic" - BASIC = "Basic" - STANDARD = "Standard" - PREMIUM = "Premium" - - -class SkuTier(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The SKU tier based on the SKU name.""" - - CLASSIC = "Classic" - BASIC = "Basic" - STANDARD = "Standard" - PREMIUM = "Premium" - - -class StorageAccessMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The storage access mode used for the customer storage account.""" - - MANAGED_IDENTITY = "ManagedIdentity" - """Managed Identity access mode""" - SAS_TOKEN = "SasToken" - """SAS Token access mode""" - - -class SyncState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The action that triggered the most recent registry sync.""" - - NOT_ACTIVATED = "NotActivated" - """Connected Registry is not activated""" - SYNCING = "Syncing" - """Connected Registry is syncing""" - FAILED = "Failed" - """Connected Registry sync failed""" - SUCCEEDED = "Succeeded" - """Connected Registry sync succeeded""" - TIMED_OUT = "TimedOut" - """Connected Registry sync timed out""" - PENDING = "Pending" - """Connected Registry sync is pending""" - - -class SyncTrigger(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The status of the connected registry's most recent sync.""" - - SYNC_TOKEN_UPDATE = "SyncTokenUpdate" - """Connected Registry sync was triggered by a sync token update""" - INITIAL_SYNC = "InitialSync" - """Connected Registry sync was triggered by an initial sync during activation""" - MANUAL_RESYNC = "ManualResync" - """Connected Registry sync was triggered by a manual resync request""" - RECOVERY_SERVICE = "RecoveryService" - """Connected Registry sync was triggered by the Connected Registry's recovery service""" - - -class TlsStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Indicates whether HTTPS is enabled for the login server.""" - - ENABLED = "Enabled" - DISABLED = "Disabled" - - -class TokenCertificateName(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """TokenCertificateName.""" - - CERTIFICATE1 = "certificate1" - CERTIFICATE2 = "certificate2" - - -class TokenPasswordName(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The password name "password1" or "password2".""" - - PASSWORD1 = "password1" - PASSWORD2 = "password2" - - -class TokenStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The status of the token example enabled or disabled.""" - - ENABLED = "enabled" - DISABLED = "disabled" - - -class TriggerStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The current status of the source trigger.""" - - ENABLED = "Enabled" - DISABLED = "Disabled" - - -class TrustPolicyType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The type of trust policy.""" - - NOTARY = "Notary" - - -class WebhookAction(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """WebhookAction.""" - - PUSH = "push" - DELETE = "delete" - QUARANTINE = "quarantine" - CHART_PUSH = "chart_push" - CHART_DELETE = "chart_delete" - - -class WebhookStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The status of the webhook at the time the operation was called.""" - - ENABLED = "enabled" - DISABLED = "disabled" - - -class ZoneRedundancy(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Whether or not zone redundancy is enabled for this container registry.""" - - ENABLED = "Enabled" - DISABLED = "Disabled" diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/models/_models.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/models/_models.py deleted file mode 100644 index 04aaf762676..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/models/_models.py +++ /dev/null @@ -1,6514 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.8, generator: @autorest/python@6.49.1) -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from collections.abc import MutableMapping -import datetime -from typing import Any, Optional, TYPE_CHECKING, Union - -from .._utils import serialization as _serialization - -if TYPE_CHECKING: - from .. import models as _models -JSON = MutableMapping[str, Any] - - -class ActivationProperties(_serialization.Model): - """The activation properties of the connected registry. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar status: The activation status of the connected registry. Known values are: "Active" and - "Inactive". - :vartype status: str or ~container_registry_management_client.models.ActivationStatus - """ - - _validation = { - "status": {"readonly": True}, - } - - _attribute_map = { - "status": {"key": "status", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.status: Optional[Union[str, "_models.ActivationStatus"]] = None - - -class Actor(_serialization.Model): - """The agent that initiated the event. For most situations, this could be from the authorization - context of the request. - - :ivar name: The subject or username associated with the request context that generated the - event. - :vartype name: str - """ - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - } - - def __init__(self, *, name: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword name: The subject or username associated with the request context that generated the - event. - :paramtype name: str - """ - super().__init__(**kwargs) - self.name = name - - -class Resource(_serialization.Model): - """Common fields that are returned in the response for all Azure Resource Manager resources. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~container_registry_management_client.models.SystemData - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.id: Optional[str] = None - self.name: Optional[str] = None - self.type: Optional[str] = None - self.system_data: Optional["_models.SystemData"] = None - - -class ProxyResource(Resource): - """The resource model definition for a Azure Resource Manager proxy resource. It will not have - tags and a location. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~container_registry_management_client.models.SystemData - """ - - -class Archive(ProxyResource): - """An object that represents a archive for a container registry. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~container_registry_management_client.models.SystemData - :ivar properties: The properties of the archive. - :vartype properties: ~container_registry_management_client.models.ArchiveProperties - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "properties": {"key": "properties", "type": "ArchiveProperties"}, - } - - def __init__(self, *, properties: Optional["_models.ArchiveProperties"] = None, **kwargs: Any) -> None: - """ - :keyword properties: The properties of the archive. - :paramtype properties: ~container_registry_management_client.models.ArchiveProperties - """ - super().__init__(**kwargs) - self.properties = properties - - -class ArchiveListResult(_serialization.Model): - """The result of a request to list archives for a container registry. - - :ivar value: The list of archives. Since this list may be incomplete, the nextLink field should - be used to request the next list of archives. - :vartype value: list[~container_registry_management_client.models.Archive] - :ivar next_link: The URI that can be used to request the next list of archives. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[Archive]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, *, value: Optional[list["_models.Archive"]] = None, next_link: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword value: The list of archives. Since this list may be incomplete, the nextLink field - should be used to request the next list of archives. - :paramtype value: list[~container_registry_management_client.models.Archive] - :keyword next_link: The URI that can be used to request the next list of archives. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class ArchivePackageSourceProperties(_serialization.Model): - """The properties of the archive package source. - - :ivar type: The type of package source for a archive. "remote" - :vartype type: str or ~container_registry_management_client.models.PackageSourceType - :ivar url: The external repository url. - :vartype url: str - """ - - _attribute_map = { - "type": {"key": "type", "type": "str"}, - "url": {"key": "url", "type": "str"}, - } - - def __init__( - self, - *, - type: Optional[Union[str, "_models.PackageSourceType"]] = None, - url: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword type: The type of package source for a archive. "remote" - :paramtype type: str or ~container_registry_management_client.models.PackageSourceType - :keyword url: The external repository url. - :paramtype url: str - """ - super().__init__(**kwargs) - self.type = type - self.url = url - - -class ArchiveProperties(_serialization.Model): - """The properties of a archive. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar package_source: The package source of the archive. - :vartype package_source: - ~container_registry_management_client.models.ArchivePackageSourceProperties - :ivar published_version: The published version of the archive. - :vartype published_version: str - :ivar repository_endpoint_prefix: - :vartype repository_endpoint_prefix: str - :ivar repository_endpoint: - :vartype repository_endpoint: str - :ivar provisioning_state: The provisioning state of the archive at the time the operation was - called. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and - "Canceled". - :vartype provisioning_state: str or - ~container_registry_management_client.models.ProvisioningState - """ - - _validation = { - "repository_endpoint": {"readonly": True}, - "provisioning_state": {"readonly": True}, - } - - _attribute_map = { - "package_source": {"key": "packageSource", "type": "ArchivePackageSourceProperties"}, - "published_version": {"key": "publishedVersion", "type": "str"}, - "repository_endpoint_prefix": {"key": "repositoryEndpointPrefix", "type": "str"}, - "repository_endpoint": {"key": "repositoryEndpoint", "type": "str"}, - "provisioning_state": {"key": "provisioningState", "type": "str"}, - } - - def __init__( - self, - *, - package_source: Optional["_models.ArchivePackageSourceProperties"] = None, - published_version: Optional[str] = None, - repository_endpoint_prefix: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword package_source: The package source of the archive. - :paramtype package_source: - ~container_registry_management_client.models.ArchivePackageSourceProperties - :keyword published_version: The published version of the archive. - :paramtype published_version: str - :keyword repository_endpoint_prefix: - :paramtype repository_endpoint_prefix: str - """ - super().__init__(**kwargs) - self.package_source = package_source - self.published_version = published_version - self.repository_endpoint_prefix = repository_endpoint_prefix - self.repository_endpoint: Optional[str] = None - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - - -class ArchiveUpdateParameters(_serialization.Model): - """The parameters for updating a archive. - - :ivar properties: The properties of the connected registry update parameters. - :vartype properties: ~container_registry_management_client.models.ArchiveUpdateProperties - """ - - _attribute_map = { - "properties": {"key": "properties", "type": "ArchiveUpdateProperties"}, - } - - def __init__(self, *, properties: Optional["_models.ArchiveUpdateProperties"] = None, **kwargs: Any) -> None: - """ - :keyword properties: The properties of the connected registry update parameters. - :paramtype properties: ~container_registry_management_client.models.ArchiveUpdateProperties - """ - super().__init__(**kwargs) - self.properties = properties - - -class ArchiveUpdateProperties(_serialization.Model): - """The properties of a archive. - - :ivar published_version: The published version of the archive. - :vartype published_version: str - """ - - _attribute_map = { - "published_version": {"key": "publishedVersion", "type": "str"}, - } - - def __init__(self, *, published_version: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword published_version: The published version of the archive. - :paramtype published_version: str - """ - super().__init__(**kwargs) - self.published_version = published_version - - -class ArchiveVersion(ProxyResource): - """An object that represents an export pipeline for a container registry. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~container_registry_management_client.models.SystemData - :ivar properties: The properties of the archive. - :vartype properties: ~container_registry_management_client.models.ArchiveVersionProperties - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "properties": {"key": "properties", "type": "ArchiveVersionProperties"}, - } - - def __init__(self, *, properties: Optional["_models.ArchiveVersionProperties"] = None, **kwargs: Any) -> None: - """ - :keyword properties: The properties of the archive. - :paramtype properties: ~container_registry_management_client.models.ArchiveVersionProperties - """ - super().__init__(**kwargs) - self.properties = properties - - -class ArchiveVersionListResult(_serialization.Model): - """The result of a request to list archive versions for a container registry. - - :ivar value: The list of archive versions. Since this list may be incomplete, the nextLink - field should be used to request the next list of archive versions. - :vartype value: list[~container_registry_management_client.models.ArchiveVersion] - :ivar next_link: The URI that can be used to request the next list of archive versions. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[ArchiveVersion]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, *, value: Optional[list["_models.ArchiveVersion"]] = None, next_link: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword value: The list of archive versions. Since this list may be incomplete, the nextLink - field should be used to request the next list of archive versions. - :paramtype value: list[~container_registry_management_client.models.ArchiveVersion] - :keyword next_link: The URI that can be used to request the next list of archive versions. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class ArchiveVersionProperties(_serialization.Model): - """The properties of an archive version. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar provisioning_state: The provisioning state of the archive at the time the operation was - called. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and - "Canceled". - :vartype provisioning_state: str or - ~container_registry_management_client.models.ProvisioningState - :ivar archive_version_error_message: The detailed error message for the archive version in the - case of failure. - :vartype archive_version_error_message: str - """ - - _validation = { - "provisioning_state": {"readonly": True}, - } - - _attribute_map = { - "provisioning_state": {"key": "provisioningState", "type": "str"}, - "archive_version_error_message": {"key": "archiveVersionErrorMessage", "type": "str"}, - } - - def __init__(self, *, archive_version_error_message: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword archive_version_error_message: The detailed error message for the archive version in - the case of failure. - :paramtype archive_version_error_message: str - """ - super().__init__(**kwargs) - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - self.archive_version_error_message = archive_version_error_message - - -class AuthCredential(_serialization.Model): - """Authentication credential stored for an upstream. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: The name of the credential. "Credential1" - :vartype name: str or ~container_registry_management_client.models.CredentialName - :ivar username_secret_identifier: KeyVault Secret URI for accessing the username. - :vartype username_secret_identifier: str - :ivar password_secret_identifier: KeyVault Secret URI for accessing the password. - :vartype password_secret_identifier: str - :ivar credential_health: This provides data pertaining to the health of the auth credential. - :vartype credential_health: ~container_registry_management_client.models.CredentialHealth - """ - - _validation = { - "credential_health": {"readonly": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "username_secret_identifier": {"key": "usernameSecretIdentifier", "type": "str"}, - "password_secret_identifier": {"key": "passwordSecretIdentifier", "type": "str"}, - "credential_health": {"key": "credentialHealth", "type": "CredentialHealth"}, - } - - def __init__( - self, - *, - name: Optional[Union[str, "_models.CredentialName"]] = None, - username_secret_identifier: Optional[str] = None, - password_secret_identifier: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword name: The name of the credential. "Credential1" - :paramtype name: str or ~container_registry_management_client.models.CredentialName - :keyword username_secret_identifier: KeyVault Secret URI for accessing the username. - :paramtype username_secret_identifier: str - :keyword password_secret_identifier: KeyVault Secret URI for accessing the password. - :paramtype password_secret_identifier: str - """ - super().__init__(**kwargs) - self.name = name - self.username_secret_identifier = username_secret_identifier - self.password_secret_identifier = password_secret_identifier - self.credential_health: Optional["_models.CredentialHealth"] = None - - -class AzureADAuthenticationAsArmPolicy(_serialization.Model): - """The policy for using Azure Resource Manager audience token for a container registry. - - :ivar status: The value that indicates whether the policy is enabled or not. Known values are: - "enabled" and "disabled". - :vartype status: str or - ~container_registry_management_client.models.AzureADAuthenticationAsArmPolicyStatus - """ - - _attribute_map = { - "status": {"key": "status", "type": "str"}, - } - - def __init__( - self, *, status: Union[str, "_models.AzureADAuthenticationAsArmPolicyStatus"] = "enabled", **kwargs: Any - ) -> None: - """ - :keyword status: The value that indicates whether the policy is enabled or not. Known values - are: "enabled" and "disabled". - :paramtype status: str or - ~container_registry_management_client.models.AzureADAuthenticationAsArmPolicyStatus - """ - super().__init__(**kwargs) - self.status = status - - -class CacheRule(ProxyResource): - """An object that represents a cache rule for a container registry. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~container_registry_management_client.models.SystemData - :ivar properties: The properties of the cache rule. - :vartype properties: ~container_registry_management_client.models.CacheRuleProperties - :ivar identity: The identity of the cache rule. - :vartype identity: ~container_registry_management_client.models.IdentityProperties - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "properties": {"key": "properties", "type": "CacheRuleProperties"}, - "identity": {"key": "identity", "type": "IdentityProperties"}, - } - - def __init__( - self, - *, - properties: Optional["_models.CacheRuleProperties"] = None, - identity: Optional["_models.IdentityProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword properties: The properties of the cache rule. - :paramtype properties: ~container_registry_management_client.models.CacheRuleProperties - :keyword identity: The identity of the cache rule. - :paramtype identity: ~container_registry_management_client.models.IdentityProperties - """ - super().__init__(**kwargs) - self.properties = properties - self.identity = identity - - -class CacheRuleProperties(_serialization.Model): - """The properties of a cache rule. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar credential_set_resource_id: The ARM resource ID of the credential store which is - associated with the cache rule. - :vartype credential_set_resource_id: str - :ivar source_repository: Source repository pulled from upstream. - :vartype source_repository: str - :ivar target_repository: Target repository specified in docker pull command. Eg: docker pull - myregistry.azurecr.io/{targetRepository}:{tag}. - :vartype target_repository: str - :ivar creation_date: The creation date of the cache rule. - :vartype creation_date: ~datetime.datetime - :ivar provisioning_state: Provisioning state of the resource. Known values are: "Creating", - "Updating", "Deleting", "Succeeded", "Failed", and "Canceled". - :vartype provisioning_state: str or - ~container_registry_management_client.models.ProvisioningState - """ - - _validation = { - "creation_date": {"readonly": True}, - "provisioning_state": {"readonly": True}, - } - - _attribute_map = { - "credential_set_resource_id": {"key": "credentialSetResourceId", "type": "str"}, - "source_repository": {"key": "sourceRepository", "type": "str"}, - "target_repository": {"key": "targetRepository", "type": "str"}, - "creation_date": {"key": "creationDate", "type": "iso-8601"}, - "provisioning_state": {"key": "provisioningState", "type": "str"}, - } - - def __init__( - self, - *, - credential_set_resource_id: Optional[str] = None, - source_repository: Optional[str] = None, - target_repository: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword credential_set_resource_id: The ARM resource ID of the credential store which is - associated with the cache rule. - :paramtype credential_set_resource_id: str - :keyword source_repository: Source repository pulled from upstream. - :paramtype source_repository: str - :keyword target_repository: Target repository specified in docker pull command. Eg: docker pull - myregistry.azurecr.io/{targetRepository}:{tag}. - :paramtype target_repository: str - """ - super().__init__(**kwargs) - self.credential_set_resource_id = credential_set_resource_id - self.source_repository = source_repository - self.target_repository = target_repository - self.creation_date: Optional[datetime.datetime] = None - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - - -class CacheRulesListResult(_serialization.Model): - """The result of a request to list cache rules for a container registry. - - :ivar value: The list of cache rules. Since this list may be incomplete, the nextLink field - should be used to request the next list of cache rules. - :vartype value: list[~container_registry_management_client.models.CacheRule] - :ivar next_link: The URI that can be used to request the next list of cache rules. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[CacheRule]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, *, value: Optional[list["_models.CacheRule"]] = None, next_link: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword value: The list of cache rules. Since this list may be incomplete, the nextLink field - should be used to request the next list of cache rules. - :paramtype value: list[~container_registry_management_client.models.CacheRule] - :keyword next_link: The URI that can be used to request the next list of cache rules. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class CacheRuleUpdateParameters(_serialization.Model): - """The parameters for updating a cache rule. - - :ivar properties: The properties of the cache rule update parameters. - :vartype properties: ~container_registry_management_client.models.CacheRuleUpdateProperties - :ivar identity: The identity of the cache rule. - :vartype identity: ~container_registry_management_client.models.IdentityProperties - """ - - _attribute_map = { - "properties": {"key": "properties", "type": "CacheRuleUpdateProperties"}, - "identity": {"key": "identity", "type": "IdentityProperties"}, - } - - def __init__( - self, - *, - properties: Optional["_models.CacheRuleUpdateProperties"] = None, - identity: Optional["_models.IdentityProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword properties: The properties of the cache rule update parameters. - :paramtype properties: ~container_registry_management_client.models.CacheRuleUpdateProperties - :keyword identity: The identity of the cache rule. - :paramtype identity: ~container_registry_management_client.models.IdentityProperties - """ - super().__init__(**kwargs) - self.properties = properties - self.identity = identity - - -class CacheRuleUpdateProperties(_serialization.Model): - """The parameters for updating cache rule properties. - - :ivar credential_set_resource_id: The ARM resource ID of the credential store which is - associated with the Cache rule. - :vartype credential_set_resource_id: str - """ - - _attribute_map = { - "credential_set_resource_id": {"key": "credentialSetResourceId", "type": "str"}, - } - - def __init__(self, *, credential_set_resource_id: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword credential_set_resource_id: The ARM resource ID of the credential store which is - associated with the Cache rule. - :paramtype credential_set_resource_id: str - """ - super().__init__(**kwargs) - self.credential_set_resource_id = credential_set_resource_id - - -class CallbackConfig(_serialization.Model): - """The configuration of service URI and custom headers for the webhook. - - All required parameters must be populated in order to send to server. - - :ivar service_uri: The service URI for the webhook to post notifications. Required. - :vartype service_uri: str - :ivar custom_headers: Custom headers that will be added to the webhook notifications. - :vartype custom_headers: dict[str, str] - """ - - _validation = { - "service_uri": {"required": True}, - } - - _attribute_map = { - "service_uri": {"key": "serviceUri", "type": "str"}, - "custom_headers": {"key": "customHeaders", "type": "{str}"}, - } - - def __init__(self, *, service_uri: str, custom_headers: Optional[dict[str, str]] = None, **kwargs: Any) -> None: - """ - :keyword service_uri: The service URI for the webhook to post notifications. Required. - :paramtype service_uri: str - :keyword custom_headers: Custom headers that will be added to the webhook notifications. - :paramtype custom_headers: dict[str, str] - """ - super().__init__(**kwargs) - self.service_uri = service_uri - self.custom_headers = custom_headers - - -class ConnectedRegistry(ProxyResource): - """An object that represents a connected registry for a container registry. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~container_registry_management_client.models.SystemData - :ivar properties: The properties of the connected registry. - :vartype properties: ~container_registry_management_client.models.ConnectedRegistryProperties - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "properties": {"key": "properties", "type": "ConnectedRegistryProperties"}, - } - - def __init__(self, *, properties: Optional["_models.ConnectedRegistryProperties"] = None, **kwargs: Any) -> None: - """ - :keyword properties: The properties of the connected registry. - :paramtype properties: ~container_registry_management_client.models.ConnectedRegistryProperties - """ - super().__init__(**kwargs) - self.properties = properties - - -class ConnectedRegistryListResult(_serialization.Model): - """The result of a request to list connected registries for a container registry. - - :ivar value: The list of connected registries. Since this list may be incomplete, the nextLink - field should be used to request the next list of connected registries. - :vartype value: list[~container_registry_management_client.models.ConnectedRegistry] - :ivar next_link: The URI that can be used to request the next list of connected registries. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[ConnectedRegistry]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.ConnectedRegistry"]] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: The list of connected registries. Since this list may be incomplete, the - nextLink field should be used to request the next list of connected registries. - :paramtype value: list[~container_registry_management_client.models.ConnectedRegistry] - :keyword next_link: The URI that can be used to request the next list of connected registries. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class ConnectedRegistryProperties(_serialization.Model): - """The properties of a connected registry. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :ivar provisioning_state: Provisioning state of the resource. Known values are: "Creating", - "Updating", "Deleting", "Succeeded", "Failed", and "Canceled". - :vartype provisioning_state: str or - ~container_registry_management_client.models.ProvisioningState - :ivar mode: The mode of the connected registry resource that indicates the permissions of the - registry. Required. Known values are: "ReadWrite", "ReadOnly", "Registry", and "Mirror". - :vartype mode: str or ~container_registry_management_client.models.ConnectedRegistryMode - :ivar version: The current version of ACR runtime on the connected registry. - :vartype version: str - :ivar connection_state: The current connection state of the connected registry. Known values - are: "Online", "Offline", "Syncing", and "Unhealthy". - :vartype connection_state: str or ~container_registry_management_client.models.ConnectionState - :ivar last_activity_time: The last activity time of the connected registry. - :vartype last_activity_time: ~datetime.datetime - :ivar activation: The activation properties of the connected registry. - :vartype activation: ~container_registry_management_client.models.ActivationProperties - :ivar parent: The parent of the connected registry. Required. - :vartype parent: ~container_registry_management_client.models.ParentProperties - :ivar client_token_ids: The list of the ACR token resource IDs used to authenticate clients to - the connected registry. - :vartype client_token_ids: list[str] - :ivar login_server: The login server properties of the connected registry. - :vartype login_server: ~container_registry_management_client.models.LoginServerProperties - :ivar logging: The logging properties of the connected registry. - :vartype logging: ~container_registry_management_client.models.LoggingProperties - :ivar status_details: The list of current statuses of the connected registry. - :vartype status_details: - list[~container_registry_management_client.models.StatusDetailProperties] - :ivar notifications_list: The list of notifications subscription information for the connected - registry. - :vartype notifications_list: list[str] - :ivar garbage_collection: The garbage collection properties of the connected registry. - :vartype garbage_collection: - ~container_registry_management_client.models.GarbageCollectionProperties - :ivar registry_sync_result: The result of the connected registry's most recent sync with its - parent. - :vartype registry_sync_result: ~container_registry_management_client.models.RegistrySyncResult - """ - - _validation = { - "provisioning_state": {"readonly": True}, - "mode": {"required": True}, - "version": {"readonly": True}, - "connection_state": {"readonly": True}, - "last_activity_time": {"readonly": True}, - "activation": {"readonly": True}, - "parent": {"required": True}, - "status_details": {"readonly": True}, - } - - _attribute_map = { - "provisioning_state": {"key": "provisioningState", "type": "str"}, - "mode": {"key": "mode", "type": "str"}, - "version": {"key": "version", "type": "str"}, - "connection_state": {"key": "connectionState", "type": "str"}, - "last_activity_time": {"key": "lastActivityTime", "type": "iso-8601"}, - "activation": {"key": "activation", "type": "ActivationProperties"}, - "parent": {"key": "parent", "type": "ParentProperties"}, - "client_token_ids": {"key": "clientTokenIds", "type": "[str]"}, - "login_server": {"key": "loginServer", "type": "LoginServerProperties"}, - "logging": {"key": "logging", "type": "LoggingProperties"}, - "status_details": {"key": "statusDetails", "type": "[StatusDetailProperties]"}, - "notifications_list": {"key": "notificationsList", "type": "[str]"}, - "garbage_collection": {"key": "garbageCollection", "type": "GarbageCollectionProperties"}, - "registry_sync_result": {"key": "registrySyncResult", "type": "RegistrySyncResult"}, - } - - def __init__( - self, - *, - mode: Union[str, "_models.ConnectedRegistryMode"], - parent: "_models.ParentProperties", - client_token_ids: Optional[list[str]] = None, - login_server: Optional["_models.LoginServerProperties"] = None, - logging: Optional["_models.LoggingProperties"] = None, - notifications_list: Optional[list[str]] = None, - garbage_collection: Optional["_models.GarbageCollectionProperties"] = None, - registry_sync_result: Optional["_models.RegistrySyncResult"] = None, - **kwargs: Any - ) -> None: - """ - :keyword mode: The mode of the connected registry resource that indicates the permissions of - the registry. Required. Known values are: "ReadWrite", "ReadOnly", "Registry", and "Mirror". - :paramtype mode: str or ~container_registry_management_client.models.ConnectedRegistryMode - :keyword parent: The parent of the connected registry. Required. - :paramtype parent: ~container_registry_management_client.models.ParentProperties - :keyword client_token_ids: The list of the ACR token resource IDs used to authenticate clients - to the connected registry. - :paramtype client_token_ids: list[str] - :keyword login_server: The login server properties of the connected registry. - :paramtype login_server: ~container_registry_management_client.models.LoginServerProperties - :keyword logging: The logging properties of the connected registry. - :paramtype logging: ~container_registry_management_client.models.LoggingProperties - :keyword notifications_list: The list of notifications subscription information for the - connected registry. - :paramtype notifications_list: list[str] - :keyword garbage_collection: The garbage collection properties of the connected registry. - :paramtype garbage_collection: - ~container_registry_management_client.models.GarbageCollectionProperties - :keyword registry_sync_result: The result of the connected registry's most recent sync with its - parent. - :paramtype registry_sync_result: - ~container_registry_management_client.models.RegistrySyncResult - """ - super().__init__(**kwargs) - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - self.mode = mode - self.version: Optional[str] = None - self.connection_state: Optional[Union[str, "_models.ConnectionState"]] = None - self.last_activity_time: Optional[datetime.datetime] = None - self.activation: Optional["_models.ActivationProperties"] = None - self.parent = parent - self.client_token_ids = client_token_ids - self.login_server = login_server - self.logging = logging - self.status_details: Optional[list["_models.StatusDetailProperties"]] = None - self.notifications_list = notifications_list - self.garbage_collection = garbage_collection - self.registry_sync_result = registry_sync_result - - -class ConnectedRegistryUpdateParameters(_serialization.Model): - """The parameters for updating a connected registry. - - :ivar properties: The properties of the connected registry update parameters. - :vartype properties: - ~container_registry_management_client.models.ConnectedRegistryUpdateProperties - """ - - _attribute_map = { - "properties": {"key": "properties", "type": "ConnectedRegistryUpdateProperties"}, - } - - def __init__( - self, *, properties: Optional["_models.ConnectedRegistryUpdateProperties"] = None, **kwargs: Any - ) -> None: - """ - :keyword properties: The properties of the connected registry update parameters. - :paramtype properties: - ~container_registry_management_client.models.ConnectedRegistryUpdateProperties - """ - super().__init__(**kwargs) - self.properties = properties - - -class ConnectedRegistryUpdateProperties(_serialization.Model): - """The parameters for updating token properties. - - :ivar sync_properties: The sync properties of the connected registry with its parent. - :vartype sync_properties: ~container_registry_management_client.models.SyncUpdateProperties - :ivar logging: The logging properties of the connected registry. - :vartype logging: ~container_registry_management_client.models.LoggingProperties - :ivar client_token_ids: The list of the ACR token resource IDs used to authenticate clients to - the connected registry. - :vartype client_token_ids: list[str] - :ivar notifications_list: The list of notifications subscription information for the connected - registry. - :vartype notifications_list: list[str] - :ivar garbage_collection: The garbage collection properties of the connected registry. - :vartype garbage_collection: - ~container_registry_management_client.models.GarbageCollectionProperties - """ - - _attribute_map = { - "sync_properties": {"key": "syncProperties", "type": "SyncUpdateProperties"}, - "logging": {"key": "logging", "type": "LoggingProperties"}, - "client_token_ids": {"key": "clientTokenIds", "type": "[str]"}, - "notifications_list": {"key": "notificationsList", "type": "[str]"}, - "garbage_collection": {"key": "garbageCollection", "type": "GarbageCollectionProperties"}, - } - - def __init__( - self, - *, - sync_properties: Optional["_models.SyncUpdateProperties"] = None, - logging: Optional["_models.LoggingProperties"] = None, - client_token_ids: Optional[list[str]] = None, - notifications_list: Optional[list[str]] = None, - garbage_collection: Optional["_models.GarbageCollectionProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword sync_properties: The sync properties of the connected registry with its parent. - :paramtype sync_properties: ~container_registry_management_client.models.SyncUpdateProperties - :keyword logging: The logging properties of the connected registry. - :paramtype logging: ~container_registry_management_client.models.LoggingProperties - :keyword client_token_ids: The list of the ACR token resource IDs used to authenticate clients - to the connected registry. - :paramtype client_token_ids: list[str] - :keyword notifications_list: The list of notifications subscription information for the - connected registry. - :paramtype notifications_list: list[str] - :keyword garbage_collection: The garbage collection properties of the connected registry. - :paramtype garbage_collection: - ~container_registry_management_client.models.GarbageCollectionProperties - """ - super().__init__(**kwargs) - self.sync_properties = sync_properties - self.logging = logging - self.client_token_ids = client_token_ids - self.notifications_list = notifications_list - self.garbage_collection = garbage_collection - - -class CredentialHealth(_serialization.Model): - """The health of the auth credential. - - :ivar status: The health status of credential. Known values are: "Healthy" and "Unhealthy". - :vartype status: str or ~container_registry_management_client.models.CredentialHealthStatus - :ivar error_code: Error code representing the health check error. - :vartype error_code: str - :ivar error_message: Descriptive message representing the health check error. - :vartype error_message: str - """ - - _attribute_map = { - "status": {"key": "status", "type": "str"}, - "error_code": {"key": "errorCode", "type": "str"}, - "error_message": {"key": "errorMessage", "type": "str"}, - } - - def __init__( - self, - *, - status: Optional[Union[str, "_models.CredentialHealthStatus"]] = None, - error_code: Optional[str] = None, - error_message: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword status: The health status of credential. Known values are: "Healthy" and "Unhealthy". - :paramtype status: str or ~container_registry_management_client.models.CredentialHealthStatus - :keyword error_code: Error code representing the health check error. - :paramtype error_code: str - :keyword error_message: Descriptive message representing the health check error. - :paramtype error_message: str - """ - super().__init__(**kwargs) - self.status = status - self.error_code = error_code - self.error_message = error_message - - -class CredentialSet(ProxyResource): - """An object that represents a credential set resource for a container registry. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~container_registry_management_client.models.SystemData - :ivar properties: The properties of the credential set. - :vartype properties: ~container_registry_management_client.models.CredentialSetProperties - :ivar identity: Identities associated with the resource. This is used to access the KeyVault - secrets. - :vartype identity: ~container_registry_management_client.models.IdentityProperties - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "properties": {"key": "properties", "type": "CredentialSetProperties"}, - "identity": {"key": "identity", "type": "IdentityProperties"}, - } - - def __init__( - self, - *, - properties: Optional["_models.CredentialSetProperties"] = None, - identity: Optional["_models.IdentityProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword properties: The properties of the credential set. - :paramtype properties: ~container_registry_management_client.models.CredentialSetProperties - :keyword identity: Identities associated with the resource. This is used to access the KeyVault - secrets. - :paramtype identity: ~container_registry_management_client.models.IdentityProperties - """ - super().__init__(**kwargs) - self.properties = properties - self.identity = identity - - -class CredentialSetListResult(_serialization.Model): - """The result of a request to list credential sets for a container registry. - - :ivar value: The list of credential sets. Since this list may be incomplete, the nextLink field - should be used to request the next list of credential sets. - :vartype value: list[~container_registry_management_client.models.CredentialSet] - :ivar next_link: The URI that can be used to request the next list of credential sets. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[CredentialSet]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, *, value: Optional[list["_models.CredentialSet"]] = None, next_link: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword value: The list of credential sets. Since this list may be incomplete, the nextLink - field should be used to request the next list of credential sets. - :paramtype value: list[~container_registry_management_client.models.CredentialSet] - :keyword next_link: The URI that can be used to request the next list of credential sets. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class CredentialSetProperties(_serialization.Model): - """The properties of a credential set resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar login_server: The credentials are stored for this upstream or login server. - :vartype login_server: str - :ivar auth_credentials: List of authentication credentials stored for an upstream. Usually - consists of a primary and an optional secondary credential. - :vartype auth_credentials: list[~container_registry_management_client.models.AuthCredential] - :ivar creation_date: The creation date of credential store resource. - :vartype creation_date: ~datetime.datetime - :ivar provisioning_state: Provisioning state of the resource. Known values are: "Creating", - "Updating", "Deleting", "Succeeded", "Failed", and "Canceled". - :vartype provisioning_state: str or - ~container_registry_management_client.models.ProvisioningState - """ - - _validation = { - "creation_date": {"readonly": True}, - "provisioning_state": {"readonly": True}, - } - - _attribute_map = { - "login_server": {"key": "loginServer", "type": "str"}, - "auth_credentials": {"key": "authCredentials", "type": "[AuthCredential]"}, - "creation_date": {"key": "creationDate", "type": "iso-8601"}, - "provisioning_state": {"key": "provisioningState", "type": "str"}, - } - - def __init__( - self, - *, - login_server: Optional[str] = None, - auth_credentials: Optional[list["_models.AuthCredential"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword login_server: The credentials are stored for this upstream or login server. - :paramtype login_server: str - :keyword auth_credentials: List of authentication credentials stored for an upstream. Usually - consists of a primary and an optional secondary credential. - :paramtype auth_credentials: list[~container_registry_management_client.models.AuthCredential] - """ - super().__init__(**kwargs) - self.login_server = login_server - self.auth_credentials = auth_credentials - self.creation_date: Optional[datetime.datetime] = None - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - - -class CredentialSetUpdateParameters(_serialization.Model): - """The parameters for updating a credential set. - - :ivar properties: The properties of the credential set update parameters. - :vartype properties: ~container_registry_management_client.models.CredentialSetUpdateProperties - :ivar identity: Identities associated with the resource. This is used to access the KeyVault - secrets. - :vartype identity: ~container_registry_management_client.models.IdentityProperties - """ - - _attribute_map = { - "properties": {"key": "properties", "type": "CredentialSetUpdateProperties"}, - "identity": {"key": "identity", "type": "IdentityProperties"}, - } - - def __init__( - self, - *, - properties: Optional["_models.CredentialSetUpdateProperties"] = None, - identity: Optional["_models.IdentityProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword properties: The properties of the credential set update parameters. - :paramtype properties: - ~container_registry_management_client.models.CredentialSetUpdateProperties - :keyword identity: Identities associated with the resource. This is used to access the KeyVault - secrets. - :paramtype identity: ~container_registry_management_client.models.IdentityProperties - """ - super().__init__(**kwargs) - self.properties = properties - self.identity = identity - - -class CredentialSetUpdateProperties(_serialization.Model): - """The parameters for updating credential set properties. - - :ivar auth_credentials: List of authentication credentials stored for an upstream. Usually - consists of a primary and an optional secondary credential. - :vartype auth_credentials: list[~container_registry_management_client.models.AuthCredential] - """ - - _attribute_map = { - "auth_credentials": {"key": "authCredentials", "type": "[AuthCredential]"}, - } - - def __init__(self, *, auth_credentials: Optional[list["_models.AuthCredential"]] = None, **kwargs: Any) -> None: - """ - :keyword auth_credentials: List of authentication credentials stored for an upstream. Usually - consists of a primary and an optional secondary credential. - :paramtype auth_credentials: list[~container_registry_management_client.models.AuthCredential] - """ - super().__init__(**kwargs) - self.auth_credentials = auth_credentials - - -class DebianArchivePackageSourceProperties(ArchivePackageSourceProperties): - """The properties of the archive package source. - - :ivar type: The type of package source for a archive. "remote" - :vartype type: str or ~container_registry_management_client.models.PackageSourceType - :ivar url: The external repository url. - :vartype url: str - :ivar distribution_name: Upstream Debian distribution Name. - :vartype distribution_name: str - """ - - _attribute_map = { - "type": {"key": "type", "type": "str"}, - "url": {"key": "url", "type": "str"}, - "distribution_name": {"key": "distributionName", "type": "str"}, - } - - def __init__( - self, - *, - type: Optional[Union[str, "_models.PackageSourceType"]] = None, - url: Optional[str] = None, - distribution_name: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword type: The type of package source for a archive. "remote" - :paramtype type: str or ~container_registry_management_client.models.PackageSourceType - :keyword url: The external repository url. - :paramtype url: str - :keyword distribution_name: Upstream Debian distribution Name. - :paramtype distribution_name: str - """ - super().__init__(type=type, url=url, **kwargs) - self.distribution_name = distribution_name - - -class DebianArchiveProperties(ArchiveProperties): - """The properties of the Debian package Archive. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar package_source: The package source of the archive. - :vartype package_source: - ~container_registry_management_client.models.ArchivePackageSourceProperties - :ivar published_version: The published version of the archive. - :vartype published_version: str - :ivar repository_endpoint_prefix: - :vartype repository_endpoint_prefix: str - :ivar repository_endpoint: - :vartype repository_endpoint: str - :ivar provisioning_state: The provisioning state of the archive at the time the operation was - called. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and - "Canceled". - :vartype provisioning_state: str or - ~container_registry_management_client.models.ProvisioningState - :ivar distribution_name: Debian distribution Name. - :vartype distribution_name: str - """ - - _validation = { - "repository_endpoint": {"readonly": True}, - "provisioning_state": {"readonly": True}, - } - - _attribute_map = { - "package_source": {"key": "packageSource", "type": "ArchivePackageSourceProperties"}, - "published_version": {"key": "publishedVersion", "type": "str"}, - "repository_endpoint_prefix": {"key": "repositoryEndpointPrefix", "type": "str"}, - "repository_endpoint": {"key": "repositoryEndpoint", "type": "str"}, - "provisioning_state": {"key": "provisioningState", "type": "str"}, - "distribution_name": {"key": "distributionName", "type": "str"}, - } - - def __init__( - self, - *, - package_source: Optional["_models.ArchivePackageSourceProperties"] = None, - published_version: Optional[str] = None, - repository_endpoint_prefix: Optional[str] = None, - distribution_name: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword package_source: The package source of the archive. - :paramtype package_source: - ~container_registry_management_client.models.ArchivePackageSourceProperties - :keyword published_version: The published version of the archive. - :paramtype published_version: str - :keyword repository_endpoint_prefix: - :paramtype repository_endpoint_prefix: str - :keyword distribution_name: Debian distribution Name. - :paramtype distribution_name: str - """ - super().__init__( - package_source=package_source, - published_version=published_version, - repository_endpoint_prefix=repository_endpoint_prefix, - **kwargs - ) - self.distribution_name = distribution_name - - -class EncryptionProperty(_serialization.Model): - """EncryptionProperty. - - :ivar status: Indicates whether or not the encryption is enabled for container registry. Known - values are: "enabled" and "disabled". - :vartype status: str or ~container_registry_management_client.models.EncryptionStatus - :ivar key_vault_properties: Key vault properties. - :vartype key_vault_properties: ~container_registry_management_client.models.KeyVaultProperties - """ - - _attribute_map = { - "status": {"key": "status", "type": "str"}, - "key_vault_properties": {"key": "keyVaultProperties", "type": "KeyVaultProperties"}, - } - - def __init__( - self, - *, - status: Optional[Union[str, "_models.EncryptionStatus"]] = None, - key_vault_properties: Optional["_models.KeyVaultProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword status: Indicates whether or not the encryption is enabled for container registry. - Known values are: "enabled" and "disabled". - :paramtype status: str or ~container_registry_management_client.models.EncryptionStatus - :keyword key_vault_properties: Key vault properties. - :paramtype key_vault_properties: - ~container_registry_management_client.models.KeyVaultProperties - """ - super().__init__(**kwargs) - self.status = status - self.key_vault_properties = key_vault_properties - - -class ErrorAdditionalInfo(_serialization.Model): - """The resource management error additional info. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar type: The additional info type. - :vartype type: str - :ivar info: The additional info. - :vartype info: JSON - """ - - _validation = { - "type": {"readonly": True}, - "info": {"readonly": True}, - } - - _attribute_map = { - "type": {"key": "type", "type": "str"}, - "info": {"key": "info", "type": "object"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.type: Optional[str] = None - self.info: Optional[JSON] = None - - -class ErrorDetail(_serialization.Model): - """The error detail. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str - :ivar target: The error target. - :vartype target: str - :ivar details: The error details. - :vartype details: list[~container_registry_management_client.models.ErrorDetail] - :ivar additional_info: The error additional info. - :vartype additional_info: - list[~container_registry_management_client.models.ErrorAdditionalInfo] - """ - - _validation = { - "code": {"readonly": True}, - "message": {"readonly": True}, - "target": {"readonly": True}, - "details": {"readonly": True}, - "additional_info": {"readonly": True}, - } - - _attribute_map = { - "code": {"key": "code", "type": "str"}, - "message": {"key": "message", "type": "str"}, - "target": {"key": "target", "type": "str"}, - "details": {"key": "details", "type": "[ErrorDetail]"}, - "additional_info": {"key": "additionalInfo", "type": "[ErrorAdditionalInfo]"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.code: Optional[str] = None - self.message: Optional[str] = None - self.target: Optional[str] = None - self.details: Optional[list["_models.ErrorDetail"]] = None - self.additional_info: Optional[list["_models.ErrorAdditionalInfo"]] = None - - -class ErrorResponse(_serialization.Model): - """Common error response for all Azure Resource Manager APIs to return error details for failed - operations. (This also follows the OData error response format.). - - :ivar error: The error object. - :vartype error: ~container_registry_management_client.models.ErrorDetail - """ - - _attribute_map = { - "error": {"key": "error", "type": "ErrorDetail"}, - } - - def __init__(self, *, error: Optional["_models.ErrorDetail"] = None, **kwargs: Any) -> None: - """ - :keyword error: The error object. - :paramtype error: ~container_registry_management_client.models.ErrorDetail - """ - super().__init__(**kwargs) - self.error = error - - -class EventInfo(_serialization.Model): - """The basic information of an event. - - :ivar id: The event ID. - :vartype id: str - """ - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - } - - def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin - """ - :keyword id: The event ID. - :paramtype id: str - """ - super().__init__(**kwargs) - self.id = id - - -class Event(EventInfo): - """The event for a webhook. - - :ivar id: The event ID. - :vartype id: str - :ivar event_request_message: The event request message sent to the service URI. - :vartype event_request_message: - ~container_registry_management_client.models.EventRequestMessage - :ivar event_response_message: The event response message received from the service URI. - :vartype event_response_message: - ~container_registry_management_client.models.EventResponseMessage - """ - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "event_request_message": {"key": "eventRequestMessage", "type": "EventRequestMessage"}, - "event_response_message": {"key": "eventResponseMessage", "type": "EventResponseMessage"}, - } - - def __init__( - self, - *, - id: Optional[str] = None, # pylint: disable=redefined-builtin - event_request_message: Optional["_models.EventRequestMessage"] = None, - event_response_message: Optional["_models.EventResponseMessage"] = None, - **kwargs: Any - ) -> None: - """ - :keyword id: The event ID. - :paramtype id: str - :keyword event_request_message: The event request message sent to the service URI. - :paramtype event_request_message: - ~container_registry_management_client.models.EventRequestMessage - :keyword event_response_message: The event response message received from the service URI. - :paramtype event_response_message: - ~container_registry_management_client.models.EventResponseMessage - """ - super().__init__(id=id, **kwargs) - self.event_request_message = event_request_message - self.event_response_message = event_response_message - - -class EventContent(_serialization.Model): - """The content of the event request message. - - :ivar id: The event ID. - :vartype id: str - :ivar timestamp: The time at which the event occurred. - :vartype timestamp: ~datetime.datetime - :ivar action: The action that encompasses the provided event. - :vartype action: str - :ivar target: The target of the event. - :vartype target: ~container_registry_management_client.models.Target - :ivar request: The request that generated the event. - :vartype request: ~container_registry_management_client.models.Request - :ivar actor: The agent that initiated the event. For most situations, this could be from the - authorization context of the request. - :vartype actor: ~container_registry_management_client.models.Actor - :ivar source: The registry node that generated the event. Put differently, while the actor - initiates the event, the source generates it. - :vartype source: ~container_registry_management_client.models.Source - """ - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "timestamp": {"key": "timestamp", "type": "iso-8601"}, - "action": {"key": "action", "type": "str"}, - "target": {"key": "target", "type": "Target"}, - "request": {"key": "request", "type": "Request"}, - "actor": {"key": "actor", "type": "Actor"}, - "source": {"key": "source", "type": "Source"}, - } - - def __init__( - self, - *, - id: Optional[str] = None, # pylint: disable=redefined-builtin - timestamp: Optional[datetime.datetime] = None, - action: Optional[str] = None, - target: Optional["_models.Target"] = None, - request: Optional["_models.Request"] = None, - actor: Optional["_models.Actor"] = None, - source: Optional["_models.Source"] = None, - **kwargs: Any - ) -> None: - """ - :keyword id: The event ID. - :paramtype id: str - :keyword timestamp: The time at which the event occurred. - :paramtype timestamp: ~datetime.datetime - :keyword action: The action that encompasses the provided event. - :paramtype action: str - :keyword target: The target of the event. - :paramtype target: ~container_registry_management_client.models.Target - :keyword request: The request that generated the event. - :paramtype request: ~container_registry_management_client.models.Request - :keyword actor: The agent that initiated the event. For most situations, this could be from the - authorization context of the request. - :paramtype actor: ~container_registry_management_client.models.Actor - :keyword source: The registry node that generated the event. Put differently, while the actor - initiates the event, the source generates it. - :paramtype source: ~container_registry_management_client.models.Source - """ - super().__init__(**kwargs) - self.id = id - self.timestamp = timestamp - self.action = action - self.target = target - self.request = request - self.actor = actor - self.source = source - - -class EventListResult(_serialization.Model): - """The result of a request to list events for a webhook. - - :ivar value: The list of events. Since this list may be incomplete, the nextLink field should - be used to request the next list of events. - :vartype value: list[~container_registry_management_client.models.Event] - :ivar next_link: The URI that can be used to request the next list of events. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[Event]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, *, value: Optional[list["_models.Event"]] = None, next_link: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword value: The list of events. Since this list may be incomplete, the nextLink field - should be used to request the next list of events. - :paramtype value: list[~container_registry_management_client.models.Event] - :keyword next_link: The URI that can be used to request the next list of events. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class EventRequestMessage(_serialization.Model): - """The event request message sent to the service URI. - - :ivar content: The content of the event request message. - :vartype content: ~container_registry_management_client.models.EventContent - :ivar headers: The headers of the event request message. - :vartype headers: dict[str, str] - :ivar method: The HTTP method used to send the event request message. - :vartype method: str - :ivar request_uri: The URI used to send the event request message. - :vartype request_uri: str - :ivar version: The HTTP message version. - :vartype version: str - """ - - _attribute_map = { - "content": {"key": "content", "type": "EventContent"}, - "headers": {"key": "headers", "type": "{str}"}, - "method": {"key": "method", "type": "str"}, - "request_uri": {"key": "requestUri", "type": "str"}, - "version": {"key": "version", "type": "str"}, - } - - def __init__( - self, - *, - content: Optional["_models.EventContent"] = None, - headers: Optional[dict[str, str]] = None, - method: Optional[str] = None, - request_uri: Optional[str] = None, - version: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword content: The content of the event request message. - :paramtype content: ~container_registry_management_client.models.EventContent - :keyword headers: The headers of the event request message. - :paramtype headers: dict[str, str] - :keyword method: The HTTP method used to send the event request message. - :paramtype method: str - :keyword request_uri: The URI used to send the event request message. - :paramtype request_uri: str - :keyword version: The HTTP message version. - :paramtype version: str - """ - super().__init__(**kwargs) - self.content = content - self.headers = headers - self.method = method - self.request_uri = request_uri - self.version = version - - -class EventResponseMessage(_serialization.Model): - """The event response message received from the service URI. - - :ivar content: The content of the event response message. - :vartype content: str - :ivar headers: The headers of the event response message. - :vartype headers: dict[str, str] - :ivar reason_phrase: The reason phrase of the event response message. - :vartype reason_phrase: str - :ivar status_code: The status code of the event response message. - :vartype status_code: str - :ivar version: The HTTP message version. - :vartype version: str - """ - - _attribute_map = { - "content": {"key": "content", "type": "str"}, - "headers": {"key": "headers", "type": "{str}"}, - "reason_phrase": {"key": "reasonPhrase", "type": "str"}, - "status_code": {"key": "statusCode", "type": "str"}, - "version": {"key": "version", "type": "str"}, - } - - def __init__( - self, - *, - content: Optional[str] = None, - headers: Optional[dict[str, str]] = None, - reason_phrase: Optional[str] = None, - status_code: Optional[str] = None, - version: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword content: The content of the event response message. - :paramtype content: str - :keyword headers: The headers of the event response message. - :paramtype headers: dict[str, str] - :keyword reason_phrase: The reason phrase of the event response message. - :paramtype reason_phrase: str - :keyword status_code: The status code of the event response message. - :paramtype status_code: str - :keyword version: The HTTP message version. - :paramtype version: str - """ - super().__init__(**kwargs) - self.content = content - self.headers = headers - self.reason_phrase = reason_phrase - self.status_code = status_code - self.version = version - - -class ExportPipeline(ProxyResource): - """An object that represents an export pipeline for a container registry. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~container_registry_management_client.models.SystemData - :ivar properties: The properties of the export pipeline. - :vartype properties: ~container_registry_management_client.models.ExportPipelineProperties - :ivar location: The location of the export pipeline. - :vartype location: str - :ivar identity: The identity of the export pipeline. - :vartype identity: ~container_registry_management_client.models.IdentityProperties - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "properties": {"key": "properties", "type": "ExportPipelineProperties"}, - "location": {"key": "location", "type": "str"}, - "identity": {"key": "identity", "type": "IdentityProperties"}, - } - - def __init__( - self, - *, - properties: Optional["_models.ExportPipelineProperties"] = None, - location: Optional[str] = None, - identity: Optional["_models.IdentityProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword properties: The properties of the export pipeline. - :paramtype properties: ~container_registry_management_client.models.ExportPipelineProperties - :keyword location: The location of the export pipeline. - :paramtype location: str - :keyword identity: The identity of the export pipeline. - :paramtype identity: ~container_registry_management_client.models.IdentityProperties - """ - super().__init__(**kwargs) - self.properties = properties - self.location = location - self.identity = identity - - -class ExportPipelineListResult(_serialization.Model): - """The result of a request to list export pipelines for a container registry. - - :ivar value: The list of export pipelines. Since this list may be incomplete, the nextLink - field should be used to request the next list of export pipelines. - :vartype value: list[~container_registry_management_client.models.ExportPipeline] - :ivar next_link: The URI that can be used to request the next list of export pipelines. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[ExportPipeline]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, *, value: Optional[list["_models.ExportPipeline"]] = None, next_link: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword value: The list of export pipelines. Since this list may be incomplete, the nextLink - field should be used to request the next list of export pipelines. - :paramtype value: list[~container_registry_management_client.models.ExportPipeline] - :keyword next_link: The URI that can be used to request the next list of export pipelines. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class ExportPipelineProperties(_serialization.Model): - """The properties of an export pipeline. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :ivar target: The target properties of the export pipeline. Required. - :vartype target: ~container_registry_management_client.models.ExportPipelineTargetProperties - :ivar options: The list of all options configured for the pipeline. - :vartype options: list[str or ~container_registry_management_client.models.PipelineOptions] - :ivar provisioning_state: The provisioning state of the pipeline at the time the operation was - called. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and - "Canceled". - :vartype provisioning_state: str or - ~container_registry_management_client.models.ProvisioningState - """ - - _validation = { - "target": {"required": True}, - "provisioning_state": {"readonly": True}, - } - - _attribute_map = { - "target": {"key": "target", "type": "ExportPipelineTargetProperties"}, - "options": {"key": "options", "type": "[str]"}, - "provisioning_state": {"key": "provisioningState", "type": "str"}, - } - - def __init__( - self, - *, - target: "_models.ExportPipelineTargetProperties", - options: Optional[list[Union[str, "_models.PipelineOptions"]]] = None, - **kwargs: Any - ) -> None: - """ - :keyword target: The target properties of the export pipeline. Required. - :paramtype target: ~container_registry_management_client.models.ExportPipelineTargetProperties - :keyword options: The list of all options configured for the pipeline. - :paramtype options: list[str or ~container_registry_management_client.models.PipelineOptions] - """ - super().__init__(**kwargs) - self.target = target - self.options = options - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - - -class ExportPipelineTargetProperties(_serialization.Model): - """The properties of the export pipeline target. - - :ivar type: The type of target for the export pipeline. - :vartype type: str - :ivar uri: The target uri of the export pipeline. When 'AzureStorageBlob': - "https://accountName.blob.core.windows.net/containerName/blobName" When - 'AzureStorageBlobContainer': "https://accountName.blob.core.windows.net/containerName". - :vartype uri: str - :ivar key_vault_uri: They key vault secret uri to obtain the target storage SAS token. - :vartype key_vault_uri: str - :ivar storage_access_mode: The storage access mode used for the customer storage account. Known - values are: "ManagedIdentity" and "SasToken". - :vartype storage_access_mode: str or - ~container_registry_management_client.models.StorageAccessMode - """ - - _attribute_map = { - "type": {"key": "type", "type": "str"}, - "uri": {"key": "uri", "type": "str"}, - "key_vault_uri": {"key": "keyVaultUri", "type": "str"}, - "storage_access_mode": {"key": "storageAccessMode", "type": "str"}, - } - - def __init__( - self, - *, - type: Optional[str] = None, - uri: Optional[str] = None, - key_vault_uri: Optional[str] = None, - storage_access_mode: Optional[Union[str, "_models.StorageAccessMode"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword type: The type of target for the export pipeline. - :paramtype type: str - :keyword uri: The target uri of the export pipeline. When 'AzureStorageBlob': - "https://accountName.blob.core.windows.net/containerName/blobName" When - 'AzureStorageBlobContainer': "https://accountName.blob.core.windows.net/containerName". - :paramtype uri: str - :keyword key_vault_uri: They key vault secret uri to obtain the target storage SAS token. - :paramtype key_vault_uri: str - :keyword storage_access_mode: The storage access mode used for the customer storage account. - Known values are: "ManagedIdentity" and "SasToken". - :paramtype storage_access_mode: str or - ~container_registry_management_client.models.StorageAccessMode - """ - super().__init__(**kwargs) - self.type = type - self.uri = uri - self.key_vault_uri = key_vault_uri - self.storage_access_mode = storage_access_mode - - -class ExportPolicy(_serialization.Model): - """The export policy for a container registry. - - :ivar status: The value that indicates whether the policy is enabled or not. Known values are: - "enabled" and "disabled". - :vartype status: str or ~container_registry_management_client.models.ExportPolicyStatus - """ - - _attribute_map = { - "status": {"key": "status", "type": "str"}, - } - - def __init__(self, *, status: Union[str, "_models.ExportPolicyStatus"] = "enabled", **kwargs: Any) -> None: - """ - :keyword status: The value that indicates whether the policy is enabled or not. Known values - are: "enabled" and "disabled". - :paramtype status: str or ~container_registry_management_client.models.ExportPolicyStatus - """ - super().__init__(**kwargs) - self.status = status - - -class GarbageCollectionProperties(_serialization.Model): - """The garbage collection properties of the connected registry. - - :ivar enabled: Indicates whether garbage collection is enabled for the connected registry. - :vartype enabled: bool - :ivar schedule: The cron expression indicating the schedule that the connected registry will - run garbage collection. - :vartype schedule: str - """ - - _attribute_map = { - "enabled": {"key": "enabled", "type": "bool"}, - "schedule": {"key": "schedule", "type": "str"}, - } - - def __init__(self, *, enabled: Optional[bool] = None, schedule: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword enabled: Indicates whether garbage collection is enabled for the connected registry. - :paramtype enabled: bool - :keyword schedule: The cron expression indicating the schedule that the connected registry will - run garbage collection. - :paramtype schedule: str - """ - super().__init__(**kwargs) - self.enabled = enabled - self.schedule = schedule - - -class GenerateCredentialsParameters(_serialization.Model): - """The parameters used to generate credentials for a specified token or user of a container - registry. - - :ivar token_id: The resource ID of the token for which credentials have to be generated. - :vartype token_id: str - :ivar expiry: The expiry date of the generated credentials after which the credentials become - invalid. - :vartype expiry: ~datetime.datetime - :ivar name: Specifies name of the password which should be regenerated if any -- password1 or - password2. Known values are: "password1" and "password2". - :vartype name: str or ~container_registry_management_client.models.TokenPasswordName - """ - - _attribute_map = { - "token_id": {"key": "tokenId", "type": "str"}, - "expiry": {"key": "expiry", "type": "iso-8601"}, - "name": {"key": "name", "type": "str"}, - } - - def __init__( - self, - *, - token_id: Optional[str] = None, - expiry: Optional[datetime.datetime] = None, - name: Optional[Union[str, "_models.TokenPasswordName"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword token_id: The resource ID of the token for which credentials have to be generated. - :paramtype token_id: str - :keyword expiry: The expiry date of the generated credentials after which the credentials - become invalid. - :paramtype expiry: ~datetime.datetime - :keyword name: Specifies name of the password which should be regenerated if any -- password1 - or password2. Known values are: "password1" and "password2". - :paramtype name: str or ~container_registry_management_client.models.TokenPasswordName - """ - super().__init__(**kwargs) - self.token_id = token_id - self.expiry = expiry - self.name = name - - -class GenerateCredentialsResult(_serialization.Model): - """The response from the GenerateCredentials operation. - - :ivar username: The username for a container registry. - :vartype username: str - :ivar passwords: The list of passwords for a container registry. - :vartype passwords: list[~container_registry_management_client.models.TokenPassword] - """ - - _attribute_map = { - "username": {"key": "username", "type": "str"}, - "passwords": {"key": "passwords", "type": "[TokenPassword]"}, - } - - def __init__( - self, - *, - username: Optional[str] = None, - passwords: Optional[list["_models.TokenPassword"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword username: The username for a container registry. - :paramtype username: str - :keyword passwords: The list of passwords for a container registry. - :paramtype passwords: list[~container_registry_management_client.models.TokenPassword] - """ - super().__init__(**kwargs) - self.username = username - self.passwords = passwords - - -class IdentityProperties(_serialization.Model): - """Managed identity for the resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar principal_id: The principal ID of resource identity. - :vartype principal_id: str - :ivar tenant_id: The tenant ID of resource. - :vartype tenant_id: str - :ivar type: The identity type. Known values are: "SystemAssigned", "UserAssigned", - "SystemAssigned, UserAssigned", and "None". - :vartype type: str or ~container_registry_management_client.models.ResourceIdentityType - :ivar user_assigned_identities: The list of user identities associated with the resource. The - user identity dictionary key references will be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/ - providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - :vartype user_assigned_identities: dict[str, - ~container_registry_management_client.models.UserIdentityProperties] - """ - - _validation = { - "principal_id": {"readonly": True}, - "tenant_id": {"readonly": True}, - } - - _attribute_map = { - "principal_id": {"key": "principalId", "type": "str"}, - "tenant_id": {"key": "tenantId", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "user_assigned_identities": {"key": "userAssignedIdentities", "type": "{UserIdentityProperties}"}, - } - - def __init__( - self, - *, - type: Optional[Union[str, "_models.ResourceIdentityType"]] = None, - user_assigned_identities: Optional[dict[str, "_models.UserIdentityProperties"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword type: The identity type. Known values are: "SystemAssigned", "UserAssigned", - "SystemAssigned, UserAssigned", and "None". - :paramtype type: str or ~container_registry_management_client.models.ResourceIdentityType - :keyword user_assigned_identities: The list of user identities associated with the resource. - The user identity dictionary key references will be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/ - providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - :paramtype user_assigned_identities: dict[str, - ~container_registry_management_client.models.UserIdentityProperties] - """ - super().__init__(**kwargs) - self.principal_id: Optional[str] = None - self.tenant_id: Optional[str] = None - self.type = type - self.user_assigned_identities = user_assigned_identities - - -class ImportImageParameters(_serialization.Model): - """ImportImageParameters. - - All required parameters must be populated in order to send to server. - - :ivar source: The source of the image. Required. - :vartype source: ~container_registry_management_client.models.ImportSource - :ivar target_tags: List of strings of the form repo[:tag]. When tag is omitted the source will - be used (or 'latest' if source tag is also omitted). - :vartype target_tags: list[str] - :ivar untagged_target_repositories: List of strings of repository names to do a manifest only - copy. No tag will be created. - :vartype untagged_target_repositories: list[str] - :ivar mode: When Force, any existing target tags will be overwritten. When NoForce, any - existing target tags will fail the operation before any copying begins. Known values are: - "NoForce" and "Force". - :vartype mode: str or ~container_registry_management_client.models.ImportMode - """ - - _validation = { - "source": {"required": True}, - } - - _attribute_map = { - "source": {"key": "source", "type": "ImportSource"}, - "target_tags": {"key": "targetTags", "type": "[str]"}, - "untagged_target_repositories": {"key": "untaggedTargetRepositories", "type": "[str]"}, - "mode": {"key": "mode", "type": "str"}, - } - - def __init__( - self, - *, - source: "_models.ImportSource", - target_tags: Optional[list[str]] = None, - untagged_target_repositories: Optional[list[str]] = None, - mode: Union[str, "_models.ImportMode"] = "NoForce", - **kwargs: Any - ) -> None: - """ - :keyword source: The source of the image. Required. - :paramtype source: ~container_registry_management_client.models.ImportSource - :keyword target_tags: List of strings of the form repo[:tag]. When tag is omitted the source - will be used (or 'latest' if source tag is also omitted). - :paramtype target_tags: list[str] - :keyword untagged_target_repositories: List of strings of repository names to do a manifest - only copy. No tag will be created. - :paramtype untagged_target_repositories: list[str] - :keyword mode: When Force, any existing target tags will be overwritten. When NoForce, any - existing target tags will fail the operation before any copying begins. Known values are: - "NoForce" and "Force". - :paramtype mode: str or ~container_registry_management_client.models.ImportMode - """ - super().__init__(**kwargs) - self.source = source - self.target_tags = target_tags - self.untagged_target_repositories = untagged_target_repositories - self.mode = mode - - -class ImportPipeline(ProxyResource): - """An object that represents an import pipeline for a container registry. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~container_registry_management_client.models.SystemData - :ivar properties: The properties of the import pipeline. - :vartype properties: ~container_registry_management_client.models.ImportPipelineProperties - :ivar location: The location of the import pipeline. - :vartype location: str - :ivar identity: The identity of the import pipeline. - :vartype identity: ~container_registry_management_client.models.IdentityProperties - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "properties": {"key": "properties", "type": "ImportPipelineProperties"}, - "location": {"key": "location", "type": "str"}, - "identity": {"key": "identity", "type": "IdentityProperties"}, - } - - def __init__( - self, - *, - properties: Optional["_models.ImportPipelineProperties"] = None, - location: Optional[str] = None, - identity: Optional["_models.IdentityProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword properties: The properties of the import pipeline. - :paramtype properties: ~container_registry_management_client.models.ImportPipelineProperties - :keyword location: The location of the import pipeline. - :paramtype location: str - :keyword identity: The identity of the import pipeline. - :paramtype identity: ~container_registry_management_client.models.IdentityProperties - """ - super().__init__(**kwargs) - self.properties = properties - self.location = location - self.identity = identity - - -class ImportPipelineListResult(_serialization.Model): - """The result of a request to list import pipelines for a container registry. - - :ivar value: The list of import pipelines. Since this list may be incomplete, the nextLink - field should be used to request the next list of import pipelines. - :vartype value: list[~container_registry_management_client.models.ImportPipeline] - :ivar next_link: The URI that can be used to request the next list of import pipelines. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[ImportPipeline]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, *, value: Optional[list["_models.ImportPipeline"]] = None, next_link: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword value: The list of import pipelines. Since this list may be incomplete, the nextLink - field should be used to request the next list of import pipelines. - :paramtype value: list[~container_registry_management_client.models.ImportPipeline] - :keyword next_link: The URI that can be used to request the next list of import pipelines. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class ImportPipelineProperties(_serialization.Model): - """The properties of an import pipeline. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :ivar source: The source properties of the import pipeline. Required. - :vartype source: ~container_registry_management_client.models.ImportPipelineSourceProperties - :ivar trigger: The properties that describe the trigger of the import pipeline. - :vartype trigger: ~container_registry_management_client.models.PipelineTriggerProperties - :ivar options: The list of all options configured for the pipeline. - :vartype options: list[str or ~container_registry_management_client.models.PipelineOptions] - :ivar provisioning_state: The provisioning state of the pipeline at the time the operation was - called. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and - "Canceled". - :vartype provisioning_state: str or - ~container_registry_management_client.models.ProvisioningState - """ - - _validation = { - "source": {"required": True}, - "provisioning_state": {"readonly": True}, - } - - _attribute_map = { - "source": {"key": "source", "type": "ImportPipelineSourceProperties"}, - "trigger": {"key": "trigger", "type": "PipelineTriggerProperties"}, - "options": {"key": "options", "type": "[str]"}, - "provisioning_state": {"key": "provisioningState", "type": "str"}, - } - - def __init__( - self, - *, - source: "_models.ImportPipelineSourceProperties", - trigger: Optional["_models.PipelineTriggerProperties"] = None, - options: Optional[list[Union[str, "_models.PipelineOptions"]]] = None, - **kwargs: Any - ) -> None: - """ - :keyword source: The source properties of the import pipeline. Required. - :paramtype source: ~container_registry_management_client.models.ImportPipelineSourceProperties - :keyword trigger: The properties that describe the trigger of the import pipeline. - :paramtype trigger: ~container_registry_management_client.models.PipelineTriggerProperties - :keyword options: The list of all options configured for the pipeline. - :paramtype options: list[str or ~container_registry_management_client.models.PipelineOptions] - """ - super().__init__(**kwargs) - self.source = source - self.trigger = trigger - self.options = options - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - - -class ImportPipelineSourceProperties(_serialization.Model): - """The properties of the import pipeline source. - - :ivar type: The type of source for the import pipeline. "AzureStorageBlobContainer" - :vartype type: str or ~container_registry_management_client.models.PipelineSourceType - :ivar uri: The source uri of the import pipeline. When 'AzureStorageBlob': - "https://accountName.blob.core.windows.net/containerName/blobName" When - 'AzureStorageBlobContainer': "https://accountName.blob.core.windows.net/containerName". - :vartype uri: str - :ivar key_vault_uri: They key vault secret uri to obtain the source storage SAS token. - :vartype key_vault_uri: str - :ivar storage_access_mode: The storage access mode used for the customer storage account. Known - values are: "ManagedIdentity" and "SasToken". - :vartype storage_access_mode: str or - ~container_registry_management_client.models.StorageAccessMode - """ - - _attribute_map = { - "type": {"key": "type", "type": "str"}, - "uri": {"key": "uri", "type": "str"}, - "key_vault_uri": {"key": "keyVaultUri", "type": "str"}, - "storage_access_mode": {"key": "storageAccessMode", "type": "str"}, - } - - def __init__( - self, - *, - type: Union[str, "_models.PipelineSourceType"] = "AzureStorageBlobContainer", - uri: Optional[str] = None, - key_vault_uri: Optional[str] = None, - storage_access_mode: Optional[Union[str, "_models.StorageAccessMode"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword type: The type of source for the import pipeline. "AzureStorageBlobContainer" - :paramtype type: str or ~container_registry_management_client.models.PipelineSourceType - :keyword uri: The source uri of the import pipeline. When 'AzureStorageBlob': - "https://accountName.blob.core.windows.net/containerName/blobName" When - 'AzureStorageBlobContainer': "https://accountName.blob.core.windows.net/containerName". - :paramtype uri: str - :keyword key_vault_uri: They key vault secret uri to obtain the source storage SAS token. - :paramtype key_vault_uri: str - :keyword storage_access_mode: The storage access mode used for the customer storage account. - Known values are: "ManagedIdentity" and "SasToken". - :paramtype storage_access_mode: str or - ~container_registry_management_client.models.StorageAccessMode - """ - super().__init__(**kwargs) - self.type = type - self.uri = uri - self.key_vault_uri = key_vault_uri - self.storage_access_mode = storage_access_mode - - -class ImportSource(_serialization.Model): - """ImportSource. - - All required parameters must be populated in order to send to server. - - :ivar resource_id: The resource identifier of the source Azure Container Registry. - :vartype resource_id: str - :ivar registry_uri: The address of the source registry (e.g. 'mcr.microsoft.com'). - :vartype registry_uri: str - :ivar credentials: Credentials used when importing from a registry uri. - :vartype credentials: ~container_registry_management_client.models.ImportSourceCredentials - :ivar source_image: Repository name of the source image. Specify an image by repository - ('hello-world'). This will use the 'latest' tag. Specify an image by tag - ('hello-world:latest'). Specify an image by sha256-based manifest digest - ('hello-world@sha256:abc123'). Required. - :vartype source_image: str - """ - - _validation = { - "source_image": {"required": True}, - } - - _attribute_map = { - "resource_id": {"key": "resourceId", "type": "str"}, - "registry_uri": {"key": "registryUri", "type": "str"}, - "credentials": {"key": "credentials", "type": "ImportSourceCredentials"}, - "source_image": {"key": "sourceImage", "type": "str"}, - } - - def __init__( - self, - *, - source_image: str, - resource_id: Optional[str] = None, - registry_uri: Optional[str] = None, - credentials: Optional["_models.ImportSourceCredentials"] = None, - **kwargs: Any - ) -> None: - """ - :keyword resource_id: The resource identifier of the source Azure Container Registry. - :paramtype resource_id: str - :keyword registry_uri: The address of the source registry (e.g. 'mcr.microsoft.com'). - :paramtype registry_uri: str - :keyword credentials: Credentials used when importing from a registry uri. - :paramtype credentials: ~container_registry_management_client.models.ImportSourceCredentials - :keyword source_image: Repository name of the source image. Specify an image by repository - ('hello-world'). This will use the 'latest' tag. Specify an image by tag - ('hello-world:latest'). Specify an image by sha256-based manifest digest - ('hello-world@sha256:abc123'). Required. - :paramtype source_image: str - """ - super().__init__(**kwargs) - self.resource_id = resource_id - self.registry_uri = registry_uri - self.credentials = credentials - self.source_image = source_image - - -class ImportSourceCredentials(_serialization.Model): - """ImportSourceCredentials. - - All required parameters must be populated in order to send to server. - - :ivar username: The username to authenticate with the source registry. - :vartype username: str - :ivar password: The password used to authenticate with the source registry. Required. - :vartype password: str - """ - - _validation = { - "password": {"required": True}, - } - - _attribute_map = { - "username": {"key": "username", "type": "str"}, - "password": {"key": "password", "type": "str"}, - } - - def __init__(self, *, password: str, username: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword username: The username to authenticate with the source registry. - :paramtype username: str - :keyword password: The password used to authenticate with the source registry. Required. - :paramtype password: str - """ - super().__init__(**kwargs) - self.username = username - self.password = password - - -class IPRule(_serialization.Model): - """IP rule with specific IP or IP range in CIDR format. - - All required parameters must be populated in order to send to server. - - :ivar action: The action of IP ACL rule. "Allow" - :vartype action: str or ~container_registry_management_client.models.Action - :ivar ip_address_or_range: Specifies the IP or IP range in CIDR format. Only IPV4 address is - allowed. Required. - :vartype ip_address_or_range: str - """ - - _validation = { - "ip_address_or_range": {"required": True}, - } - - _attribute_map = { - "action": {"key": "action", "type": "str"}, - "ip_address_or_range": {"key": "value", "type": "str"}, - } - - def __init__( - self, *, ip_address_or_range: str, action: Union[str, "_models.Action"] = "Allow", **kwargs: Any - ) -> None: - """ - :keyword action: The action of IP ACL rule. "Allow" - :paramtype action: str or ~container_registry_management_client.models.Action - :keyword ip_address_or_range: Specifies the IP or IP range in CIDR format. Only IPV4 address is - allowed. Required. - :paramtype ip_address_or_range: str - """ - super().__init__(**kwargs) - self.action = action - self.ip_address_or_range = ip_address_or_range - - -class KeyVaultProperties(_serialization.Model): - """KeyVaultProperties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar key_identifier: Key vault uri to access the encryption key. - :vartype key_identifier: str - :ivar versioned_key_identifier: The fully qualified key identifier that includes the version of - the key that is actually used for encryption. - :vartype versioned_key_identifier: str - :ivar identity: The client id of the identity which will be used to access key vault. - :vartype identity: str - :ivar key_rotation_enabled: Auto key rotation status for a CMK enabled registry. - :vartype key_rotation_enabled: bool - :ivar last_key_rotation_timestamp: Timestamp of the last successful key rotation. - :vartype last_key_rotation_timestamp: ~datetime.datetime - """ - - _validation = { - "versioned_key_identifier": {"readonly": True}, - "key_rotation_enabled": {"readonly": True}, - "last_key_rotation_timestamp": {"readonly": True}, - } - - _attribute_map = { - "key_identifier": {"key": "keyIdentifier", "type": "str"}, - "versioned_key_identifier": {"key": "versionedKeyIdentifier", "type": "str"}, - "identity": {"key": "identity", "type": "str"}, - "key_rotation_enabled": {"key": "keyRotationEnabled", "type": "bool"}, - "last_key_rotation_timestamp": {"key": "lastKeyRotationTimestamp", "type": "iso-8601"}, - } - - def __init__(self, *, key_identifier: Optional[str] = None, identity: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword key_identifier: Key vault uri to access the encryption key. - :paramtype key_identifier: str - :keyword identity: The client id of the identity which will be used to access key vault. - :paramtype identity: str - """ - super().__init__(**kwargs) - self.key_identifier = key_identifier - self.versioned_key_identifier: Optional[str] = None - self.identity = identity - self.key_rotation_enabled: Optional[bool] = None - self.last_key_rotation_timestamp: Optional[datetime.datetime] = None - - -class LoggingProperties(_serialization.Model): - """The logging properties of the connected registry. - - :ivar log_level: The verbosity of logs persisted on the connected registry. Known values are: - "Debug", "Information", "Warning", "Error", and "None". - :vartype log_level: str or ~container_registry_management_client.models.LogLevel - :ivar audit_log_status: Indicates whether audit logs are enabled on the connected registry. - Known values are: "Enabled" and "Disabled". - :vartype audit_log_status: str or ~container_registry_management_client.models.AuditLogStatus - """ - - _attribute_map = { - "log_level": {"key": "logLevel", "type": "str"}, - "audit_log_status": {"key": "auditLogStatus", "type": "str"}, - } - - def __init__( - self, - *, - log_level: Union[str, "_models.LogLevel"] = "Information", - audit_log_status: Union[str, "_models.AuditLogStatus"] = "Disabled", - **kwargs: Any - ) -> None: - """ - :keyword log_level: The verbosity of logs persisted on the connected registry. Known values - are: "Debug", "Information", "Warning", "Error", and "None". - :paramtype log_level: str or ~container_registry_management_client.models.LogLevel - :keyword audit_log_status: Indicates whether audit logs are enabled on the connected registry. - Known values are: "Enabled" and "Disabled". - :paramtype audit_log_status: str or ~container_registry_management_client.models.AuditLogStatus - """ - super().__init__(**kwargs) - self.log_level = log_level - self.audit_log_status = audit_log_status - - -class LoginServerProperties(_serialization.Model): - """The login server properties of the connected registry. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar host: The host of the connected registry. Can be FQDN or IP. - :vartype host: str - :ivar tls: The TLS properties of the connected registry login server. - :vartype tls: ~container_registry_management_client.models.TlsProperties - """ - - _validation = { - "host": {"readonly": True}, - "tls": {"readonly": True}, - } - - _attribute_map = { - "host": {"key": "host", "type": "str"}, - "tls": {"key": "tls", "type": "TlsProperties"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.host: Optional[str] = None - self.tls: Optional["_models.TlsProperties"] = None - - -class NetworkRuleSet(_serialization.Model): - """The network rule set for a container registry. - - All required parameters must be populated in order to send to server. - - :ivar default_action: The default action of allow or deny when no other rules match. Known - values are: "Allow" and "Deny". - :vartype default_action: str or ~container_registry_management_client.models.DefaultAction - :ivar ip_rules: The IP ACL rules. - :vartype ip_rules: list[~container_registry_management_client.models.IPRule] - """ - - _validation = { - "default_action": {"required": True}, - } - - _attribute_map = { - "default_action": {"key": "defaultAction", "type": "str"}, - "ip_rules": {"key": "ipRules", "type": "[IPRule]"}, - } - - def __init__( - self, - *, - default_action: Union[str, "_models.DefaultAction"] = "Allow", - ip_rules: Optional[list["_models.IPRule"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword default_action: The default action of allow or deny when no other rules match. Known - values are: "Allow" and "Deny". - :paramtype default_action: str or ~container_registry_management_client.models.DefaultAction - :keyword ip_rules: The IP ACL rules. - :paramtype ip_rules: list[~container_registry_management_client.models.IPRule] - """ - super().__init__(**kwargs) - self.default_action = default_action - self.ip_rules = ip_rules - - -class OperationDefinition(_serialization.Model): - """The definition of a container registry operation. - - :ivar origin: The origin information of the container registry operation. - :vartype origin: str - :ivar name: Operation name: {provider}/{resource}/{operation}. - :vartype name: str - :ivar display: The display information for the container registry operation. - :vartype display: ~container_registry_management_client.models.OperationDisplayDefinition - :ivar properties: The properties information for the container registry operation. - :vartype properties: ~container_registry_management_client.models.OperationPropertiesDefinition - :ivar is_data_action: This property indicates if the operation is an action or a data action - ref: - https://docs.microsoft.com/en-us/azure/role-based-access-control/role-definitions#management-and-data-operations. - :vartype is_data_action: bool - """ - - _attribute_map = { - "origin": {"key": "origin", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "display": {"key": "display", "type": "OperationDisplayDefinition"}, - "properties": {"key": "properties", "type": "OperationPropertiesDefinition"}, - "is_data_action": {"key": "isDataAction", "type": "bool"}, - } - - def __init__( - self, - *, - origin: Optional[str] = None, - name: Optional[str] = None, - display: Optional["_models.OperationDisplayDefinition"] = None, - properties: Optional["_models.OperationPropertiesDefinition"] = None, - is_data_action: Optional[bool] = None, - **kwargs: Any - ) -> None: - """ - :keyword origin: The origin information of the container registry operation. - :paramtype origin: str - :keyword name: Operation name: {provider}/{resource}/{operation}. - :paramtype name: str - :keyword display: The display information for the container registry operation. - :paramtype display: ~container_registry_management_client.models.OperationDisplayDefinition - :keyword properties: The properties information for the container registry operation. - :paramtype properties: - ~container_registry_management_client.models.OperationPropertiesDefinition - :keyword is_data_action: This property indicates if the operation is an action or a data action - ref: - https://docs.microsoft.com/en-us/azure/role-based-access-control/role-definitions#management-and-data-operations. - :paramtype is_data_action: bool - """ - super().__init__(**kwargs) - self.origin = origin - self.name = name - self.display = display - self.properties = properties - self.is_data_action = is_data_action - - -class OperationDisplayDefinition(_serialization.Model): - """The display information for a container registry operation. - - :ivar provider: The resource provider name: Microsoft.ContainerRegistry. - :vartype provider: str - :ivar resource: The resource on which the operation is performed. - :vartype resource: str - :ivar operation: The operation that users can perform. - :vartype operation: str - :ivar description: The description for the operation. - :vartype description: str - """ - - _attribute_map = { - "provider": {"key": "provider", "type": "str"}, - "resource": {"key": "resource", "type": "str"}, - "operation": {"key": "operation", "type": "str"}, - "description": {"key": "description", "type": "str"}, - } - - def __init__( - self, - *, - provider: Optional[str] = None, - resource: Optional[str] = None, - operation: Optional[str] = None, - description: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword provider: The resource provider name: Microsoft.ContainerRegistry. - :paramtype provider: str - :keyword resource: The resource on which the operation is performed. - :paramtype resource: str - :keyword operation: The operation that users can perform. - :paramtype operation: str - :keyword description: The description for the operation. - :paramtype description: str - """ - super().__init__(**kwargs) - self.provider = provider - self.resource = resource - self.operation = operation - self.description = description - - -class OperationListResult(_serialization.Model): - """The result of a request to list container registry operations. - - :ivar value: The list of container registry operations. Since this list may be incomplete, the - nextLink field should be used to request the next list of operations. - :vartype value: list[~container_registry_management_client.models.OperationDefinition] - :ivar next_link: The URI that can be used to request the next list of container registry - operations. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[OperationDefinition]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.OperationDefinition"]] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: The list of container registry operations. Since this list may be incomplete, - the nextLink field should be used to request the next list of operations. - :paramtype value: list[~container_registry_management_client.models.OperationDefinition] - :keyword next_link: The URI that can be used to request the next list of container registry - operations. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class OperationLogSpecificationDefinition(_serialization.Model): - """The definition of Azure Monitoring log. - - :ivar name: Log name. - :vartype name: str - :ivar display_name: Log display name. - :vartype display_name: str - :ivar blob_duration: Log blob duration. - :vartype blob_duration: str - """ - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "display_name": {"key": "displayName", "type": "str"}, - "blob_duration": {"key": "blobDuration", "type": "str"}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - display_name: Optional[str] = None, - blob_duration: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword name: Log name. - :paramtype name: str - :keyword display_name: Log display name. - :paramtype display_name: str - :keyword blob_duration: Log blob duration. - :paramtype blob_duration: str - """ - super().__init__(**kwargs) - self.name = name - self.display_name = display_name - self.blob_duration = blob_duration - - -class OperationMetricSpecificationDefinition(_serialization.Model): - """The definition of Azure Monitoring metric. - - :ivar name: Metric name. - :vartype name: str - :ivar display_name: Metric display name. - :vartype display_name: str - :ivar display_description: Metric description. - :vartype display_description: str - :ivar unit: Metric unit. - :vartype unit: str - :ivar aggregation_type: Metric aggregation type. - :vartype aggregation_type: str - :ivar internal_metric_name: Internal metric name. - :vartype internal_metric_name: str - """ - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "display_name": {"key": "displayName", "type": "str"}, - "display_description": {"key": "displayDescription", "type": "str"}, - "unit": {"key": "unit", "type": "str"}, - "aggregation_type": {"key": "aggregationType", "type": "str"}, - "internal_metric_name": {"key": "internalMetricName", "type": "str"}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - display_name: Optional[str] = None, - display_description: Optional[str] = None, - unit: Optional[str] = None, - aggregation_type: Optional[str] = None, - internal_metric_name: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword name: Metric name. - :paramtype name: str - :keyword display_name: Metric display name. - :paramtype display_name: str - :keyword display_description: Metric description. - :paramtype display_description: str - :keyword unit: Metric unit. - :paramtype unit: str - :keyword aggregation_type: Metric aggregation type. - :paramtype aggregation_type: str - :keyword internal_metric_name: Internal metric name. - :paramtype internal_metric_name: str - """ - super().__init__(**kwargs) - self.name = name - self.display_name = display_name - self.display_description = display_description - self.unit = unit - self.aggregation_type = aggregation_type - self.internal_metric_name = internal_metric_name - - -class OperationPropertiesDefinition(_serialization.Model): - """The definition of Azure Monitoring properties. - - :ivar service_specification: The definition of Azure Monitoring service. - :vartype service_specification: - ~container_registry_management_client.models.OperationServiceSpecificationDefinition - """ - - _attribute_map = { - "service_specification": {"key": "serviceSpecification", "type": "OperationServiceSpecificationDefinition"}, - } - - def __init__( - self, - *, - service_specification: Optional["_models.OperationServiceSpecificationDefinition"] = None, - **kwargs: Any - ) -> None: - """ - :keyword service_specification: The definition of Azure Monitoring service. - :paramtype service_specification: - ~container_registry_management_client.models.OperationServiceSpecificationDefinition - """ - super().__init__(**kwargs) - self.service_specification = service_specification - - -class OperationServiceSpecificationDefinition(_serialization.Model): - """The definition of Azure Monitoring list. - - :ivar metric_specifications: A list of Azure Monitoring metrics definition. - :vartype metric_specifications: - list[~container_registry_management_client.models.OperationMetricSpecificationDefinition] - :ivar log_specifications: A list of Azure Monitoring log definitions. - :vartype log_specifications: - list[~container_registry_management_client.models.OperationLogSpecificationDefinition] - """ - - _attribute_map = { - "metric_specifications": {"key": "metricSpecifications", "type": "[OperationMetricSpecificationDefinition]"}, - "log_specifications": {"key": "logSpecifications", "type": "[OperationLogSpecificationDefinition]"}, - } - - def __init__( - self, - *, - metric_specifications: Optional[list["_models.OperationMetricSpecificationDefinition"]] = None, - log_specifications: Optional[list["_models.OperationLogSpecificationDefinition"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword metric_specifications: A list of Azure Monitoring metrics definition. - :paramtype metric_specifications: - list[~container_registry_management_client.models.OperationMetricSpecificationDefinition] - :keyword log_specifications: A list of Azure Monitoring log definitions. - :paramtype log_specifications: - list[~container_registry_management_client.models.OperationLogSpecificationDefinition] - """ - super().__init__(**kwargs) - self.metric_specifications = metric_specifications - self.log_specifications = log_specifications - - -class ParentProperties(_serialization.Model): - """The properties of the connected registry parent. - - All required parameters must be populated in order to send to server. - - :ivar id: The resource ID of the parent to which the connected registry will be associated. - :vartype id: str - :ivar sync_properties: The sync properties of the connected registry with its parent. Required. - :vartype sync_properties: ~container_registry_management_client.models.SyncProperties - """ - - _validation = { - "sync_properties": {"required": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "sync_properties": {"key": "syncProperties", "type": "SyncProperties"}, - } - - def __init__( - self, - *, - sync_properties: "_models.SyncProperties", - id: Optional[str] = None, # pylint: disable=redefined-builtin - **kwargs: Any - ) -> None: - """ - :keyword id: The resource ID of the parent to which the connected registry will be associated. - :paramtype id: str - :keyword sync_properties: The sync properties of the connected registry with its parent. - Required. - :paramtype sync_properties: ~container_registry_management_client.models.SyncProperties - """ - super().__init__(**kwargs) - self.id = id - self.sync_properties = sync_properties - - -class PipelineRun(ProxyResource): - """An object that represents a pipeline run for a container registry. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~container_registry_management_client.models.SystemData - :ivar properties: The properties of a pipeline run. - :vartype properties: ~container_registry_management_client.models.PipelineRunProperties - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "properties": {"key": "properties", "type": "PipelineRunProperties"}, - } - - def __init__(self, *, properties: Optional["_models.PipelineRunProperties"] = None, **kwargs: Any) -> None: - """ - :keyword properties: The properties of a pipeline run. - :paramtype properties: ~container_registry_management_client.models.PipelineRunProperties - """ - super().__init__(**kwargs) - self.properties = properties - - -class PipelineRunListResult(_serialization.Model): - """The result of a request to list pipeline runs for a container registry. - - :ivar value: The list of pipeline runs. Since this list may be incomplete, the nextLink field - should be used to request the next list of pipeline runs. - :vartype value: list[~container_registry_management_client.models.PipelineRun] - :ivar next_link: The URI that can be used to request the next list of pipeline runs. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[PipelineRun]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, *, value: Optional[list["_models.PipelineRun"]] = None, next_link: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword value: The list of pipeline runs. Since this list may be incomplete, the nextLink - field should be used to request the next list of pipeline runs. - :paramtype value: list[~container_registry_management_client.models.PipelineRun] - :keyword next_link: The URI that can be used to request the next list of pipeline runs. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class PipelineRunProperties(_serialization.Model): - """The properties of a pipeline run. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar provisioning_state: The provisioning state of a pipeline run. Known values are: - "Creating", "Updating", "Deleting", "Succeeded", "Failed", and "Canceled". - :vartype provisioning_state: str or - ~container_registry_management_client.models.ProvisioningState - :ivar request: The request parameters for a pipeline run. - :vartype request: ~container_registry_management_client.models.PipelineRunRequest - :ivar response: The response of a pipeline run. - :vartype response: ~container_registry_management_client.models.PipelineRunResponse - :ivar force_update_tag: How the pipeline run should be forced to recreate even if the pipeline - run configuration has not changed. - :vartype force_update_tag: str - """ - - _validation = { - "provisioning_state": {"readonly": True}, - "response": {"readonly": True}, - } - - _attribute_map = { - "provisioning_state": {"key": "provisioningState", "type": "str"}, - "request": {"key": "request", "type": "PipelineRunRequest"}, - "response": {"key": "response", "type": "PipelineRunResponse"}, - "force_update_tag": {"key": "forceUpdateTag", "type": "str"}, - } - - def __init__( - self, - *, - request: Optional["_models.PipelineRunRequest"] = None, - force_update_tag: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword request: The request parameters for a pipeline run. - :paramtype request: ~container_registry_management_client.models.PipelineRunRequest - :keyword force_update_tag: How the pipeline run should be forced to recreate even if the - pipeline run configuration has not changed. - :paramtype force_update_tag: str - """ - super().__init__(**kwargs) - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - self.request = request - self.response: Optional["_models.PipelineRunResponse"] = None - self.force_update_tag = force_update_tag - - -class PipelineRunRequest(_serialization.Model): - """The request properties provided for a pipeline run. - - :ivar pipeline_resource_id: The resource ID of the pipeline to run. - :vartype pipeline_resource_id: str - :ivar artifacts: List of source artifacts to be transferred by the pipeline. Specify an image - by repository ('hello-world'). This will use the 'latest' tag. Specify an image by tag - ('hello-world:latest'). Specify an image by sha256-based manifest digest - ('hello-world@sha256:abc123'). - :vartype artifacts: list[str] - :ivar source: The source properties of the pipeline run. - :vartype source: ~container_registry_management_client.models.PipelineRunSourceProperties - :ivar target: The target properties of the pipeline run. - :vartype target: ~container_registry_management_client.models.PipelineRunTargetProperties - :ivar catalog_digest: The digest of the tar used to transfer the artifacts. - :vartype catalog_digest: str - """ - - _attribute_map = { - "pipeline_resource_id": {"key": "pipelineResourceId", "type": "str"}, - "artifacts": {"key": "artifacts", "type": "[str]"}, - "source": {"key": "source", "type": "PipelineRunSourceProperties"}, - "target": {"key": "target", "type": "PipelineRunTargetProperties"}, - "catalog_digest": {"key": "catalogDigest", "type": "str"}, - } - - def __init__( - self, - *, - pipeline_resource_id: Optional[str] = None, - artifacts: Optional[list[str]] = None, - source: Optional["_models.PipelineRunSourceProperties"] = None, - target: Optional["_models.PipelineRunTargetProperties"] = None, - catalog_digest: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword pipeline_resource_id: The resource ID of the pipeline to run. - :paramtype pipeline_resource_id: str - :keyword artifacts: List of source artifacts to be transferred by the pipeline. Specify an - image by repository ('hello-world'). This will use the 'latest' tag. Specify an image by tag - ('hello-world:latest'). Specify an image by sha256-based manifest digest - ('hello-world@sha256:abc123'). - :paramtype artifacts: list[str] - :keyword source: The source properties of the pipeline run. - :paramtype source: ~container_registry_management_client.models.PipelineRunSourceProperties - :keyword target: The target properties of the pipeline run. - :paramtype target: ~container_registry_management_client.models.PipelineRunTargetProperties - :keyword catalog_digest: The digest of the tar used to transfer the artifacts. - :paramtype catalog_digest: str - """ - super().__init__(**kwargs) - self.pipeline_resource_id = pipeline_resource_id - self.artifacts = artifacts - self.source = source - self.target = target - self.catalog_digest = catalog_digest - - -class PipelineRunResponse(_serialization.Model): - """The response properties returned for a pipeline run. - - :ivar status: The current status of the pipeline run. - :vartype status: str - :ivar imported_artifacts: The artifacts imported in the pipeline run. - :vartype imported_artifacts: list[str] - :ivar progress: The current progress of the copy operation. - :vartype progress: ~container_registry_management_client.models.ProgressProperties - :ivar start_time: The time the pipeline run started. - :vartype start_time: ~datetime.datetime - :ivar finish_time: The time the pipeline run finished. - :vartype finish_time: ~datetime.datetime - :ivar source: The source of the pipeline run. - :vartype source: ~container_registry_management_client.models.ImportPipelineSourceProperties - :ivar target: The target of the pipeline run. - :vartype target: ~container_registry_management_client.models.ExportPipelineTargetProperties - :ivar catalog_digest: The digest of the tar used to transfer the artifacts. - :vartype catalog_digest: str - :ivar trigger: The trigger that caused the pipeline run. - :vartype trigger: ~container_registry_management_client.models.PipelineTriggerDescriptor - :ivar pipeline_run_error_message: The detailed error message for the pipeline run in the case - of failure. - :vartype pipeline_run_error_message: str - """ - - _attribute_map = { - "status": {"key": "status", "type": "str"}, - "imported_artifacts": {"key": "importedArtifacts", "type": "[str]"}, - "progress": {"key": "progress", "type": "ProgressProperties"}, - "start_time": {"key": "startTime", "type": "iso-8601"}, - "finish_time": {"key": "finishTime", "type": "iso-8601"}, - "source": {"key": "source", "type": "ImportPipelineSourceProperties"}, - "target": {"key": "target", "type": "ExportPipelineTargetProperties"}, - "catalog_digest": {"key": "catalogDigest", "type": "str"}, - "trigger": {"key": "trigger", "type": "PipelineTriggerDescriptor"}, - "pipeline_run_error_message": {"key": "pipelineRunErrorMessage", "type": "str"}, - } - - def __init__( - self, - *, - status: Optional[str] = None, - imported_artifacts: Optional[list[str]] = None, - progress: Optional["_models.ProgressProperties"] = None, - start_time: Optional[datetime.datetime] = None, - finish_time: Optional[datetime.datetime] = None, - source: Optional["_models.ImportPipelineSourceProperties"] = None, - target: Optional["_models.ExportPipelineTargetProperties"] = None, - catalog_digest: Optional[str] = None, - trigger: Optional["_models.PipelineTriggerDescriptor"] = None, - pipeline_run_error_message: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword status: The current status of the pipeline run. - :paramtype status: str - :keyword imported_artifacts: The artifacts imported in the pipeline run. - :paramtype imported_artifacts: list[str] - :keyword progress: The current progress of the copy operation. - :paramtype progress: ~container_registry_management_client.models.ProgressProperties - :keyword start_time: The time the pipeline run started. - :paramtype start_time: ~datetime.datetime - :keyword finish_time: The time the pipeline run finished. - :paramtype finish_time: ~datetime.datetime - :keyword source: The source of the pipeline run. - :paramtype source: ~container_registry_management_client.models.ImportPipelineSourceProperties - :keyword target: The target of the pipeline run. - :paramtype target: ~container_registry_management_client.models.ExportPipelineTargetProperties - :keyword catalog_digest: The digest of the tar used to transfer the artifacts. - :paramtype catalog_digest: str - :keyword trigger: The trigger that caused the pipeline run. - :paramtype trigger: ~container_registry_management_client.models.PipelineTriggerDescriptor - :keyword pipeline_run_error_message: The detailed error message for the pipeline run in the - case of failure. - :paramtype pipeline_run_error_message: str - """ - super().__init__(**kwargs) - self.status = status - self.imported_artifacts = imported_artifacts - self.progress = progress - self.start_time = start_time - self.finish_time = finish_time - self.source = source - self.target = target - self.catalog_digest = catalog_digest - self.trigger = trigger - self.pipeline_run_error_message = pipeline_run_error_message - - -class PipelineRunSourceProperties(_serialization.Model): - """The pipeline run source properties. - - :ivar type: The type of the source. "AzureStorageBlob" - :vartype type: str or ~container_registry_management_client.models.PipelineRunSourceType - :ivar name: The name of the source. - :vartype name: str - """ - - _attribute_map = { - "type": {"key": "type", "type": "str"}, - "name": {"key": "name", "type": "str"}, - } - - def __init__( - self, - *, - type: Union[str, "_models.PipelineRunSourceType"] = "AzureStorageBlob", - name: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword type: The type of the source. "AzureStorageBlob" - :paramtype type: str or ~container_registry_management_client.models.PipelineRunSourceType - :keyword name: The name of the source. - :paramtype name: str - """ - super().__init__(**kwargs) - self.type = type - self.name = name - - -class PipelineRunTargetProperties(_serialization.Model): - """The pipeline run target properties. - - :ivar type: The type of the target. "AzureStorageBlob" - :vartype type: str or ~container_registry_management_client.models.PipelineRunTargetType - :ivar name: The name of the target. - :vartype name: str - """ - - _attribute_map = { - "type": {"key": "type", "type": "str"}, - "name": {"key": "name", "type": "str"}, - } - - def __init__( - self, - *, - type: Union[str, "_models.PipelineRunTargetType"] = "AzureStorageBlob", - name: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword type: The type of the target. "AzureStorageBlob" - :paramtype type: str or ~container_registry_management_client.models.PipelineRunTargetType - :keyword name: The name of the target. - :paramtype name: str - """ - super().__init__(**kwargs) - self.type = type - self.name = name - - -class PipelineSourceTriggerDescriptor(_serialization.Model): - """The pipeline source trigger descriptor. - - :ivar timestamp: The timestamp when the source update happened. - :vartype timestamp: ~datetime.datetime - """ - - _attribute_map = { - "timestamp": {"key": "timestamp", "type": "iso-8601"}, - } - - def __init__(self, *, timestamp: Optional[datetime.datetime] = None, **kwargs: Any) -> None: - """ - :keyword timestamp: The timestamp when the source update happened. - :paramtype timestamp: ~datetime.datetime - """ - super().__init__(**kwargs) - self.timestamp = timestamp - - -class PipelineSourceTriggerProperties(_serialization.Model): - """The source trigger properties of the import pipeline. - - All required parameters must be populated in order to send to server. - - :ivar status: The current status of the source trigger. Known values are: "Enabled" and - "Disabled". - :vartype status: str or ~container_registry_management_client.models.TriggerStatus - """ - - _validation = { - "status": {"required": True}, - } - - _attribute_map = { - "status": {"key": "status", "type": "str"}, - } - - def __init__(self, *, status: Union[str, "_models.TriggerStatus"] = "Enabled", **kwargs: Any) -> None: - """ - :keyword status: The current status of the source trigger. Known values are: "Enabled" and - "Disabled". - :paramtype status: str or ~container_registry_management_client.models.TriggerStatus - """ - super().__init__(**kwargs) - self.status = status - - -class PipelineTriggerDescriptor(_serialization.Model): - """The pipeline trigger descriptor. - - :ivar source_trigger: The source trigger that caused the pipeline run. - :vartype source_trigger: - ~container_registry_management_client.models.PipelineSourceTriggerDescriptor - """ - - _attribute_map = { - "source_trigger": {"key": "sourceTrigger", "type": "PipelineSourceTriggerDescriptor"}, - } - - def __init__( - self, *, source_trigger: Optional["_models.PipelineSourceTriggerDescriptor"] = None, **kwargs: Any - ) -> None: - """ - :keyword source_trigger: The source trigger that caused the pipeline run. - :paramtype source_trigger: - ~container_registry_management_client.models.PipelineSourceTriggerDescriptor - """ - super().__init__(**kwargs) - self.source_trigger = source_trigger - - -class PipelineTriggerProperties(_serialization.Model): - """The trigger properties of the import pipeline. - - :ivar source_trigger: The source trigger properties of the pipeline. - :vartype source_trigger: - ~container_registry_management_client.models.PipelineSourceTriggerProperties - """ - - _attribute_map = { - "source_trigger": {"key": "sourceTrigger", "type": "PipelineSourceTriggerProperties"}, - } - - def __init__( - self, *, source_trigger: Optional["_models.PipelineSourceTriggerProperties"] = None, **kwargs: Any - ) -> None: - """ - :keyword source_trigger: The source trigger properties of the pipeline. - :paramtype source_trigger: - ~container_registry_management_client.models.PipelineSourceTriggerProperties - """ - super().__init__(**kwargs) - self.source_trigger = source_trigger - - -class Policies(_serialization.Model): - """The policies for a container registry. - - :ivar quarantine_policy: The quarantine policy for a container registry. - :vartype quarantine_policy: ~container_registry_management_client.models.QuarantinePolicy - :ivar trust_policy: The content trust policy for a container registry. - :vartype trust_policy: ~container_registry_management_client.models.TrustPolicy - :ivar retention_policy: The retention policy for a container registry. - :vartype retention_policy: ~container_registry_management_client.models.RetentionPolicy - :ivar export_policy: The export policy for a container registry. - :vartype export_policy: ~container_registry_management_client.models.ExportPolicy - :ivar azure_ad_authentication_as_arm_policy: The policy for using Azure Resource Manager - audience token for a container registry. - :vartype azure_ad_authentication_as_arm_policy: - ~container_registry_management_client.models.AzureADAuthenticationAsArmPolicy - :ivar soft_delete_policy: The soft delete policy for a container registry. - :vartype soft_delete_policy: ~container_registry_management_client.models.SoftDeletePolicy - """ - - _attribute_map = { - "quarantine_policy": {"key": "quarantinePolicy", "type": "QuarantinePolicy"}, - "trust_policy": {"key": "trustPolicy", "type": "TrustPolicy"}, - "retention_policy": {"key": "retentionPolicy", "type": "RetentionPolicy"}, - "export_policy": {"key": "exportPolicy", "type": "ExportPolicy"}, - "azure_ad_authentication_as_arm_policy": { - "key": "azureADAuthenticationAsArmPolicy", - "type": "AzureADAuthenticationAsArmPolicy", - }, - "soft_delete_policy": {"key": "softDeletePolicy", "type": "SoftDeletePolicy"}, - } - - def __init__( - self, - *, - quarantine_policy: Optional["_models.QuarantinePolicy"] = None, - trust_policy: Optional["_models.TrustPolicy"] = None, - retention_policy: Optional["_models.RetentionPolicy"] = None, - export_policy: Optional["_models.ExportPolicy"] = None, - azure_ad_authentication_as_arm_policy: Optional["_models.AzureADAuthenticationAsArmPolicy"] = None, - soft_delete_policy: Optional["_models.SoftDeletePolicy"] = None, - **kwargs: Any - ) -> None: - """ - :keyword quarantine_policy: The quarantine policy for a container registry. - :paramtype quarantine_policy: ~container_registry_management_client.models.QuarantinePolicy - :keyword trust_policy: The content trust policy for a container registry. - :paramtype trust_policy: ~container_registry_management_client.models.TrustPolicy - :keyword retention_policy: The retention policy for a container registry. - :paramtype retention_policy: ~container_registry_management_client.models.RetentionPolicy - :keyword export_policy: The export policy for a container registry. - :paramtype export_policy: ~container_registry_management_client.models.ExportPolicy - :keyword azure_ad_authentication_as_arm_policy: The policy for using Azure Resource Manager - audience token for a container registry. - :paramtype azure_ad_authentication_as_arm_policy: - ~container_registry_management_client.models.AzureADAuthenticationAsArmPolicy - :keyword soft_delete_policy: The soft delete policy for a container registry. - :paramtype soft_delete_policy: ~container_registry_management_client.models.SoftDeletePolicy - """ - super().__init__(**kwargs) - self.quarantine_policy = quarantine_policy - self.trust_policy = trust_policy - self.retention_policy = retention_policy - self.export_policy = export_policy - self.azure_ad_authentication_as_arm_policy = azure_ad_authentication_as_arm_policy - self.soft_delete_policy = soft_delete_policy - - -class PrivateEndpoint(_serialization.Model): - """The Private Endpoint resource. - - :ivar id: This is private endpoint resource created with Microsoft.Network resource provider. - :vartype id: str - """ - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - } - - def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin - """ - :keyword id: This is private endpoint resource created with Microsoft.Network resource - provider. - :paramtype id: str - """ - super().__init__(**kwargs) - self.id = id - - -class PrivateEndpointConnection(ProxyResource): - """An object that represents a private endpoint connection for a container registry. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~container_registry_management_client.models.SystemData - :ivar properties: The properties of a private endpoint connection. - :vartype properties: - ~container_registry_management_client.models.PrivateEndpointConnectionProperties - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "properties": {"key": "properties", "type": "PrivateEndpointConnectionProperties"}, - } - - def __init__( - self, *, properties: Optional["_models.PrivateEndpointConnectionProperties"] = None, **kwargs: Any - ) -> None: - """ - :keyword properties: The properties of a private endpoint connection. - :paramtype properties: - ~container_registry_management_client.models.PrivateEndpointConnectionProperties - """ - super().__init__(**kwargs) - self.properties = properties - - -class PrivateEndpointConnectionListResult(_serialization.Model): - """The result of a request to list private endpoint connections for a container registry. - - :ivar value: The list of private endpoint connections. Since this list may be incomplete, the - nextLink field should be used to request the next list of private endpoint connections. - :vartype value: list[~container_registry_management_client.models.PrivateEndpointConnection] - :ivar next_link: The URI that can be used to request the next list of private endpoint - connections. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[PrivateEndpointConnection]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.PrivateEndpointConnection"]] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: The list of private endpoint connections. Since this list may be incomplete, - the nextLink field should be used to request the next list of private endpoint connections. - :paramtype value: list[~container_registry_management_client.models.PrivateEndpointConnection] - :keyword next_link: The URI that can be used to request the next list of private endpoint - connections. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class PrivateEndpointConnectionProperties(_serialization.Model): - """The properties of a private endpoint connection. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar private_endpoint: The resource of private endpoint. - :vartype private_endpoint: ~container_registry_management_client.models.PrivateEndpoint - :ivar private_link_service_connection_state: A collection of information about the state of the - connection between service consumer and provider. - :vartype private_link_service_connection_state: - ~container_registry_management_client.models.PrivateLinkServiceConnectionState - :ivar provisioning_state: The provisioning state of private endpoint connection resource. Known - values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and "Canceled". - :vartype provisioning_state: str or - ~container_registry_management_client.models.ProvisioningState - """ - - _validation = { - "provisioning_state": {"readonly": True}, - } - - _attribute_map = { - "private_endpoint": {"key": "privateEndpoint", "type": "PrivateEndpoint"}, - "private_link_service_connection_state": { - "key": "privateLinkServiceConnectionState", - "type": "PrivateLinkServiceConnectionState", - }, - "provisioning_state": {"key": "provisioningState", "type": "str"}, - } - - def __init__( - self, - *, - private_endpoint: Optional["_models.PrivateEndpoint"] = None, - private_link_service_connection_state: Optional["_models.PrivateLinkServiceConnectionState"] = None, - **kwargs: Any - ) -> None: - """ - :keyword private_endpoint: The resource of private endpoint. - :paramtype private_endpoint: ~container_registry_management_client.models.PrivateEndpoint - :keyword private_link_service_connection_state: A collection of information about the state of - the connection between service consumer and provider. - :paramtype private_link_service_connection_state: - ~container_registry_management_client.models.PrivateLinkServiceConnectionState - """ - super().__init__(**kwargs) - self.private_endpoint = private_endpoint - self.private_link_service_connection_state = private_link_service_connection_state - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - - -class PrivateLinkResource(Resource): - """A private link resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~container_registry_management_client.models.SystemData - :ivar properties: Resource properties. - :vartype properties: ~container_registry_management_client.models.PrivateLinkResourceProperties - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "properties": {"key": "properties", "type": "PrivateLinkResourceProperties"}, - } - - def __init__(self, *, properties: Optional["_models.PrivateLinkResourceProperties"] = None, **kwargs: Any) -> None: - """ - :keyword properties: Resource properties. - :paramtype properties: - ~container_registry_management_client.models.PrivateLinkResourceProperties - """ - super().__init__(**kwargs) - self.properties = properties - - -class PrivateLinkResourceListResult(_serialization.Model): - """The result of a request to list private link resources for a container registry. - - :ivar value: The list of private link resources. Since this list may be incomplete, the - nextLink field should be used to request the next list of private link resources. - :vartype value: list[~container_registry_management_client.models.PrivateLinkResource] - :ivar next_link: The URI that can be used to request the next list of private link resources. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[PrivateLinkResource]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[list["_models.PrivateLinkResource"]] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: The list of private link resources. Since this list may be incomplete, the - nextLink field should be used to request the next list of private link resources. - :paramtype value: list[~container_registry_management_client.models.PrivateLinkResource] - :keyword next_link: The URI that can be used to request the next list of private link - resources. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class PrivateLinkResourceProperties(_serialization.Model): - """Properties of a private link resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar group_id: The private link resource group id. - :vartype group_id: str - :ivar required_members: The private link resource required member names. - :vartype required_members: list[str] - :ivar required_zone_names: The private link resource private link DNS zone name. - :vartype required_zone_names: list[str] - """ - - _validation = { - "group_id": {"readonly": True}, - "required_members": {"readonly": True}, - } - - _attribute_map = { - "group_id": {"key": "groupId", "type": "str"}, - "required_members": {"key": "requiredMembers", "type": "[str]"}, - "required_zone_names": {"key": "requiredZoneNames", "type": "[str]"}, - } - - def __init__(self, *, required_zone_names: Optional[list[str]] = None, **kwargs: Any) -> None: - """ - :keyword required_zone_names: The private link resource private link DNS zone name. - :paramtype required_zone_names: list[str] - """ - super().__init__(**kwargs) - self.group_id: Optional[str] = None - self.required_members: Optional[list[str]] = None - self.required_zone_names = required_zone_names - - -class PrivateLinkServiceConnectionState(_serialization.Model): - """The state of a private link service connection. - - :ivar status: The private link service connection status. Known values are: "Approved", - "Pending", "Rejected", and "Disconnected". - :vartype status: str or ~container_registry_management_client.models.ConnectionStatus - :ivar description: The description for connection status. For example if connection is rejected - it can indicate reason for rejection. - :vartype description: str - :ivar actions_required: A message indicating if changes on the service provider require any - updates on the consumer. Known values are: "None" and "Recreate". - :vartype actions_required: str or ~container_registry_management_client.models.ActionsRequired - """ - - _attribute_map = { - "status": {"key": "status", "type": "str"}, - "description": {"key": "description", "type": "str"}, - "actions_required": {"key": "actionsRequired", "type": "str"}, - } - - def __init__( - self, - *, - status: Optional[Union[str, "_models.ConnectionStatus"]] = None, - description: Optional[str] = None, - actions_required: Optional[Union[str, "_models.ActionsRequired"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword status: The private link service connection status. Known values are: "Approved", - "Pending", "Rejected", and "Disconnected". - :paramtype status: str or ~container_registry_management_client.models.ConnectionStatus - :keyword description: The description for connection status. For example if connection is - rejected it can indicate reason for rejection. - :paramtype description: str - :keyword actions_required: A message indicating if changes on the service provider require any - updates on the consumer. Known values are: "None" and "Recreate". - :paramtype actions_required: str or - ~container_registry_management_client.models.ActionsRequired - """ - super().__init__(**kwargs) - self.status = status - self.description = description - self.actions_required = actions_required - - -class ProgressProperties(_serialization.Model): - """The progress properties. - - :ivar percentage: The percentage complete of the copy operation. - :vartype percentage: str - """ - - _attribute_map = { - "percentage": {"key": "percentage", "type": "str"}, - } - - def __init__(self, *, percentage: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword percentage: The percentage complete of the copy operation. - :paramtype percentage: str - """ - super().__init__(**kwargs) - self.percentage = percentage - - -class QuarantinePolicy(_serialization.Model): - """The quarantine policy for a container registry. - - :ivar status: The value that indicates whether the policy is enabled or not. Known values are: - "enabled" and "disabled". - :vartype status: str or ~container_registry_management_client.models.PolicyStatus - """ - - _attribute_map = { - "status": {"key": "status", "type": "str"}, - } - - def __init__(self, *, status: Optional[Union[str, "_models.PolicyStatus"]] = None, **kwargs: Any) -> None: - """ - :keyword status: The value that indicates whether the policy is enabled or not. Known values - are: "enabled" and "disabled". - :paramtype status: str or ~container_registry_management_client.models.PolicyStatus - """ - super().__init__(**kwargs) - self.status = status - - -class RegenerateCredentialParameters(_serialization.Model): - """The parameters used to regenerate the login credential. - - All required parameters must be populated in order to send to server. - - :ivar name: Specifies name of the password which should be regenerated -- password or - password2. Required. Known values are: "password" and "password2". - :vartype name: str or ~container_registry_management_client.models.PasswordName - """ - - _validation = { - "name": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - } - - def __init__(self, *, name: Union[str, "_models.PasswordName"], **kwargs: Any) -> None: - """ - :keyword name: Specifies name of the password which should be regenerated -- password or - password2. Required. Known values are: "password" and "password2". - :paramtype name: str or ~container_registry_management_client.models.PasswordName - """ - super().__init__(**kwargs) - self.name = name - - -class TrackedResource(Resource): - """The resource model definition for an Azure Resource Manager tracked top level resource which - has 'tags' and a 'location'. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~container_registry_management_client.models.SystemData - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar location: The geo-location where the resource lives. Required. - :vartype location: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "location": {"required": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "tags": {"key": "tags", "type": "{str}"}, - "location": {"key": "location", "type": "str"}, - } - - def __init__(self, *, location: str, tags: Optional[dict[str, str]] = None, **kwargs: Any) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword location: The geo-location where the resource lives. Required. - :paramtype location: str - """ - super().__init__(**kwargs) - self.tags = tags - self.location = location - - -class Registry(TrackedResource): - """An object that represents a container registry. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~container_registry_management_client.models.SystemData - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar location: The geo-location where the resource lives. Required. - :vartype location: str - :ivar properties: The properties of the container registry. - :vartype properties: ~container_registry_management_client.models.RegistryProperties - :ivar sku: The SKU of the container registry. Required. - :vartype sku: ~container_registry_management_client.models.Sku - :ivar identity: The identity of the container registry. - :vartype identity: ~container_registry_management_client.models.IdentityProperties - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "location": {"required": True}, - "sku": {"required": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "tags": {"key": "tags", "type": "{str}"}, - "location": {"key": "location", "type": "str"}, - "properties": {"key": "properties", "type": "RegistryProperties"}, - "sku": {"key": "sku", "type": "Sku"}, - "identity": {"key": "identity", "type": "IdentityProperties"}, - } - - def __init__( - self, - *, - location: str, - sku: "_models.Sku", - tags: Optional[dict[str, str]] = None, - properties: Optional["_models.RegistryProperties"] = None, - identity: Optional["_models.IdentityProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword location: The geo-location where the resource lives. Required. - :paramtype location: str - :keyword properties: The properties of the container registry. - :paramtype properties: ~container_registry_management_client.models.RegistryProperties - :keyword sku: The SKU of the container registry. Required. - :paramtype sku: ~container_registry_management_client.models.Sku - :keyword identity: The identity of the container registry. - :paramtype identity: ~container_registry_management_client.models.IdentityProperties - """ - super().__init__(tags=tags, location=location, **kwargs) - self.properties = properties - self.sku = sku - self.identity = identity - - -class RegistryListCredentialsResult(_serialization.Model): - """The response from the ListCredentials operation. - - :ivar username: The username for a container registry. - :vartype username: str - :ivar passwords: The list of passwords for a container registry. - :vartype passwords: list[~container_registry_management_client.models.RegistryPassword] - """ - - _attribute_map = { - "username": {"key": "username", "type": "str"}, - "passwords": {"key": "passwords", "type": "[RegistryPassword]"}, - } - - def __init__( - self, - *, - username: Optional[str] = None, - passwords: Optional[list["_models.RegistryPassword"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword username: The username for a container registry. - :paramtype username: str - :keyword passwords: The list of passwords for a container registry. - :paramtype passwords: list[~container_registry_management_client.models.RegistryPassword] - """ - super().__init__(**kwargs) - self.username = username - self.passwords = passwords - - -class RegistryListResult(_serialization.Model): - """The result of a request to list container registries. - - :ivar value: The list of container registries. Since this list may be incomplete, the nextLink - field should be used to request the next list of container registries. - :vartype value: list[~container_registry_management_client.models.Registry] - :ivar next_link: The URI that can be used to request the next list of container registries. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[Registry]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, *, value: Optional[list["_models.Registry"]] = None, next_link: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword value: The list of container registries. Since this list may be incomplete, the - nextLink field should be used to request the next list of container registries. - :paramtype value: list[~container_registry_management_client.models.Registry] - :keyword next_link: The URI that can be used to request the next list of container registries. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class RegistryNameCheckRequest(_serialization.Model): - """A request to check whether a container registry name is available. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :ivar name: The name of the container registry. Required. - :vartype name: str - :ivar type: The resource type of the container registry. This field must be set to - 'Microsoft.ContainerRegistry/registries'. Required. Default value is - "Microsoft.ContainerRegistry/registries". - :vartype type: str - :ivar resource_group_name: The resource group name of the container registry. - :vartype resource_group_name: str - :ivar auto_generated_domain_name_label_scope: The auto generated domain name label of the - container registry. This value defaults to "Unsecure". Known values are: "Unsecure", - "TenantReuse", "SubscriptionReuse", "ResourceGroupReuse", and "NoReuse". - :vartype auto_generated_domain_name_label_scope: str or - ~container_registry_management_client.models.AutoGeneratedDomainNameLabelScope - """ - - _validation = { - "name": {"required": True, "max_length": 50, "min_length": 5, "pattern": r"^[a-zA-Z0-9]*$"}, - "type": {"required": True, "constant": True}, - "resource_group_name": {"max_length": 90, "min_length": 1}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "resource_group_name": {"key": "resourceGroupName", "type": "str"}, - "auto_generated_domain_name_label_scope": {"key": "autoGeneratedDomainNameLabelScope", "type": "str"}, - } - - type = "Microsoft.ContainerRegistry/registries" - - def __init__( - self, - *, - name: str, - resource_group_name: Optional[str] = None, - auto_generated_domain_name_label_scope: Optional[ - Union[str, "_models.AutoGeneratedDomainNameLabelScope"] - ] = None, - **kwargs: Any - ) -> None: - """ - :keyword name: The name of the container registry. Required. - :paramtype name: str - :keyword resource_group_name: The resource group name of the container registry. - :paramtype resource_group_name: str - :keyword auto_generated_domain_name_label_scope: The auto generated domain name label of the - container registry. This value defaults to "Unsecure". Known values are: "Unsecure", - "TenantReuse", "SubscriptionReuse", "ResourceGroupReuse", and "NoReuse". - :paramtype auto_generated_domain_name_label_scope: str or - ~container_registry_management_client.models.AutoGeneratedDomainNameLabelScope - """ - super().__init__(**kwargs) - self.name = name - self.resource_group_name = resource_group_name - self.auto_generated_domain_name_label_scope = auto_generated_domain_name_label_scope - - -class RegistryNameStatus(_serialization.Model): - """The result of a request to check the availability of a container registry name. - - :ivar available_login_server_name: The complete login server name with domain name label (DNL) - hash, if available. - :vartype available_login_server_name: str - :ivar name_available: The value that indicates whether the name is available. - :vartype name_available: bool - :ivar reason: If any, the reason that the name is not available. - :vartype reason: str - :ivar message: If any, the error message that provides more detail for the reason that the name - is not available. - :vartype message: str - """ - - _attribute_map = { - "available_login_server_name": {"key": "availableLoginServerName", "type": "str"}, - "name_available": {"key": "nameAvailable", "type": "bool"}, - "reason": {"key": "reason", "type": "str"}, - "message": {"key": "message", "type": "str"}, - } - - def __init__( - self, - *, - available_login_server_name: Optional[str] = None, - name_available: Optional[bool] = None, - reason: Optional[str] = None, - message: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword available_login_server_name: The complete login server name with domain name label - (DNL) hash, if available. - :paramtype available_login_server_name: str - :keyword name_available: The value that indicates whether the name is available. - :paramtype name_available: bool - :keyword reason: If any, the reason that the name is not available. - :paramtype reason: str - :keyword message: If any, the error message that provides more detail for the reason that the - name is not available. - :paramtype message: str - """ - super().__init__(**kwargs) - self.available_login_server_name = available_login_server_name - self.name_available = name_available - self.reason = reason - self.message = message - - -class RegistryPassword(_serialization.Model): - """The login password for the container registry. - - :ivar name: The password name. Known values are: "password" and "password2". - :vartype name: str or ~container_registry_management_client.models.PasswordName - :ivar value: The password value. - :vartype value: str - """ - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "value": {"key": "value", "type": "str"}, - } - - def __init__( - self, *, name: Optional[Union[str, "_models.PasswordName"]] = None, value: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword name: The password name. Known values are: "password" and "password2". - :paramtype name: str or ~container_registry_management_client.models.PasswordName - :keyword value: The password value. - :paramtype value: str - """ - super().__init__(**kwargs) - self.name = name - self.value = value - - -class RegistryProperties(_serialization.Model): - """The properties of a container registry. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar login_server: The URL that can be used to log into the container registry. - :vartype login_server: str - :ivar creation_date: The creation date of the container registry in ISO8601 format. - :vartype creation_date: ~datetime.datetime - :ivar provisioning_state: The provisioning state of the container registry at the time the - operation was called. Known values are: "Creating", "Updating", "Deleting", "Succeeded", - "Failed", and "Canceled". - :vartype provisioning_state: str or - ~container_registry_management_client.models.ProvisioningState - :ivar status: The status of the container registry at the time the operation was called. - :vartype status: ~container_registry_management_client.models.Status - :ivar admin_user_enabled: The value that indicates whether the admin user is enabled. - :vartype admin_user_enabled: bool - :ivar network_rule_set: The network rule set for a container registry. - :vartype network_rule_set: ~container_registry_management_client.models.NetworkRuleSet - :ivar policies: The policies for a container registry. - :vartype policies: ~container_registry_management_client.models.Policies - :ivar encryption: The encryption settings of container registry. - :vartype encryption: ~container_registry_management_client.models.EncryptionProperty - :ivar data_endpoint_enabled: Enable a single data endpoint per region for serving data. - :vartype data_endpoint_enabled: bool - :ivar data_endpoint_host_names: List of host names that will serve data when - dataEndpointEnabled is true. - :vartype data_endpoint_host_names: list[str] - :ivar regional_endpoints: Enable per-region endpoints for accessing registry. Known values are: - "Enabled" and "Disabled". - :vartype regional_endpoints: str or - ~container_registry_management_client.models.RegionalEndpoints - :ivar regional_endpoint_host_names: List of host names that will serve registry when - RegionalEndpoints is enabled. - :vartype regional_endpoint_host_names: list[str] - :ivar endpoint_protocol: The connectivity protocol for the registry, such as IPv4 or dual stack - (IPv4 and IPv6). Known values are: "IPv4" and "IPv4AndIPv6". - :vartype endpoint_protocol: str or - ~container_registry_management_client.models.EndpointProtocol - :ivar private_endpoint_connections: List of private endpoint connections for a container - registry. - :vartype private_endpoint_connections: - list[~container_registry_management_client.models.PrivateEndpointConnection] - :ivar public_network_access: Whether or not public network access is allowed for the container - registry. Known values are: "Enabled" and "Disabled". - :vartype public_network_access: str or - ~container_registry_management_client.models.PublicNetworkAccess - :ivar network_rule_bypass_options: Whether to allow trusted Azure services to access a network - restricted registry. Known values are: "AzureServices" and "None". - :vartype network_rule_bypass_options: str or - ~container_registry_management_client.models.NetworkRuleBypassOptions - :ivar network_rule_bypass_allowed_for_tasks: Whether or not Tasks allowed to bypass the network - rules for this container registry. - :vartype network_rule_bypass_allowed_for_tasks: bool - :ivar zone_redundancy: Whether or not zone redundancy is enabled for this container registry. - Known values are: "Enabled" and "Disabled". - :vartype zone_redundancy: str or ~container_registry_management_client.models.ZoneRedundancy - :ivar anonymous_pull_enabled: Enables registry-wide pull from unauthenticated clients. - :vartype anonymous_pull_enabled: bool - :ivar metadata_search: Determines whether registry artifacts are indexed for metadata search. - Known values are: "Enabled" and "Disabled". - :vartype metadata_search: str or ~container_registry_management_client.models.MetadataSearch - :ivar auto_generated_domain_name_label_scope: Determines the domain name label reuse scope. - Known values are: "Unsecure", "TenantReuse", "SubscriptionReuse", "ResourceGroupReuse", and - "NoReuse". - :vartype auto_generated_domain_name_label_scope: str or - ~container_registry_management_client.models.AutoGeneratedDomainNameLabelScope - :ivar role_assignment_mode: Determines registry role assignment mode. Known values are: - "AbacRepositoryPermissions" and "LegacyRegistryPermissions". - :vartype role_assignment_mode: str or - ~container_registry_management_client.models.RoleAssignmentMode - """ - - _validation = { - "login_server": {"readonly": True}, - "creation_date": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "status": {"readonly": True}, - "data_endpoint_host_names": {"readonly": True}, - "regional_endpoint_host_names": {"readonly": True}, - "private_endpoint_connections": {"readonly": True}, - } - - _attribute_map = { - "login_server": {"key": "loginServer", "type": "str"}, - "creation_date": {"key": "creationDate", "type": "iso-8601"}, - "provisioning_state": {"key": "provisioningState", "type": "str"}, - "status": {"key": "status", "type": "Status"}, - "admin_user_enabled": {"key": "adminUserEnabled", "type": "bool"}, - "network_rule_set": {"key": "networkRuleSet", "type": "NetworkRuleSet"}, - "policies": {"key": "policies", "type": "Policies"}, - "encryption": {"key": "encryption", "type": "EncryptionProperty"}, - "data_endpoint_enabled": {"key": "dataEndpointEnabled", "type": "bool"}, - "data_endpoint_host_names": {"key": "dataEndpointHostNames", "type": "[str]"}, - "regional_endpoints": {"key": "regionalEndpoints", "type": "str"}, - "regional_endpoint_host_names": {"key": "regionalEndpointHostNames", "type": "[str]"}, - "endpoint_protocol": {"key": "endpointProtocol", "type": "str"}, - "private_endpoint_connections": {"key": "privateEndpointConnections", "type": "[PrivateEndpointConnection]"}, - "public_network_access": {"key": "publicNetworkAccess", "type": "str"}, - "network_rule_bypass_options": {"key": "networkRuleBypassOptions", "type": "str"}, - "network_rule_bypass_allowed_for_tasks": {"key": "networkRuleBypassAllowedForTasks", "type": "bool"}, - "zone_redundancy": {"key": "zoneRedundancy", "type": "str"}, - "anonymous_pull_enabled": {"key": "anonymousPullEnabled", "type": "bool"}, - "metadata_search": {"key": "metadataSearch", "type": "str"}, - "auto_generated_domain_name_label_scope": {"key": "autoGeneratedDomainNameLabelScope", "type": "str"}, - "role_assignment_mode": {"key": "roleAssignmentMode", "type": "str"}, - } - - def __init__( - self, - *, - admin_user_enabled: bool = False, - network_rule_set: Optional["_models.NetworkRuleSet"] = None, - policies: Optional["_models.Policies"] = None, - encryption: Optional["_models.EncryptionProperty"] = None, - data_endpoint_enabled: Optional[bool] = None, - regional_endpoints: Optional[Union[str, "_models.RegionalEndpoints"]] = None, - endpoint_protocol: Optional[Union[str, "_models.EndpointProtocol"]] = None, - public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, - network_rule_bypass_options: Optional[Union[str, "_models.NetworkRuleBypassOptions"]] = None, - network_rule_bypass_allowed_for_tasks: bool = False, - zone_redundancy: Optional[Union[str, "_models.ZoneRedundancy"]] = None, - anonymous_pull_enabled: bool = False, - metadata_search: Optional[Union[str, "_models.MetadataSearch"]] = None, - auto_generated_domain_name_label_scope: Optional[ - Union[str, "_models.AutoGeneratedDomainNameLabelScope"] - ] = None, - role_assignment_mode: Optional[Union[str, "_models.RoleAssignmentMode"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword admin_user_enabled: The value that indicates whether the admin user is enabled. - :paramtype admin_user_enabled: bool - :keyword network_rule_set: The network rule set for a container registry. - :paramtype network_rule_set: ~container_registry_management_client.models.NetworkRuleSet - :keyword policies: The policies for a container registry. - :paramtype policies: ~container_registry_management_client.models.Policies - :keyword encryption: The encryption settings of container registry. - :paramtype encryption: ~container_registry_management_client.models.EncryptionProperty - :keyword data_endpoint_enabled: Enable a single data endpoint per region for serving data. - :paramtype data_endpoint_enabled: bool - :keyword regional_endpoints: Enable per-region endpoints for accessing registry. Known values - are: "Enabled" and "Disabled". - :paramtype regional_endpoints: str or - ~container_registry_management_client.models.RegionalEndpoints - :keyword endpoint_protocol: The connectivity protocol for the registry, such as IPv4 or dual - stack (IPv4 and IPv6). Known values are: "IPv4" and "IPv4AndIPv6". - :paramtype endpoint_protocol: str or - ~container_registry_management_client.models.EndpointProtocol - :keyword public_network_access: Whether or not public network access is allowed for the - container registry. Known values are: "Enabled" and "Disabled". - :paramtype public_network_access: str or - ~container_registry_management_client.models.PublicNetworkAccess - :keyword network_rule_bypass_options: Whether to allow trusted Azure services to access a - network restricted registry. Known values are: "AzureServices" and "None". - :paramtype network_rule_bypass_options: str or - ~container_registry_management_client.models.NetworkRuleBypassOptions - :keyword network_rule_bypass_allowed_for_tasks: Whether or not Tasks allowed to bypass the - network rules for this container registry. - :paramtype network_rule_bypass_allowed_for_tasks: bool - :keyword zone_redundancy: Whether or not zone redundancy is enabled for this container - registry. Known values are: "Enabled" and "Disabled". - :paramtype zone_redundancy: str or ~container_registry_management_client.models.ZoneRedundancy - :keyword anonymous_pull_enabled: Enables registry-wide pull from unauthenticated clients. - :paramtype anonymous_pull_enabled: bool - :keyword metadata_search: Determines whether registry artifacts are indexed for metadata - search. Known values are: "Enabled" and "Disabled". - :paramtype metadata_search: str or ~container_registry_management_client.models.MetadataSearch - :keyword auto_generated_domain_name_label_scope: Determines the domain name label reuse scope. - Known values are: "Unsecure", "TenantReuse", "SubscriptionReuse", "ResourceGroupReuse", and - "NoReuse". - :paramtype auto_generated_domain_name_label_scope: str or - ~container_registry_management_client.models.AutoGeneratedDomainNameLabelScope - :keyword role_assignment_mode: Determines registry role assignment mode. Known values are: - "AbacRepositoryPermissions" and "LegacyRegistryPermissions". - :paramtype role_assignment_mode: str or - ~container_registry_management_client.models.RoleAssignmentMode - """ - super().__init__(**kwargs) - self.login_server: Optional[str] = None - self.creation_date: Optional[datetime.datetime] = None - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - self.status: Optional["_models.Status"] = None - self.admin_user_enabled = admin_user_enabled - self.network_rule_set = network_rule_set - self.policies = policies - self.encryption = encryption - self.data_endpoint_enabled = data_endpoint_enabled - self.data_endpoint_host_names: Optional[list[str]] = None - self.regional_endpoints = regional_endpoints - self.regional_endpoint_host_names: Optional[list[str]] = None - self.endpoint_protocol = endpoint_protocol - self.private_endpoint_connections: Optional[list["_models.PrivateEndpointConnection"]] = None - self.public_network_access = public_network_access - self.network_rule_bypass_options = network_rule_bypass_options - self.network_rule_bypass_allowed_for_tasks = network_rule_bypass_allowed_for_tasks - self.zone_redundancy = zone_redundancy - self.anonymous_pull_enabled = anonymous_pull_enabled - self.metadata_search = metadata_search - self.auto_generated_domain_name_label_scope = auto_generated_domain_name_label_scope - self.role_assignment_mode = role_assignment_mode - - -class RegistryPropertiesUpdateParameters(_serialization.Model): - """The parameters for updating the properties of a container registry. - - :ivar admin_user_enabled: The value that indicates whether the admin user is enabled. - :vartype admin_user_enabled: bool - :ivar network_rule_set: The network rule set for a container registry. - :vartype network_rule_set: ~container_registry_management_client.models.NetworkRuleSet - :ivar policies: The policies for a container registry. - :vartype policies: ~container_registry_management_client.models.Policies - :ivar encryption: The encryption settings of container registry. - :vartype encryption: ~container_registry_management_client.models.EncryptionProperty - :ivar data_endpoint_enabled: Enable a single data endpoint per region for serving data. - :vartype data_endpoint_enabled: bool - :ivar regional_endpoints: Enable per-region endpoints for accessing registry. Known values are: - "Enabled" and "Disabled". - :vartype regional_endpoints: str or - ~container_registry_management_client.models.RegionalEndpoints - :ivar endpoint_protocol: The connectivity protocol for the registry, such as IPv4 or dual stack - (IPv4 and IPv6). Known values are: "IPv4" and "IPv4AndIPv6". - :vartype endpoint_protocol: str or - ~container_registry_management_client.models.EndpointProtocol - :ivar public_network_access: Whether or not public network access is allowed for the container - registry. Known values are: "Enabled" and "Disabled". - :vartype public_network_access: str or - ~container_registry_management_client.models.PublicNetworkAccess - :ivar network_rule_bypass_options: Whether to allow trusted Azure services to access a network - restricted registry. Known values are: "AzureServices" and "None". - :vartype network_rule_bypass_options: str or - ~container_registry_management_client.models.NetworkRuleBypassOptions - :ivar network_rule_bypass_allowed_for_tasks: Whether to allow ACR Tasks service to access a - network restricted registry. - :vartype network_rule_bypass_allowed_for_tasks: bool - :ivar anonymous_pull_enabled: Enables registry-wide pull from unauthenticated clients. - :vartype anonymous_pull_enabled: bool - :ivar metadata_search: Determines whether registry artifacts are indexed for metadata search. - Known values are: "Enabled" and "Disabled". - :vartype metadata_search: str or ~container_registry_management_client.models.MetadataSearch - :ivar role_assignment_mode: Determines registry role assignment mode. Known values are: - "AbacRepositoryPermissions" and "LegacyRegistryPermissions". - :vartype role_assignment_mode: str or - ~container_registry_management_client.models.RoleAssignmentMode - """ - - _attribute_map = { - "admin_user_enabled": {"key": "adminUserEnabled", "type": "bool"}, - "network_rule_set": {"key": "networkRuleSet", "type": "NetworkRuleSet"}, - "policies": {"key": "policies", "type": "Policies"}, - "encryption": {"key": "encryption", "type": "EncryptionProperty"}, - "data_endpoint_enabled": {"key": "dataEndpointEnabled", "type": "bool"}, - "regional_endpoints": {"key": "regionalEndpoints", "type": "str"}, - "endpoint_protocol": {"key": "endpointProtocol", "type": "str"}, - "public_network_access": {"key": "publicNetworkAccess", "type": "str"}, - "network_rule_bypass_options": {"key": "networkRuleBypassOptions", "type": "str"}, - "network_rule_bypass_allowed_for_tasks": {"key": "networkRuleBypassAllowedForTasks", "type": "bool"}, - "anonymous_pull_enabled": {"key": "anonymousPullEnabled", "type": "bool"}, - "metadata_search": {"key": "metadataSearch", "type": "str"}, - "role_assignment_mode": {"key": "roleAssignmentMode", "type": "str"}, - } - - def __init__( - self, - *, - admin_user_enabled: Optional[bool] = None, - network_rule_set: Optional["_models.NetworkRuleSet"] = None, - policies: Optional["_models.Policies"] = None, - encryption: Optional["_models.EncryptionProperty"] = None, - data_endpoint_enabled: Optional[bool] = None, - regional_endpoints: Optional[Union[str, "_models.RegionalEndpoints"]] = None, - endpoint_protocol: Optional[Union[str, "_models.EndpointProtocol"]] = None, - public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, - network_rule_bypass_options: Optional[Union[str, "_models.NetworkRuleBypassOptions"]] = None, - network_rule_bypass_allowed_for_tasks: Optional[bool] = None, - anonymous_pull_enabled: Optional[bool] = None, - metadata_search: Optional[Union[str, "_models.MetadataSearch"]] = None, - role_assignment_mode: Optional[Union[str, "_models.RoleAssignmentMode"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword admin_user_enabled: The value that indicates whether the admin user is enabled. - :paramtype admin_user_enabled: bool - :keyword network_rule_set: The network rule set for a container registry. - :paramtype network_rule_set: ~container_registry_management_client.models.NetworkRuleSet - :keyword policies: The policies for a container registry. - :paramtype policies: ~container_registry_management_client.models.Policies - :keyword encryption: The encryption settings of container registry. - :paramtype encryption: ~container_registry_management_client.models.EncryptionProperty - :keyword data_endpoint_enabled: Enable a single data endpoint per region for serving data. - :paramtype data_endpoint_enabled: bool - :keyword regional_endpoints: Enable per-region endpoints for accessing registry. Known values - are: "Enabled" and "Disabled". - :paramtype regional_endpoints: str or - ~container_registry_management_client.models.RegionalEndpoints - :keyword endpoint_protocol: The connectivity protocol for the registry, such as IPv4 or dual - stack (IPv4 and IPv6). Known values are: "IPv4" and "IPv4AndIPv6". - :paramtype endpoint_protocol: str or - ~container_registry_management_client.models.EndpointProtocol - :keyword public_network_access: Whether or not public network access is allowed for the - container registry. Known values are: "Enabled" and "Disabled". - :paramtype public_network_access: str or - ~container_registry_management_client.models.PublicNetworkAccess - :keyword network_rule_bypass_options: Whether to allow trusted Azure services to access a - network restricted registry. Known values are: "AzureServices" and "None". - :paramtype network_rule_bypass_options: str or - ~container_registry_management_client.models.NetworkRuleBypassOptions - :keyword network_rule_bypass_allowed_for_tasks: Whether to allow ACR Tasks service to access a - network restricted registry. - :paramtype network_rule_bypass_allowed_for_tasks: bool - :keyword anonymous_pull_enabled: Enables registry-wide pull from unauthenticated clients. - :paramtype anonymous_pull_enabled: bool - :keyword metadata_search: Determines whether registry artifacts are indexed for metadata - search. Known values are: "Enabled" and "Disabled". - :paramtype metadata_search: str or ~container_registry_management_client.models.MetadataSearch - :keyword role_assignment_mode: Determines registry role assignment mode. Known values are: - "AbacRepositoryPermissions" and "LegacyRegistryPermissions". - :paramtype role_assignment_mode: str or - ~container_registry_management_client.models.RoleAssignmentMode - """ - super().__init__(**kwargs) - self.admin_user_enabled = admin_user_enabled - self.network_rule_set = network_rule_set - self.policies = policies - self.encryption = encryption - self.data_endpoint_enabled = data_endpoint_enabled - self.regional_endpoints = regional_endpoints - self.endpoint_protocol = endpoint_protocol - self.public_network_access = public_network_access - self.network_rule_bypass_options = network_rule_bypass_options - self.network_rule_bypass_allowed_for_tasks = network_rule_bypass_allowed_for_tasks - self.anonymous_pull_enabled = anonymous_pull_enabled - self.metadata_search = metadata_search - self.role_assignment_mode = role_assignment_mode - - -class RegistrySyncResult(_serialization.Model): - """The registry sync result of the connected registry. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :ivar sync_trigger: The action that triggered the most recent registry sync. Required. Known - values are: "SyncTokenUpdate", "InitialSync", "ManualResync", and "RecoveryService". - :vartype sync_trigger: str or ~container_registry_management_client.models.SyncTrigger - :ivar sync_state: The status of the connected registry's most recent sync. Required. Known - values are: "NotActivated", "Syncing", "Failed", "Succeeded", "TimedOut", and "Pending". - :vartype sync_state: str or ~container_registry_management_client.models.SyncState - :ivar last_sync_start_time: The time that the connected registry's most recent sync started. - :vartype last_sync_start_time: ~datetime.datetime - :ivar last_sync_end_time: The time that the connected registry's most recent sync ended. - :vartype last_sync_end_time: ~datetime.datetime - :ivar last_successful_sync_end_time: The time that the connected registry's most recent - successful sync ended. - :vartype last_successful_sync_end_time: ~datetime.datetime - """ - - _validation = { - "sync_trigger": {"required": True, "readonly": True}, - "sync_state": {"required": True, "readonly": True}, - } - - _attribute_map = { - "sync_trigger": {"key": "syncTrigger", "type": "str"}, - "sync_state": {"key": "syncState", "type": "str"}, - "last_sync_start_time": {"key": "lastSyncStartTime", "type": "iso-8601"}, - "last_sync_end_time": {"key": "lastSyncEndTime", "type": "iso-8601"}, - "last_successful_sync_end_time": {"key": "lastSuccessfulSyncEndTime", "type": "iso-8601"}, - } - - def __init__( - self, - *, - last_sync_start_time: Optional[datetime.datetime] = None, - last_sync_end_time: Optional[datetime.datetime] = None, - last_successful_sync_end_time: Optional[datetime.datetime] = None, - **kwargs: Any - ) -> None: - """ - :keyword last_sync_start_time: The time that the connected registry's most recent sync started. - :paramtype last_sync_start_time: ~datetime.datetime - :keyword last_sync_end_time: The time that the connected registry's most recent sync ended. - :paramtype last_sync_end_time: ~datetime.datetime - :keyword last_successful_sync_end_time: The time that the connected registry's most recent - successful sync ended. - :paramtype last_successful_sync_end_time: ~datetime.datetime - """ - super().__init__(**kwargs) - self.sync_trigger: Optional[Union[str, "_models.SyncTrigger"]] = None - self.sync_state: Optional[Union[str, "_models.SyncState"]] = None - self.last_sync_start_time = last_sync_start_time - self.last_sync_end_time = last_sync_end_time - self.last_successful_sync_end_time = last_successful_sync_end_time - - -class RegistryUpdateParameters(_serialization.Model): - """The parameters for updating a container registry. - - :ivar identity: The identity of the container registry. - :vartype identity: ~container_registry_management_client.models.IdentityProperties - :ivar tags: The tags for the container registry. - :vartype tags: dict[str, str] - :ivar sku: The SKU of the container registry. - :vartype sku: ~container_registry_management_client.models.Sku - :ivar properties: The properties that the container registry will be updated with. - :vartype properties: - ~container_registry_management_client.models.RegistryPropertiesUpdateParameters - """ - - _attribute_map = { - "identity": {"key": "identity", "type": "IdentityProperties"}, - "tags": {"key": "tags", "type": "{str}"}, - "sku": {"key": "sku", "type": "Sku"}, - "properties": {"key": "properties", "type": "RegistryPropertiesUpdateParameters"}, - } - - def __init__( - self, - *, - identity: Optional["_models.IdentityProperties"] = None, - tags: Optional[dict[str, str]] = None, - sku: Optional["_models.Sku"] = None, - properties: Optional["_models.RegistryPropertiesUpdateParameters"] = None, - **kwargs: Any - ) -> None: - """ - :keyword identity: The identity of the container registry. - :paramtype identity: ~container_registry_management_client.models.IdentityProperties - :keyword tags: The tags for the container registry. - :paramtype tags: dict[str, str] - :keyword sku: The SKU of the container registry. - :paramtype sku: ~container_registry_management_client.models.Sku - :keyword properties: The properties that the container registry will be updated with. - :paramtype properties: - ~container_registry_management_client.models.RegistryPropertiesUpdateParameters - """ - super().__init__(**kwargs) - self.identity = identity - self.tags = tags - self.sku = sku - self.properties = properties - - -class RegistryUsage(_serialization.Model): - """The quota usage for a container registry. - - :ivar name: The name of the usage. - :vartype name: str - :ivar limit: The limit of the usage. - :vartype limit: int - :ivar current_value: The current value of the usage. - :vartype current_value: int - :ivar unit: The unit of measurement. Known values are: "Count" and "Bytes". - :vartype unit: str or ~container_registry_management_client.models.RegistryUsageUnit - """ - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "limit": {"key": "limit", "type": "int"}, - "current_value": {"key": "currentValue", "type": "int"}, - "unit": {"key": "unit", "type": "str"}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - limit: Optional[int] = None, - current_value: Optional[int] = None, - unit: Optional[Union[str, "_models.RegistryUsageUnit"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword name: The name of the usage. - :paramtype name: str - :keyword limit: The limit of the usage. - :paramtype limit: int - :keyword current_value: The current value of the usage. - :paramtype current_value: int - :keyword unit: The unit of measurement. Known values are: "Count" and "Bytes". - :paramtype unit: str or ~container_registry_management_client.models.RegistryUsageUnit - """ - super().__init__(**kwargs) - self.name = name - self.limit = limit - self.current_value = current_value - self.unit = unit - - -class RegistryUsageListResult(_serialization.Model): - """The result of a request to get container registry quota usages. - - :ivar value: The list of container registry quota usages. - :vartype value: list[~container_registry_management_client.models.RegistryUsage] - """ - - _attribute_map = { - "value": {"key": "value", "type": "[RegistryUsage]"}, - } - - def __init__(self, *, value: Optional[list["_models.RegistryUsage"]] = None, **kwargs: Any) -> None: - """ - :keyword value: The list of container registry quota usages. - :paramtype value: list[~container_registry_management_client.models.RegistryUsage] - """ - super().__init__(**kwargs) - self.value = value - - -class Replication(TrackedResource): - """An object that represents a replication for a container registry. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~container_registry_management_client.models.SystemData - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar location: The geo-location where the resource lives. Required. - :vartype location: str - :ivar properties: The properties of the replication. - :vartype properties: ~container_registry_management_client.models.ReplicationProperties - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "location": {"required": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "tags": {"key": "tags", "type": "{str}"}, - "location": {"key": "location", "type": "str"}, - "properties": {"key": "properties", "type": "ReplicationProperties"}, - } - - def __init__( - self, - *, - location: str, - tags: Optional[dict[str, str]] = None, - properties: Optional["_models.ReplicationProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword location: The geo-location where the resource lives. Required. - :paramtype location: str - :keyword properties: The properties of the replication. - :paramtype properties: ~container_registry_management_client.models.ReplicationProperties - """ - super().__init__(tags=tags, location=location, **kwargs) - self.properties = properties - - -class ReplicationListResult(_serialization.Model): - """The result of a request to list replications for a container registry. - - :ivar value: The list of replications. Since this list may be incomplete, the nextLink field - should be used to request the next list of replications. - :vartype value: list[~container_registry_management_client.models.Replication] - :ivar next_link: The URI that can be used to request the next list of replications. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[Replication]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, *, value: Optional[list["_models.Replication"]] = None, next_link: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword value: The list of replications. Since this list may be incomplete, the nextLink field - should be used to request the next list of replications. - :paramtype value: list[~container_registry_management_client.models.Replication] - :keyword next_link: The URI that can be used to request the next list of replications. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class ReplicationProperties(_serialization.Model): - """The properties of a replication. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar provisioning_state: The provisioning state of the replication at the time the operation - was called. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and - "Canceled". - :vartype provisioning_state: str or - ~container_registry_management_client.models.ProvisioningState - :ivar status: The status of the replication at the time the operation was called. - :vartype status: ~container_registry_management_client.models.Status - :ivar region_endpoint_enabled: Specifies whether the replication's regional endpoint is - enabled. Requests will not be routed to a replication whose regional endpoint is disabled, - however its data will continue to be synced with other replications. - :vartype region_endpoint_enabled: bool - :ivar zone_redundancy: Whether or not zone redundancy is enabled for this container registry - replication. Known values are: "Enabled" and "Disabled". - :vartype zone_redundancy: str or ~container_registry_management_client.models.ZoneRedundancy - """ - - _validation = { - "provisioning_state": {"readonly": True}, - "status": {"readonly": True}, - } - - _attribute_map = { - "provisioning_state": {"key": "provisioningState", "type": "str"}, - "status": {"key": "status", "type": "Status"}, - "region_endpoint_enabled": {"key": "regionEndpointEnabled", "type": "bool"}, - "zone_redundancy": {"key": "zoneRedundancy", "type": "str"}, - } - - def __init__( - self, - *, - region_endpoint_enabled: bool = True, - zone_redundancy: Optional[Union[str, "_models.ZoneRedundancy"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword region_endpoint_enabled: Specifies whether the replication's regional endpoint is - enabled. Requests will not be routed to a replication whose regional endpoint is disabled, - however its data will continue to be synced with other replications. - :paramtype region_endpoint_enabled: bool - :keyword zone_redundancy: Whether or not zone redundancy is enabled for this container registry - replication. Known values are: "Enabled" and "Disabled". - :paramtype zone_redundancy: str or ~container_registry_management_client.models.ZoneRedundancy - """ - super().__init__(**kwargs) - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - self.status: Optional["_models.Status"] = None - self.region_endpoint_enabled = region_endpoint_enabled - self.zone_redundancy = zone_redundancy - - -class ReplicationUpdateParameters(_serialization.Model): - """The parameters for updating a replication. - - :ivar tags: The tags for the replication. - :vartype tags: dict[str, str] - :ivar properties: The parameters for updating a replication's properties. - :vartype properties: - ~container_registry_management_client.models.ReplicationUpdateParametersProperties - """ - - _attribute_map = { - "tags": {"key": "tags", "type": "{str}"}, - "properties": {"key": "properties", "type": "ReplicationUpdateParametersProperties"}, - } - - def __init__( - self, - *, - tags: Optional[dict[str, str]] = None, - properties: Optional["_models.ReplicationUpdateParametersProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: The tags for the replication. - :paramtype tags: dict[str, str] - :keyword properties: The parameters for updating a replication's properties. - :paramtype properties: - ~container_registry_management_client.models.ReplicationUpdateParametersProperties - """ - super().__init__(**kwargs) - self.tags = tags - self.properties = properties - - -class ReplicationUpdateParametersProperties(_serialization.Model): - """ReplicationUpdateParametersProperties. - - :ivar region_endpoint_enabled: Specifies whether the replication's regional endpoint is - enabled. Requests will not be routed to a replication whose regional endpoint is disabled, - however its data will continue to be synced with other replications. - :vartype region_endpoint_enabled: bool - """ - - _attribute_map = { - "region_endpoint_enabled": {"key": "regionEndpointEnabled", "type": "bool"}, - } - - def __init__(self, *, region_endpoint_enabled: Optional[bool] = None, **kwargs: Any) -> None: - """ - :keyword region_endpoint_enabled: Specifies whether the replication's regional endpoint is - enabled. Requests will not be routed to a replication whose regional endpoint is disabled, - however its data will continue to be synced with other replications. - :paramtype region_endpoint_enabled: bool - """ - super().__init__(**kwargs) - self.region_endpoint_enabled = region_endpoint_enabled - - -class Request(_serialization.Model): - """The request that generated the event. - - :ivar id: The ID of the request that initiated the event. - :vartype id: str - :ivar addr: The IP or hostname and possibly port of the client connection that initiated the - event. This is the RemoteAddr from the standard http request. - :vartype addr: str - :ivar host: The externally accessible hostname of the registry instance, as specified by the - http host header on incoming requests. - :vartype host: str - :ivar method: The request method that generated the event. - :vartype method: str - :ivar useragent: The user agent header of the request. - :vartype useragent: str - """ - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "addr": {"key": "addr", "type": "str"}, - "host": {"key": "host", "type": "str"}, - "method": {"key": "method", "type": "str"}, - "useragent": {"key": "useragent", "type": "str"}, - } - - def __init__( - self, - *, - id: Optional[str] = None, # pylint: disable=redefined-builtin - addr: Optional[str] = None, - host: Optional[str] = None, - method: Optional[str] = None, - useragent: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword id: The ID of the request that initiated the event. - :paramtype id: str - :keyword addr: The IP or hostname and possibly port of the client connection that initiated the - event. This is the RemoteAddr from the standard http request. - :paramtype addr: str - :keyword host: The externally accessible hostname of the registry instance, as specified by the - http host header on incoming requests. - :paramtype host: str - :keyword method: The request method that generated the event. - :paramtype method: str - :keyword useragent: The user agent header of the request. - :paramtype useragent: str - """ - super().__init__(**kwargs) - self.id = id - self.addr = addr - self.host = host - self.method = method - self.useragent = useragent - - -class RetentionPolicy(_serialization.Model): - """The retention policy for a container registry. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar days: The number of days to retain an untagged manifest after which it gets purged. - :vartype days: int - :ivar last_updated_time: The timestamp when the policy was last updated. - :vartype last_updated_time: ~datetime.datetime - :ivar status: The value that indicates whether the policy is enabled or not. Known values are: - "enabled" and "disabled". - :vartype status: str or ~container_registry_management_client.models.PolicyStatus - """ - - _validation = { - "last_updated_time": {"readonly": True}, - } - - _attribute_map = { - "days": {"key": "days", "type": "int"}, - "last_updated_time": {"key": "lastUpdatedTime", "type": "iso-8601"}, - "status": {"key": "status", "type": "str"}, - } - - def __init__( - self, *, days: int = 7, status: Optional[Union[str, "_models.PolicyStatus"]] = None, **kwargs: Any - ) -> None: - """ - :keyword days: The number of days to retain an untagged manifest after which it gets purged. - :paramtype days: int - :keyword status: The value that indicates whether the policy is enabled or not. Known values - are: "enabled" and "disabled". - :paramtype status: str or ~container_registry_management_client.models.PolicyStatus - """ - super().__init__(**kwargs) - self.days = days - self.last_updated_time: Optional[datetime.datetime] = None - self.status = status - - -class ScopeMap(ProxyResource): - """An object that represents a scope map for a container registry. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~container_registry_management_client.models.SystemData - :ivar properties: The properties of the scope map. - :vartype properties: ~container_registry_management_client.models.ScopeMapProperties - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "properties": {"key": "properties", "type": "ScopeMapProperties"}, - } - - def __init__(self, *, properties: Optional["_models.ScopeMapProperties"] = None, **kwargs: Any) -> None: - """ - :keyword properties: The properties of the scope map. - :paramtype properties: ~container_registry_management_client.models.ScopeMapProperties - """ - super().__init__(**kwargs) - self.properties = properties - - -class ScopeMapListResult(_serialization.Model): - """The result of a request to list scope maps for a container registry. - - :ivar value: The list of scope maps. Since this list may be incomplete, the nextLink field - should be used to request the next list of scope maps. - :vartype value: list[~container_registry_management_client.models.ScopeMap] - :ivar next_link: The URI that can be used to request the next list of scope maps. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[ScopeMap]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, *, value: Optional[list["_models.ScopeMap"]] = None, next_link: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword value: The list of scope maps. Since this list may be incomplete, the nextLink field - should be used to request the next list of scope maps. - :paramtype value: list[~container_registry_management_client.models.ScopeMap] - :keyword next_link: The URI that can be used to request the next list of scope maps. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class ScopeMapProperties(_serialization.Model): - """The properties of a scope map. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :ivar description: The user friendly description of the scope map. - :vartype description: str - :ivar type: The type of the scope map. E.g. BuildIn scope map. - :vartype type: str - :ivar creation_date: The creation date of scope map. - :vartype creation_date: ~datetime.datetime - :ivar provisioning_state: Provisioning state of the resource. Known values are: "Creating", - "Updating", "Deleting", "Succeeded", "Failed", and "Canceled". - :vartype provisioning_state: str or - ~container_registry_management_client.models.ProvisioningState - :ivar actions: The list of scoped permissions for registry artifacts. E.g. - repositories/repository-name/content/read, repositories/repository-name/metadata/write. - Required. - :vartype actions: list[str] - """ - - _validation = { - "type": {"readonly": True}, - "creation_date": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "actions": {"required": True}, - } - - _attribute_map = { - "description": {"key": "description", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "creation_date": {"key": "creationDate", "type": "iso-8601"}, - "provisioning_state": {"key": "provisioningState", "type": "str"}, - "actions": {"key": "actions", "type": "[str]"}, - } - - def __init__(self, *, actions: list[str], description: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword description: The user friendly description of the scope map. - :paramtype description: str - :keyword actions: The list of scoped permissions for registry artifacts. E.g. - repositories/repository-name/content/read, repositories/repository-name/metadata/write. - Required. - :paramtype actions: list[str] - """ - super().__init__(**kwargs) - self.description = description - self.type: Optional[str] = None - self.creation_date: Optional[datetime.datetime] = None - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - self.actions = actions - - -class ScopeMapPropertiesUpdateParameters(_serialization.Model): - """The update parameters for scope map properties. - - :ivar description: The user friendly description of the scope map. - :vartype description: str - :ivar actions: The list of scope permissions for registry artifacts. E.g. - repositories/repository-name/pull, repositories/repository-name/delete. - :vartype actions: list[str] - """ - - _attribute_map = { - "description": {"key": "description", "type": "str"}, - "actions": {"key": "actions", "type": "[str]"}, - } - - def __init__( - self, *, description: Optional[str] = None, actions: Optional[list[str]] = None, **kwargs: Any - ) -> None: - """ - :keyword description: The user friendly description of the scope map. - :paramtype description: str - :keyword actions: The list of scope permissions for registry artifacts. E.g. - repositories/repository-name/pull, repositories/repository-name/delete. - :paramtype actions: list[str] - """ - super().__init__(**kwargs) - self.description = description - self.actions = actions - - -class ScopeMapUpdateParameters(_serialization.Model): - """The properties for updating the scope map. - - :ivar properties: The update parameters for scope map properties. - :vartype properties: - ~container_registry_management_client.models.ScopeMapPropertiesUpdateParameters - """ - - _attribute_map = { - "properties": {"key": "properties", "type": "ScopeMapPropertiesUpdateParameters"}, - } - - def __init__( - self, *, properties: Optional["_models.ScopeMapPropertiesUpdateParameters"] = None, **kwargs: Any - ) -> None: - """ - :keyword properties: The update parameters for scope map properties. - :paramtype properties: - ~container_registry_management_client.models.ScopeMapPropertiesUpdateParameters - """ - super().__init__(**kwargs) - self.properties = properties - - -class Sku(_serialization.Model): - """The SKU of a container registry. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :ivar name: The SKU name of the container registry. Required for registry creation. Required. - Known values are: "Classic", "Basic", "Standard", and "Premium". - :vartype name: str or ~container_registry_management_client.models.SkuName - :ivar tier: The SKU tier based on the SKU name. Known values are: "Classic", "Basic", - "Standard", and "Premium". - :vartype tier: str or ~container_registry_management_client.models.SkuTier - """ - - _validation = { - "name": {"required": True}, - "tier": {"readonly": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "tier": {"key": "tier", "type": "str"}, - } - - def __init__(self, *, name: Union[str, "_models.SkuName"], **kwargs: Any) -> None: - """ - :keyword name: The SKU name of the container registry. Required for registry creation. - Required. Known values are: "Classic", "Basic", "Standard", and "Premium". - :paramtype name: str or ~container_registry_management_client.models.SkuName - """ - super().__init__(**kwargs) - self.name = name - self.tier: Optional[Union[str, "_models.SkuTier"]] = None - - -class SoftDeletePolicy(_serialization.Model): - """The soft delete policy for a container registry. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar retention_days: The number of days after which a soft-deleted item is permanently - deleted. - :vartype retention_days: int - :ivar last_updated_time: The timestamp when the policy was last updated. - :vartype last_updated_time: ~datetime.datetime - :ivar status: The value that indicates whether the policy is enabled or not. Known values are: - "enabled" and "disabled". - :vartype status: str or ~container_registry_management_client.models.PolicyStatus - """ - - _validation = { - "last_updated_time": {"readonly": True}, - } - - _attribute_map = { - "retention_days": {"key": "retentionDays", "type": "int"}, - "last_updated_time": {"key": "lastUpdatedTime", "type": "iso-8601"}, - "status": {"key": "status", "type": "str"}, - } - - def __init__( - self, *, retention_days: int = 7, status: Optional[Union[str, "_models.PolicyStatus"]] = None, **kwargs: Any - ) -> None: - """ - :keyword retention_days: The number of days after which a soft-deleted item is permanently - deleted. - :paramtype retention_days: int - :keyword status: The value that indicates whether the policy is enabled or not. Known values - are: "enabled" and "disabled". - :paramtype status: str or ~container_registry_management_client.models.PolicyStatus - """ - super().__init__(**kwargs) - self.retention_days = retention_days - self.last_updated_time: Optional[datetime.datetime] = None - self.status = status - - -class Source(_serialization.Model): - """The registry node that generated the event. Put differently, while the actor initiates the - event, the source generates it. - - :ivar addr: The IP or hostname and the port of the registry node that generated the event. - Generally, this will be resolved by os.Hostname() along with the running port. - :vartype addr: str - :ivar instance_id: The running instance of an application. Changes after each restart. - :vartype instance_id: str - """ - - _attribute_map = { - "addr": {"key": "addr", "type": "str"}, - "instance_id": {"key": "instanceID", "type": "str"}, - } - - def __init__(self, *, addr: Optional[str] = None, instance_id: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword addr: The IP or hostname and the port of the registry node that generated the event. - Generally, this will be resolved by os.Hostname() along with the running port. - :paramtype addr: str - :keyword instance_id: The running instance of an application. Changes after each restart. - :paramtype instance_id: str - """ - super().__init__(**kwargs) - self.addr = addr - self.instance_id = instance_id - - -class Status(_serialization.Model): - """The status of an Azure resource at the time the operation was called. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar display_status: The short label for the status. - :vartype display_status: str - :ivar message: The detailed message for the status, including alerts and error messages. - :vartype message: str - :ivar timestamp: The timestamp when the status was changed to the current value. - :vartype timestamp: ~datetime.datetime - """ - - _validation = { - "display_status": {"readonly": True}, - "message": {"readonly": True}, - "timestamp": {"readonly": True}, - } - - _attribute_map = { - "display_status": {"key": "displayStatus", "type": "str"}, - "message": {"key": "message", "type": "str"}, - "timestamp": {"key": "timestamp", "type": "iso-8601"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.display_status: Optional[str] = None - self.message: Optional[str] = None - self.timestamp: Optional[datetime.datetime] = None - - -class StatusDetailProperties(_serialization.Model): - """The status detail properties of the connected registry. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar type: The component of the connected registry corresponding to the status. - :vartype type: str - :ivar code: The HTTP status code. - :vartype code: str - :ivar description: The description of the status. - :vartype description: str - :ivar timestamp: The timestamp of the status. - :vartype timestamp: ~datetime.datetime - :ivar correlation_id: The correlation ID of the status. - :vartype correlation_id: str - """ - - _validation = { - "type": {"readonly": True}, - "code": {"readonly": True}, - "description": {"readonly": True}, - "timestamp": {"readonly": True}, - "correlation_id": {"readonly": True}, - } - - _attribute_map = { - "type": {"key": "type", "type": "str"}, - "code": {"key": "code", "type": "str"}, - "description": {"key": "description", "type": "str"}, - "timestamp": {"key": "timestamp", "type": "iso-8601"}, - "correlation_id": {"key": "correlationId", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.type: Optional[str] = None - self.code: Optional[str] = None - self.description: Optional[str] = None - self.timestamp: Optional[datetime.datetime] = None - self.correlation_id: Optional[str] = None - - -class SyncProperties(_serialization.Model): - """The sync properties of the connected registry with its parent. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :ivar token_id: The resource ID of the ACR token used to authenticate the connected registry to - its parent during sync. Required. - :vartype token_id: str - :ivar schedule: The cron expression indicating the schedule that the connected registry will - sync with its parent. - :vartype schedule: str - :ivar sync_window: The time window during which sync is enabled for each schedule occurrence. - Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. - :vartype sync_window: ~datetime.timedelta - :ivar message_ttl: The period of time for which a message is available to sync before it is - expired. Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. - Required. - :vartype message_ttl: ~datetime.timedelta - :ivar last_sync_time: The last time a sync occurred between the connected registry and its - parent. - :vartype last_sync_time: ~datetime.datetime - :ivar gateway_endpoint: The gateway endpoint used by the connected registry to communicate with - its parent. - :vartype gateway_endpoint: str - """ - - _validation = { - "token_id": {"required": True}, - "message_ttl": {"required": True}, - "last_sync_time": {"readonly": True}, - "gateway_endpoint": {"readonly": True}, - } - - _attribute_map = { - "token_id": {"key": "tokenId", "type": "str"}, - "schedule": {"key": "schedule", "type": "str"}, - "sync_window": {"key": "syncWindow", "type": "duration"}, - "message_ttl": {"key": "messageTtl", "type": "duration"}, - "last_sync_time": {"key": "lastSyncTime", "type": "iso-8601"}, - "gateway_endpoint": {"key": "gatewayEndpoint", "type": "str"}, - } - - def __init__( - self, - *, - token_id: str, - message_ttl: datetime.timedelta, - schedule: Optional[str] = None, - sync_window: Optional[datetime.timedelta] = None, - **kwargs: Any - ) -> None: - """ - :keyword token_id: The resource ID of the ACR token used to authenticate the connected registry - to its parent during sync. Required. - :paramtype token_id: str - :keyword schedule: The cron expression indicating the schedule that the connected registry will - sync with its parent. - :paramtype schedule: str - :keyword sync_window: The time window during which sync is enabled for each schedule - occurrence. Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. - :paramtype sync_window: ~datetime.timedelta - :keyword message_ttl: The period of time for which a message is available to sync before it is - expired. Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. - Required. - :paramtype message_ttl: ~datetime.timedelta - """ - super().__init__(**kwargs) - self.token_id = token_id - self.schedule = schedule - self.sync_window = sync_window - self.message_ttl = message_ttl - self.last_sync_time: Optional[datetime.datetime] = None - self.gateway_endpoint: Optional[str] = None - - -class SyncUpdateProperties(_serialization.Model): - """The parameters for updating the sync properties of the connected registry with its parent. - - :ivar schedule: The cron expression indicating the schedule that the connected registry will - sync with its parent. - :vartype schedule: str - :ivar sync_window: The time window during which sync is enabled for each schedule occurrence. - Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. - :vartype sync_window: ~datetime.timedelta - :ivar message_ttl: The period of time for which a message is available to sync before it is - expired. Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. - :vartype message_ttl: ~datetime.timedelta - """ - - _attribute_map = { - "schedule": {"key": "schedule", "type": "str"}, - "sync_window": {"key": "syncWindow", "type": "duration"}, - "message_ttl": {"key": "messageTtl", "type": "duration"}, - } - - def __init__( - self, - *, - schedule: Optional[str] = None, - sync_window: Optional[datetime.timedelta] = None, - message_ttl: Optional[datetime.timedelta] = None, - **kwargs: Any - ) -> None: - """ - :keyword schedule: The cron expression indicating the schedule that the connected registry will - sync with its parent. - :paramtype schedule: str - :keyword sync_window: The time window during which sync is enabled for each schedule - occurrence. Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. - :paramtype sync_window: ~datetime.timedelta - :keyword message_ttl: The period of time for which a message is available to sync before it is - expired. Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. - :paramtype message_ttl: ~datetime.timedelta - """ - super().__init__(**kwargs) - self.schedule = schedule - self.sync_window = sync_window - self.message_ttl = message_ttl - - -class SystemData(_serialization.Model): - """Metadata pertaining to creation and last modification of the resource. - - :ivar created_by: The identity that created the resource. - :vartype created_by: str - :ivar created_by_type: The type of identity that created the resource. Known values are: - "User", "Application", "ManagedIdentity", and "Key". - :vartype created_by_type: str or ~container_registry_management_client.models.CreatedByType - :ivar created_at: The timestamp of resource creation (UTC). - :vartype created_at: ~datetime.datetime - :ivar last_modified_by: The identity that last modified the resource. - :vartype last_modified_by: str - :ivar last_modified_by_type: The type of identity that last modified the resource. Known values - are: "User", "Application", "ManagedIdentity", and "Key". - :vartype last_modified_by_type: str or - ~container_registry_management_client.models.CreatedByType - :ivar last_modified_at: The timestamp of resource last modification (UTC). - :vartype last_modified_at: ~datetime.datetime - """ - - _attribute_map = { - "created_by": {"key": "createdBy", "type": "str"}, - "created_by_type": {"key": "createdByType", "type": "str"}, - "created_at": {"key": "createdAt", "type": "iso-8601"}, - "last_modified_by": {"key": "lastModifiedBy", "type": "str"}, - "last_modified_by_type": {"key": "lastModifiedByType", "type": "str"}, - "last_modified_at": {"key": "lastModifiedAt", "type": "iso-8601"}, - } - - def __init__( - self, - *, - created_by: Optional[str] = None, - created_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, - created_at: Optional[datetime.datetime] = None, - last_modified_by: Optional[str] = None, - last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, - last_modified_at: Optional[datetime.datetime] = None, - **kwargs: Any - ) -> None: - """ - :keyword created_by: The identity that created the resource. - :paramtype created_by: str - :keyword created_by_type: The type of identity that created the resource. Known values are: - "User", "Application", "ManagedIdentity", and "Key". - :paramtype created_by_type: str or ~container_registry_management_client.models.CreatedByType - :keyword created_at: The timestamp of resource creation (UTC). - :paramtype created_at: ~datetime.datetime - :keyword last_modified_by: The identity that last modified the resource. - :paramtype last_modified_by: str - :keyword last_modified_by_type: The type of identity that last modified the resource. Known - values are: "User", "Application", "ManagedIdentity", and "Key". - :paramtype last_modified_by_type: str or - ~container_registry_management_client.models.CreatedByType - :keyword last_modified_at: The timestamp of resource last modification (UTC). - :paramtype last_modified_at: ~datetime.datetime - """ - super().__init__(**kwargs) - self.created_by = created_by - self.created_by_type = created_by_type - self.created_at = created_at - self.last_modified_by = last_modified_by - self.last_modified_by_type = last_modified_by_type - self.last_modified_at = last_modified_at - - -class Target(_serialization.Model): - """The target of the event. - - :ivar media_type: The MIME type of the referenced object. - :vartype media_type: str - :ivar size: The number of bytes of the content. Same as Length field. - :vartype size: int - :ivar digest: The digest of the content, as defined by the Registry V2 HTTP API Specification. - :vartype digest: str - :ivar length: The number of bytes of the content. Same as Size field. - :vartype length: int - :ivar repository: The repository name. - :vartype repository: str - :ivar url: The direct URL to the content. - :vartype url: str - :ivar tag: The tag name. - :vartype tag: str - :ivar name: The name of the artifact. - :vartype name: str - :ivar version: The version of the artifact. - :vartype version: str - """ - - _attribute_map = { - "media_type": {"key": "mediaType", "type": "str"}, - "size": {"key": "size", "type": "int"}, - "digest": {"key": "digest", "type": "str"}, - "length": {"key": "length", "type": "int"}, - "repository": {"key": "repository", "type": "str"}, - "url": {"key": "url", "type": "str"}, - "tag": {"key": "tag", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "version": {"key": "version", "type": "str"}, - } - - def __init__( - self, - *, - media_type: Optional[str] = None, - size: Optional[int] = None, - digest: Optional[str] = None, - length: Optional[int] = None, - repository: Optional[str] = None, - url: Optional[str] = None, - tag: Optional[str] = None, - name: Optional[str] = None, - version: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword media_type: The MIME type of the referenced object. - :paramtype media_type: str - :keyword size: The number of bytes of the content. Same as Length field. - :paramtype size: int - :keyword digest: The digest of the content, as defined by the Registry V2 HTTP API - Specification. - :paramtype digest: str - :keyword length: The number of bytes of the content. Same as Size field. - :paramtype length: int - :keyword repository: The repository name. - :paramtype repository: str - :keyword url: The direct URL to the content. - :paramtype url: str - :keyword tag: The tag name. - :paramtype tag: str - :keyword name: The name of the artifact. - :paramtype name: str - :keyword version: The version of the artifact. - :paramtype version: str - """ - super().__init__(**kwargs) - self.media_type = media_type - self.size = size - self.digest = digest - self.length = length - self.repository = repository - self.url = url - self.tag = tag - self.name = name - self.version = version - - -class TlsCertificateProperties(_serialization.Model): - """The TLS certificate properties of the connected registry login server. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar type: The type of certificate location. "LocalDirectory" - :vartype type: str or ~container_registry_management_client.models.CertificateType - :ivar location: Indicates the location of the certificates. - :vartype location: str - """ - - _validation = { - "type": {"readonly": True}, - "location": {"readonly": True}, - } - - _attribute_map = { - "type": {"key": "type", "type": "str"}, - "location": {"key": "location", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.type: Optional[Union[str, "_models.CertificateType"]] = None - self.location: Optional[str] = None - - -class TlsProperties(_serialization.Model): - """The TLS properties of the connected registry login server. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar status: Indicates whether HTTPS is enabled for the login server. Known values are: - "Enabled" and "Disabled". - :vartype status: str or ~container_registry_management_client.models.TlsStatus - :ivar certificate: The certificate used to configure HTTPS for the login server. - :vartype certificate: ~container_registry_management_client.models.TlsCertificateProperties - """ - - _validation = { - "status": {"readonly": True}, - "certificate": {"readonly": True}, - } - - _attribute_map = { - "status": {"key": "status", "type": "str"}, - "certificate": {"key": "certificate", "type": "TlsCertificateProperties"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.status: Optional[Union[str, "_models.TlsStatus"]] = None - self.certificate: Optional["_models.TlsCertificateProperties"] = None - - -class Token(ProxyResource): - """An object that represents a token for a container registry. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~container_registry_management_client.models.SystemData - :ivar properties: The properties of the token. - :vartype properties: ~container_registry_management_client.models.TokenProperties - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "properties": {"key": "properties", "type": "TokenProperties"}, - } - - def __init__(self, *, properties: Optional["_models.TokenProperties"] = None, **kwargs: Any) -> None: - """ - :keyword properties: The properties of the token. - :paramtype properties: ~container_registry_management_client.models.TokenProperties - """ - super().__init__(**kwargs) - self.properties = properties - - -class TokenCertificate(_serialization.Model): - """The properties of a certificate used for authenticating a token. - - :ivar name: Known values are: "certificate1" and "certificate2". - :vartype name: str or ~container_registry_management_client.models.TokenCertificateName - :ivar expiry: The expiry datetime of the certificate. - :vartype expiry: ~datetime.datetime - :ivar thumbprint: The thumbprint of the certificate. - :vartype thumbprint: str - :ivar encoded_pem_certificate: Base 64 encoded string of the public certificate1 in PEM format - that will be used for authenticating the token. - :vartype encoded_pem_certificate: str - """ - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "expiry": {"key": "expiry", "type": "iso-8601"}, - "thumbprint": {"key": "thumbprint", "type": "str"}, - "encoded_pem_certificate": {"key": "encodedPemCertificate", "type": "str"}, - } - - def __init__( - self, - *, - name: Optional[Union[str, "_models.TokenCertificateName"]] = None, - expiry: Optional[datetime.datetime] = None, - thumbprint: Optional[str] = None, - encoded_pem_certificate: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword name: Known values are: "certificate1" and "certificate2". - :paramtype name: str or ~container_registry_management_client.models.TokenCertificateName - :keyword expiry: The expiry datetime of the certificate. - :paramtype expiry: ~datetime.datetime - :keyword thumbprint: The thumbprint of the certificate. - :paramtype thumbprint: str - :keyword encoded_pem_certificate: Base 64 encoded string of the public certificate1 in PEM - format that will be used for authenticating the token. - :paramtype encoded_pem_certificate: str - """ - super().__init__(**kwargs) - self.name = name - self.expiry = expiry - self.thumbprint = thumbprint - self.encoded_pem_certificate = encoded_pem_certificate - - -class TokenCredentialsProperties(_serialization.Model): - """The properties of the credentials that can be used for authenticating the token. - - :ivar certificates: - :vartype certificates: list[~container_registry_management_client.models.TokenCertificate] - :ivar passwords: - :vartype passwords: list[~container_registry_management_client.models.TokenPassword] - """ - - _attribute_map = { - "certificates": {"key": "certificates", "type": "[TokenCertificate]"}, - "passwords": {"key": "passwords", "type": "[TokenPassword]"}, - } - - def __init__( - self, - *, - certificates: Optional[list["_models.TokenCertificate"]] = None, - passwords: Optional[list["_models.TokenPassword"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword certificates: - :paramtype certificates: list[~container_registry_management_client.models.TokenCertificate] - :keyword passwords: - :paramtype passwords: list[~container_registry_management_client.models.TokenPassword] - """ - super().__init__(**kwargs) - self.certificates = certificates - self.passwords = passwords - - -class TokenListResult(_serialization.Model): - """The result of a request to list tokens for a container registry. - - :ivar value: The list of tokens. Since this list may be incomplete, the nextLink field should - be used to request the next list of tokens. - :vartype value: list[~container_registry_management_client.models.Token] - :ivar next_link: The URI that can be used to request the next list of tokens. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[Token]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, *, value: Optional[list["_models.Token"]] = None, next_link: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword value: The list of tokens. Since this list may be incomplete, the nextLink field - should be used to request the next list of tokens. - :paramtype value: list[~container_registry_management_client.models.Token] - :keyword next_link: The URI that can be used to request the next list of tokens. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class TokenPassword(_serialization.Model): - """The password that will be used for authenticating the token of a container registry. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar creation_time: The creation datetime of the password. - :vartype creation_time: ~datetime.datetime - :ivar expiry: The expiry datetime of the password. - :vartype expiry: ~datetime.datetime - :ivar name: The password name "password1" or "password2". Known values are: "password1" and - "password2". - :vartype name: str or ~container_registry_management_client.models.TokenPasswordName - :ivar value: The password value. - :vartype value: str - """ - - _validation = { - "value": {"readonly": True}, - } - - _attribute_map = { - "creation_time": {"key": "creationTime", "type": "iso-8601"}, - "expiry": {"key": "expiry", "type": "iso-8601"}, - "name": {"key": "name", "type": "str"}, - "value": {"key": "value", "type": "str"}, - } - - def __init__( - self, - *, - creation_time: Optional[datetime.datetime] = None, - expiry: Optional[datetime.datetime] = None, - name: Optional[Union[str, "_models.TokenPasswordName"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword creation_time: The creation datetime of the password. - :paramtype creation_time: ~datetime.datetime - :keyword expiry: The expiry datetime of the password. - :paramtype expiry: ~datetime.datetime - :keyword name: The password name "password1" or "password2". Known values are: "password1" and - "password2". - :paramtype name: str or ~container_registry_management_client.models.TokenPasswordName - """ - super().__init__(**kwargs) - self.creation_time = creation_time - self.expiry = expiry - self.name = name - self.value: Optional[str] = None - - -class TokenProperties(_serialization.Model): - """The properties of a token. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar creation_date: The creation date of scope map. - :vartype creation_date: ~datetime.datetime - :ivar provisioning_state: Provisioning state of the resource. Known values are: "Creating", - "Updating", "Deleting", "Succeeded", "Failed", and "Canceled". - :vartype provisioning_state: str or - ~container_registry_management_client.models.ProvisioningState - :ivar scope_map_id: The resource ID of the scope map to which the token will be associated - with. - :vartype scope_map_id: str - :ivar credentials: The credentials that can be used for authenticating the token. - :vartype credentials: ~container_registry_management_client.models.TokenCredentialsProperties - :ivar status: The status of the token example enabled or disabled. Known values are: "enabled" - and "disabled". - :vartype status: str or ~container_registry_management_client.models.TokenStatus - """ - - _validation = { - "creation_date": {"readonly": True}, - "provisioning_state": {"readonly": True}, - } - - _attribute_map = { - "creation_date": {"key": "creationDate", "type": "iso-8601"}, - "provisioning_state": {"key": "provisioningState", "type": "str"}, - "scope_map_id": {"key": "scopeMapId", "type": "str"}, - "credentials": {"key": "credentials", "type": "TokenCredentialsProperties"}, - "status": {"key": "status", "type": "str"}, - } - - def __init__( - self, - *, - scope_map_id: Optional[str] = None, - credentials: Optional["_models.TokenCredentialsProperties"] = None, - status: Optional[Union[str, "_models.TokenStatus"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword scope_map_id: The resource ID of the scope map to which the token will be associated - with. - :paramtype scope_map_id: str - :keyword credentials: The credentials that can be used for authenticating the token. - :paramtype credentials: ~container_registry_management_client.models.TokenCredentialsProperties - :keyword status: The status of the token example enabled or disabled. Known values are: - "enabled" and "disabled". - :paramtype status: str or ~container_registry_management_client.models.TokenStatus - """ - super().__init__(**kwargs) - self.creation_date: Optional[datetime.datetime] = None - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - self.scope_map_id = scope_map_id - self.credentials = credentials - self.status = status - - -class TokenUpdateParameters(_serialization.Model): - """The parameters for updating a token. - - :ivar properties: The properties of the token update parameters. - :vartype properties: ~container_registry_management_client.models.TokenUpdateProperties - """ - - _attribute_map = { - "properties": {"key": "properties", "type": "TokenUpdateProperties"}, - } - - def __init__(self, *, properties: Optional["_models.TokenUpdateProperties"] = None, **kwargs: Any) -> None: - """ - :keyword properties: The properties of the token update parameters. - :paramtype properties: ~container_registry_management_client.models.TokenUpdateProperties - """ - super().__init__(**kwargs) - self.properties = properties - - -class TokenUpdateProperties(_serialization.Model): - """The parameters for updating token properties. - - :ivar scope_map_id: The resource ID of the scope map to which the token will be associated - with. - :vartype scope_map_id: str - :ivar status: The status of the token example enabled or disabled. Known values are: "enabled" - and "disabled". - :vartype status: str or ~container_registry_management_client.models.TokenStatus - :ivar credentials: The credentials that can be used for authenticating the token. - :vartype credentials: ~container_registry_management_client.models.TokenCredentialsProperties - """ - - _attribute_map = { - "scope_map_id": {"key": "scopeMapId", "type": "str"}, - "status": {"key": "status", "type": "str"}, - "credentials": {"key": "credentials", "type": "TokenCredentialsProperties"}, - } - - def __init__( - self, - *, - scope_map_id: Optional[str] = None, - status: Optional[Union[str, "_models.TokenStatus"]] = None, - credentials: Optional["_models.TokenCredentialsProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword scope_map_id: The resource ID of the scope map to which the token will be associated - with. - :paramtype scope_map_id: str - :keyword status: The status of the token example enabled or disabled. Known values are: - "enabled" and "disabled". - :paramtype status: str or ~container_registry_management_client.models.TokenStatus - :keyword credentials: The credentials that can be used for authenticating the token. - :paramtype credentials: ~container_registry_management_client.models.TokenCredentialsProperties - """ - super().__init__(**kwargs) - self.scope_map_id = scope_map_id - self.status = status - self.credentials = credentials - - -class TrustPolicy(_serialization.Model): - """The content trust policy for a container registry. - - :ivar type: The type of trust policy. "Notary" - :vartype type: str or ~container_registry_management_client.models.TrustPolicyType - :ivar status: The value that indicates whether the policy is enabled or not. Known values are: - "enabled" and "disabled". - :vartype status: str or ~container_registry_management_client.models.PolicyStatus - """ - - _attribute_map = { - "type": {"key": "type", "type": "str"}, - "status": {"key": "status", "type": "str"}, - } - - def __init__( - self, - *, - type: Union[str, "_models.TrustPolicyType"] = "Notary", - status: Optional[Union[str, "_models.PolicyStatus"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword type: The type of trust policy. "Notary" - :paramtype type: str or ~container_registry_management_client.models.TrustPolicyType - :keyword status: The value that indicates whether the policy is enabled or not. Known values - are: "enabled" and "disabled". - :paramtype status: str or ~container_registry_management_client.models.PolicyStatus - """ - super().__init__(**kwargs) - self.type = type - self.status = status - - -class UserIdentityProperties(_serialization.Model): - """UserIdentityProperties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str - """ - - _validation = { - "principal_id": {"readonly": True}, - "client_id": {"readonly": True}, - } - - _attribute_map = { - "principal_id": {"key": "principalId", "type": "str"}, - "client_id": {"key": "clientId", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.principal_id: Optional[str] = None - self.client_id: Optional[str] = None - - -class Webhook(TrackedResource): - """An object that represents a webhook for a container registry. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~container_registry_management_client.models.SystemData - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar location: The geo-location where the resource lives. Required. - :vartype location: str - :ivar properties: The properties of the webhook. - :vartype properties: ~container_registry_management_client.models.WebhookProperties - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "location": {"required": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "tags": {"key": "tags", "type": "{str}"}, - "location": {"key": "location", "type": "str"}, - "properties": {"key": "properties", "type": "WebhookProperties"}, - } - - def __init__( - self, - *, - location: str, - tags: Optional[dict[str, str]] = None, - properties: Optional["_models.WebhookProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword location: The geo-location where the resource lives. Required. - :paramtype location: str - :keyword properties: The properties of the webhook. - :paramtype properties: ~container_registry_management_client.models.WebhookProperties - """ - super().__init__(tags=tags, location=location, **kwargs) - self.properties = properties - - -class WebhookCreateParameters(_serialization.Model): - """The parameters for creating a webhook. - - All required parameters must be populated in order to send to server. - - :ivar tags: The tags for the webhook. - :vartype tags: dict[str, str] - :ivar location: The location of the webhook. This cannot be changed after the resource is - created. Required. - :vartype location: str - :ivar properties: The properties that the webhook will be created with. - :vartype properties: - ~container_registry_management_client.models.WebhookPropertiesCreateParameters - """ - - _validation = { - "location": {"required": True}, - } - - _attribute_map = { - "tags": {"key": "tags", "type": "{str}"}, - "location": {"key": "location", "type": "str"}, - "properties": {"key": "properties", "type": "WebhookPropertiesCreateParameters"}, - } - - def __init__( - self, - *, - location: str, - tags: Optional[dict[str, str]] = None, - properties: Optional["_models.WebhookPropertiesCreateParameters"] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: The tags for the webhook. - :paramtype tags: dict[str, str] - :keyword location: The location of the webhook. This cannot be changed after the resource is - created. Required. - :paramtype location: str - :keyword properties: The properties that the webhook will be created with. - :paramtype properties: - ~container_registry_management_client.models.WebhookPropertiesCreateParameters - """ - super().__init__(**kwargs) - self.tags = tags - self.location = location - self.properties = properties - - -class WebhookListResult(_serialization.Model): - """The result of a request to list webhooks for a container registry. - - :ivar value: The list of webhooks. Since this list may be incomplete, the nextLink field should - be used to request the next list of webhooks. - :vartype value: list[~container_registry_management_client.models.Webhook] - :ivar next_link: The URI that can be used to request the next list of webhooks. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[Webhook]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, *, value: Optional[list["_models.Webhook"]] = None, next_link: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword value: The list of webhooks. Since this list may be incomplete, the nextLink field - should be used to request the next list of webhooks. - :paramtype value: list[~container_registry_management_client.models.Webhook] - :keyword next_link: The URI that can be used to request the next list of webhooks. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class WebhookProperties(_serialization.Model): - """The properties of a webhook. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :ivar status: The status of the webhook at the time the operation was called. Known values are: - "enabled" and "disabled". - :vartype status: str or ~container_registry_management_client.models.WebhookStatus - :ivar scope: The scope of repositories where the event can be triggered. For example, 'foo:*' - means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. - 'foo' is equivalent to 'foo:latest'. Empty means all events. - :vartype scope: str - :ivar actions: The list of actions that trigger the webhook to post notifications. Required. - :vartype actions: list[str or ~container_registry_management_client.models.WebhookAction] - :ivar provisioning_state: The provisioning state of the webhook at the time the operation was - called. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and - "Canceled". - :vartype provisioning_state: str or - ~container_registry_management_client.models.ProvisioningState - """ - - _validation = { - "actions": {"required": True}, - "provisioning_state": {"readonly": True}, - } - - _attribute_map = { - "status": {"key": "status", "type": "str"}, - "scope": {"key": "scope", "type": "str"}, - "actions": {"key": "actions", "type": "[str]"}, - "provisioning_state": {"key": "provisioningState", "type": "str"}, - } - - def __init__( - self, - *, - actions: list[Union[str, "_models.WebhookAction"]], - status: Optional[Union[str, "_models.WebhookStatus"]] = None, - scope: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword status: The status of the webhook at the time the operation was called. Known values - are: "enabled" and "disabled". - :paramtype status: str or ~container_registry_management_client.models.WebhookStatus - :keyword scope: The scope of repositories where the event can be triggered. For example, - 'foo:*' means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' - only. 'foo' is equivalent to 'foo:latest'. Empty means all events. - :paramtype scope: str - :keyword actions: The list of actions that trigger the webhook to post notifications. Required. - :paramtype actions: list[str or ~container_registry_management_client.models.WebhookAction] - """ - super().__init__(**kwargs) - self.status = status - self.scope = scope - self.actions = actions - self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - - -class WebhookPropertiesCreateParameters(_serialization.Model): - """The parameters for creating the properties of a webhook. - - All required parameters must be populated in order to send to server. - - :ivar service_uri: The service URI for the webhook to post notifications. Required. - :vartype service_uri: str - :ivar custom_headers: Custom headers that will be added to the webhook notifications. - :vartype custom_headers: dict[str, str] - :ivar status: The status of the webhook at the time the operation was called. Known values are: - "enabled" and "disabled". - :vartype status: str or ~container_registry_management_client.models.WebhookStatus - :ivar scope: The scope of repositories where the event can be triggered. For example, 'foo:*' - means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. - 'foo' is equivalent to 'foo:latest'. Empty means all events. - :vartype scope: str - :ivar actions: The list of actions that trigger the webhook to post notifications. Required. - :vartype actions: list[str or ~container_registry_management_client.models.WebhookAction] - """ - - _validation = { - "service_uri": {"required": True}, - "actions": {"required": True}, - } - - _attribute_map = { - "service_uri": {"key": "serviceUri", "type": "str"}, - "custom_headers": {"key": "customHeaders", "type": "{str}"}, - "status": {"key": "status", "type": "str"}, - "scope": {"key": "scope", "type": "str"}, - "actions": {"key": "actions", "type": "[str]"}, - } - - def __init__( - self, - *, - service_uri: str, - actions: list[Union[str, "_models.WebhookAction"]], - custom_headers: Optional[dict[str, str]] = None, - status: Optional[Union[str, "_models.WebhookStatus"]] = None, - scope: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword service_uri: The service URI for the webhook to post notifications. Required. - :paramtype service_uri: str - :keyword custom_headers: Custom headers that will be added to the webhook notifications. - :paramtype custom_headers: dict[str, str] - :keyword status: The status of the webhook at the time the operation was called. Known values - are: "enabled" and "disabled". - :paramtype status: str or ~container_registry_management_client.models.WebhookStatus - :keyword scope: The scope of repositories where the event can be triggered. For example, - 'foo:*' means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' - only. 'foo' is equivalent to 'foo:latest'. Empty means all events. - :paramtype scope: str - :keyword actions: The list of actions that trigger the webhook to post notifications. Required. - :paramtype actions: list[str or ~container_registry_management_client.models.WebhookAction] - """ - super().__init__(**kwargs) - self.service_uri = service_uri - self.custom_headers = custom_headers - self.status = status - self.scope = scope - self.actions = actions - - -class WebhookPropertiesUpdateParameters(_serialization.Model): - """The parameters for updating the properties of a webhook. - - :ivar service_uri: The service URI for the webhook to post notifications. - :vartype service_uri: str - :ivar custom_headers: Custom headers that will be added to the webhook notifications. - :vartype custom_headers: dict[str, str] - :ivar status: The status of the webhook at the time the operation was called. Known values are: - "enabled" and "disabled". - :vartype status: str or ~container_registry_management_client.models.WebhookStatus - :ivar scope: The scope of repositories where the event can be triggered. For example, 'foo:*' - means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. - 'foo' is equivalent to 'foo:latest'. Empty means all events. - :vartype scope: str - :ivar actions: The list of actions that trigger the webhook to post notifications. - :vartype actions: list[str or ~container_registry_management_client.models.WebhookAction] - """ - - _attribute_map = { - "service_uri": {"key": "serviceUri", "type": "str"}, - "custom_headers": {"key": "customHeaders", "type": "{str}"}, - "status": {"key": "status", "type": "str"}, - "scope": {"key": "scope", "type": "str"}, - "actions": {"key": "actions", "type": "[str]"}, - } - - def __init__( - self, - *, - service_uri: Optional[str] = None, - custom_headers: Optional[dict[str, str]] = None, - status: Optional[Union[str, "_models.WebhookStatus"]] = None, - scope: Optional[str] = None, - actions: Optional[list[Union[str, "_models.WebhookAction"]]] = None, - **kwargs: Any - ) -> None: - """ - :keyword service_uri: The service URI for the webhook to post notifications. - :paramtype service_uri: str - :keyword custom_headers: Custom headers that will be added to the webhook notifications. - :paramtype custom_headers: dict[str, str] - :keyword status: The status of the webhook at the time the operation was called. Known values - are: "enabled" and "disabled". - :paramtype status: str or ~container_registry_management_client.models.WebhookStatus - :keyword scope: The scope of repositories where the event can be triggered. For example, - 'foo:*' means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' - only. 'foo' is equivalent to 'foo:latest'. Empty means all events. - :paramtype scope: str - :keyword actions: The list of actions that trigger the webhook to post notifications. - :paramtype actions: list[str or ~container_registry_management_client.models.WebhookAction] - """ - super().__init__(**kwargs) - self.service_uri = service_uri - self.custom_headers = custom_headers - self.status = status - self.scope = scope - self.actions = actions - - -class WebhookUpdateParameters(_serialization.Model): - """The parameters for updating a webhook. - - :ivar tags: The tags for the webhook. - :vartype tags: dict[str, str] - :ivar properties: The properties that the webhook will be updated with. - :vartype properties: - ~container_registry_management_client.models.WebhookPropertiesUpdateParameters - """ - - _attribute_map = { - "tags": {"key": "tags", "type": "{str}"}, - "properties": {"key": "properties", "type": "WebhookPropertiesUpdateParameters"}, - } - - def __init__( - self, - *, - tags: Optional[dict[str, str]] = None, - properties: Optional["_models.WebhookPropertiesUpdateParameters"] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: The tags for the webhook. - :paramtype tags: dict[str, str] - :keyword properties: The properties that the webhook will be updated with. - :paramtype properties: - ~container_registry_management_client.models.WebhookPropertiesUpdateParameters - """ - super().__init__(**kwargs) - self.tags = tags - self.properties = properties diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/models/_patch.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/models/_patch.py deleted file mode 100644 index 87676c65a8f..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/models/_patch.py +++ /dev/null @@ -1,21 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------- -"""Customize generated code here. - -Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize -""" - - -__all__: list[str] = [] # Add all objects you want publicly available to users at this package level - - -def patch_sdk(): - """Do not remove from this file. - - `patch_sdk` is a last resort escape hatch that allows you to do customizations - you can't accomplish using the techniques described in - https://aka.ms/azsdk/python/dpcodegen/python/customize - """ diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/operations/__init__.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/operations/__init__.py deleted file mode 100644 index de865704f5c..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/operations/__init__.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.8, generator: @autorest/python@6.49.1) -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -# pylint: disable=wrong-import-position - -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from ._patch import * # pylint: disable=unused-wildcard-import - -from ._operations import Operations # type: ignore -from ._operations import RegistriesOperations # type: ignore -from ._operations import CacheRulesOperations # type: ignore -from ._operations import ConnectedRegistriesOperations # type: ignore -from ._operations import CredentialSetsOperations # type: ignore -from ._operations import ExportPipelinesOperations # type: ignore -from ._operations import ImportPipelinesOperations # type: ignore -from ._operations import ArchivesOperations # type: ignore -from ._operations import ArchiveVersionsOperations # type: ignore -from ._operations import PipelineRunsOperations # type: ignore -from ._operations import PrivateEndpointConnectionsOperations # type: ignore -from ._operations import ReplicationsOperations # type: ignore -from ._operations import ScopeMapsOperations # type: ignore -from ._operations import TokensOperations # type: ignore -from ._operations import WebhooksOperations # type: ignore - -from ._patch import __all__ as _patch_all -from ._patch import * -from ._patch import patch_sdk as _patch_sdk - -__all__ = [ - "Operations", - "RegistriesOperations", - "CacheRulesOperations", - "ConnectedRegistriesOperations", - "CredentialSetsOperations", - "ExportPipelinesOperations", - "ImportPipelinesOperations", - "ArchivesOperations", - "ArchiveVersionsOperations", - "PipelineRunsOperations", - "PrivateEndpointConnectionsOperations", - "ReplicationsOperations", - "ScopeMapsOperations", - "TokensOperations", - "WebhooksOperations", -] -__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore -_patch_sdk() diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/operations/_operations.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/operations/_operations.py deleted file mode 100644 index 5c3bd56b7a0..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/operations/_operations.py +++ /dev/null @@ -1,13281 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.8, generator: @autorest/python@6.49.1) -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.polling.base_polling import LROBasePolling -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict - -from .. import models as _models -from .._configuration import ContainerRegistryManagementClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_operations_list_request(**kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/providers/Microsoft.ContainerRegistry/operations" - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_registries_check_name_availability_request( # pylint: disable=name-too-long - subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerRegistry/checkNameAvailability" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_registries_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerRegistry/registries" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_registries_list_by_resource_group_request( # pylint: disable=name-too-long - resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_registries_get_request( - resource_group_name: str, registry_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_registries_create_request( - resource_group_name: str, registry_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_registries_update_request( - resource_group_name: str, registry_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_registries_delete_request( - resource_group_name: str, registry_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_registries_generate_credentials_request( # pylint: disable=name-too-long - resource_group_name: str, registry_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/generateCredentials" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_registries_import_image_request( - resource_group_name: str, registry_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importImage" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_registries_list_credentials_request( # pylint: disable=name-too-long - resource_group_name: str, registry_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listCredentials" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_registries_list_usages_request( - resource_group_name: str, registry_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listUsages" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_registries_list_private_link_resources_request( # pylint: disable=name-too-long - resource_group_name: str, registry_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateLinkResources" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_registries_get_private_link_resource_request( # pylint: disable=name-too-long - resource_group_name: str, registry_name: str, group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateLinkResources/{groupName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "groupName": _SERIALIZER.url("group_name", group_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_registries_regenerate_credential_request( # pylint: disable=name-too-long - resource_group_name: str, registry_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/regenerateCredential" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_cache_rules_list_request( - resource_group_name: str, registry_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_cache_rules_get_request( - resource_group_name: str, registry_name: str, cache_rule_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules/{cacheRuleName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "cacheRuleName": _SERIALIZER.url( - "cache_rule_name", cache_rule_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9-]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_cache_rules_create_request( - resource_group_name: str, registry_name: str, cache_rule_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules/{cacheRuleName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "cacheRuleName": _SERIALIZER.url( - "cache_rule_name", cache_rule_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9-]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_cache_rules_update_request( - resource_group_name: str, registry_name: str, cache_rule_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules/{cacheRuleName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "cacheRuleName": _SERIALIZER.url( - "cache_rule_name", cache_rule_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9-]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_cache_rules_delete_request( - resource_group_name: str, registry_name: str, cache_rule_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules/{cacheRuleName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "cacheRuleName": _SERIALIZER.url( - "cache_rule_name", cache_rule_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9-]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_connected_registries_list_request( - resource_group_name: str, registry_name: str, subscription_id: str, *, filter: Optional[str] = None, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - if filter is not None: - _params["$filter"] = _SERIALIZER.query("filter", filter, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_connected_registries_get_request( - resource_group_name: str, registry_name: str, connected_registry_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "connectedRegistryName": _SERIALIZER.url( - "connected_registry_name", - connected_registry_name, - "str", - max_length=50, - min_length=5, - pattern=r"^[a-zA-Z0-9]*$", - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_connected_registries_create_request( # pylint: disable=name-too-long - resource_group_name: str, registry_name: str, connected_registry_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "connectedRegistryName": _SERIALIZER.url( - "connected_registry_name", - connected_registry_name, - "str", - max_length=50, - min_length=5, - pattern=r"^[a-zA-Z0-9]*$", - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_connected_registries_update_request( # pylint: disable=name-too-long - resource_group_name: str, registry_name: str, connected_registry_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "connectedRegistryName": _SERIALIZER.url( - "connected_registry_name", - connected_registry_name, - "str", - max_length=50, - min_length=5, - pattern=r"^[a-zA-Z0-9]*$", - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_connected_registries_delete_request( # pylint: disable=name-too-long - resource_group_name: str, registry_name: str, connected_registry_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "connectedRegistryName": _SERIALIZER.url( - "connected_registry_name", - connected_registry_name, - "str", - max_length=50, - min_length=5, - pattern=r"^[a-zA-Z0-9]*$", - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_connected_registries_deactivate_request( # pylint: disable=name-too-long - resource_group_name: str, registry_name: str, connected_registry_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}/deactivate" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "connectedRegistryName": _SERIALIZER.url( - "connected_registry_name", - connected_registry_name, - "str", - max_length=50, - min_length=5, - pattern=r"^[a-zA-Z0-9]*$", - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_connected_registries_resync_request( # pylint: disable=name-too-long - resource_group_name: str, registry_name: str, connected_registry_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}/resync" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "connectedRegistryName": _SERIALIZER.url( - "connected_registry_name", - connected_registry_name, - "str", - max_length=50, - min_length=5, - pattern=r"^[a-zA-Z0-9]*$", - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_credential_sets_list_request( - resource_group_name: str, registry_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_credential_sets_get_request( - resource_group_name: str, registry_name: str, credential_set_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets/{credentialSetName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "credentialSetName": _SERIALIZER.url( - "credential_set_name", credential_set_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9-]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_credential_sets_create_request( - resource_group_name: str, registry_name: str, credential_set_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets/{credentialSetName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "credentialSetName": _SERIALIZER.url( - "credential_set_name", credential_set_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9-]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_credential_sets_update_request( - resource_group_name: str, registry_name: str, credential_set_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets/{credentialSetName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "credentialSetName": _SERIALIZER.url( - "credential_set_name", credential_set_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9-]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_credential_sets_delete_request( - resource_group_name: str, registry_name: str, credential_set_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets/{credentialSetName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "credentialSetName": _SERIALIZER.url( - "credential_set_name", credential_set_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9-]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_export_pipelines_list_request( - resource_group_name: str, registry_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_export_pipelines_get_request( - resource_group_name: str, registry_name: str, export_pipeline_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines/{exportPipelineName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "exportPipelineName": _SERIALIZER.url( - "export_pipeline_name", export_pipeline_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_export_pipelines_create_request( - resource_group_name: str, registry_name: str, export_pipeline_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines/{exportPipelineName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "exportPipelineName": _SERIALIZER.url( - "export_pipeline_name", export_pipeline_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_export_pipelines_delete_request( - resource_group_name: str, registry_name: str, export_pipeline_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines/{exportPipelineName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "exportPipelineName": _SERIALIZER.url( - "export_pipeline_name", export_pipeline_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_import_pipelines_list_request( - resource_group_name: str, registry_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_import_pipelines_get_request( - resource_group_name: str, registry_name: str, import_pipeline_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines/{importPipelineName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "importPipelineName": _SERIALIZER.url( - "import_pipeline_name", import_pipeline_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_import_pipelines_create_request( - resource_group_name: str, registry_name: str, import_pipeline_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines/{importPipelineName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "importPipelineName": _SERIALIZER.url( - "import_pipeline_name", import_pipeline_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_import_pipelines_delete_request( - resource_group_name: str, registry_name: str, import_pipeline_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines/{importPipelineName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "importPipelineName": _SERIALIZER.url( - "import_pipeline_name", import_pipeline_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_archives_list_request( - resource_group_name: str, registry_name: str, package_type: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "packageType": _SERIALIZER.url( - "package_type", package_type, "str", max_length=50, min_length=3, pattern=r"^[a-zA-Z]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_archives_get_request( - resource_group_name: str, - registry_name: str, - package_type: str, - archive_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "packageType": _SERIALIZER.url( - "package_type", package_type, "str", max_length=50, min_length=3, pattern=r"^[a-zA-Z]*$" - ), - "archiveName": _SERIALIZER.url( - "archive_name", archive_name, "str", max_length=200, min_length=5, pattern=r"^[a-zA-Z0-9-]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_archives_create_request( - resource_group_name: str, - registry_name: str, - package_type: str, - archive_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "packageType": _SERIALIZER.url( - "package_type", package_type, "str", max_length=50, min_length=3, pattern=r"^[a-zA-Z]*$" - ), - "archiveName": _SERIALIZER.url( - "archive_name", archive_name, "str", max_length=200, min_length=5, pattern=r"^[a-zA-Z0-9-]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_archives_update_request( - resource_group_name: str, - registry_name: str, - package_type: str, - archive_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "packageType": _SERIALIZER.url( - "package_type", package_type, "str", max_length=50, min_length=3, pattern=r"^[a-zA-Z]*$" - ), - "archiveName": _SERIALIZER.url( - "archive_name", archive_name, "str", max_length=200, min_length=5, pattern=r"^[a-zA-Z0-9-]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_archives_delete_request( - resource_group_name: str, - registry_name: str, - package_type: str, - archive_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "packageType": _SERIALIZER.url( - "package_type", package_type, "str", max_length=50, min_length=3, pattern=r"^[a-zA-Z]*$" - ), - "archiveName": _SERIALIZER.url( - "archive_name", archive_name, "str", max_length=200, min_length=5, pattern=r"^[a-zA-Z0-9-]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_archive_versions_list_request( - resource_group_name: str, - registry_name: str, - package_type: str, - archive_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}/versions" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "packageType": _SERIALIZER.url( - "package_type", package_type, "str", max_length=50, min_length=3, pattern=r"^[a-zA-Z]*$" - ), - "archiveName": _SERIALIZER.url( - "archive_name", archive_name, "str", max_length=200, min_length=5, pattern=r"^[a-zA-Z0-9-]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_archive_versions_get_request( - resource_group_name: str, - registry_name: str, - package_type: str, - archive_name: str, - archive_version_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}/versions/{archiveVersionName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "packageType": _SERIALIZER.url( - "package_type", package_type, "str", max_length=50, min_length=3, pattern=r"^[a-zA-Z]*$" - ), - "archiveName": _SERIALIZER.url( - "archive_name", archive_name, "str", max_length=200, min_length=5, pattern=r"^[a-zA-Z0-9-]*$" - ), - "archiveVersionName": _SERIALIZER.url( - "archive_version_name", - archive_version_name, - "str", - max_length=200, - min_length=5, - pattern=r"^[a-zA-Z0-9-]*$", - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_archive_versions_create_request( - resource_group_name: str, - registry_name: str, - package_type: str, - archive_name: str, - archive_version_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}/versions/{archiveVersionName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "packageType": _SERIALIZER.url( - "package_type", package_type, "str", max_length=50, min_length=3, pattern=r"^[a-zA-Z]*$" - ), - "archiveName": _SERIALIZER.url( - "archive_name", archive_name, "str", max_length=200, min_length=5, pattern=r"^[a-zA-Z0-9-]*$" - ), - "archiveVersionName": _SERIALIZER.url( - "archive_version_name", - archive_version_name, - "str", - max_length=200, - min_length=5, - pattern=r"^[a-zA-Z0-9-]*$", - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_archive_versions_delete_request( - resource_group_name: str, - registry_name: str, - package_type: str, - archive_name: str, - archive_version_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}/versions/{archiveVersionName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "packageType": _SERIALIZER.url( - "package_type", package_type, "str", max_length=50, min_length=3, pattern=r"^[a-zA-Z]*$" - ), - "archiveName": _SERIALIZER.url( - "archive_name", archive_name, "str", max_length=200, min_length=5, pattern=r"^[a-zA-Z0-9-]*$" - ), - "archiveVersionName": _SERIALIZER.url( - "archive_version_name", - archive_version_name, - "str", - max_length=200, - min_length=5, - pattern=r"^[a-zA-Z0-9-]*$", - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_pipeline_runs_list_request( - resource_group_name: str, registry_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_pipeline_runs_get_request( - resource_group_name: str, registry_name: str, pipeline_run_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns/{pipelineRunName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "pipelineRunName": _SERIALIZER.url( - "pipeline_run_name", pipeline_run_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_pipeline_runs_create_request( - resource_group_name: str, registry_name: str, pipeline_run_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns/{pipelineRunName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "pipelineRunName": _SERIALIZER.url( - "pipeline_run_name", pipeline_run_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_pipeline_runs_delete_request( - resource_group_name: str, registry_name: str, pipeline_run_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns/{pipelineRunName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "pipelineRunName": _SERIALIZER.url( - "pipeline_run_name", pipeline_run_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_private_endpoint_connections_list_request( # pylint: disable=name-too-long - resource_group_name: str, registry_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateEndpointConnections" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_private_endpoint_connections_get_request( # pylint: disable=name-too-long - resource_group_name: str, - registry_name: str, - private_endpoint_connection_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateEndpointConnections/{privateEndpointConnectionName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "privateEndpointConnectionName": _SERIALIZER.url( - "private_endpoint_connection_name", private_endpoint_connection_name, "str" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_private_endpoint_connections_create_or_update_request( # pylint: disable=name-too-long - resource_group_name: str, - registry_name: str, - private_endpoint_connection_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateEndpointConnections/{privateEndpointConnectionName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "privateEndpointConnectionName": _SERIALIZER.url( - "private_endpoint_connection_name", private_endpoint_connection_name, "str" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_private_endpoint_connections_delete_request( # pylint: disable=name-too-long - resource_group_name: str, - registry_name: str, - private_endpoint_connection_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateEndpointConnections/{privateEndpointConnectionName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "privateEndpointConnectionName": _SERIALIZER.url( - "private_endpoint_connection_name", private_endpoint_connection_name, "str" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_replications_list_request( - resource_group_name: str, registry_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_replications_get_request( - resource_group_name: str, registry_name: str, replication_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications/{replicationName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "replicationName": _SERIALIZER.url( - "replication_name", replication_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_replications_create_request( - resource_group_name: str, registry_name: str, replication_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications/{replicationName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "replicationName": _SERIALIZER.url( - "replication_name", replication_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_replications_update_request( - resource_group_name: str, registry_name: str, replication_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications/{replicationName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "replicationName": _SERIALIZER.url( - "replication_name", replication_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_replications_delete_request( - resource_group_name: str, registry_name: str, replication_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications/{replicationName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "replicationName": _SERIALIZER.url( - "replication_name", replication_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_scope_maps_list_request( - resource_group_name: str, registry_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_scope_maps_get_request( - resource_group_name: str, registry_name: str, scope_map_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps/{scopeMapName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "scopeMapName": _SERIALIZER.url( - "scope_map_name", scope_map_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9-_]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_scope_maps_create_request( - resource_group_name: str, registry_name: str, scope_map_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps/{scopeMapName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "scopeMapName": _SERIALIZER.url( - "scope_map_name", scope_map_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9-_]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_scope_maps_update_request( - resource_group_name: str, registry_name: str, scope_map_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps/{scopeMapName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "scopeMapName": _SERIALIZER.url( - "scope_map_name", scope_map_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9-_]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_scope_maps_delete_request( - resource_group_name: str, registry_name: str, scope_map_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps/{scopeMapName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "scopeMapName": _SERIALIZER.url( - "scope_map_name", scope_map_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9-_]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_tokens_list_request( - resource_group_name: str, registry_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_tokens_get_request( - resource_group_name: str, registry_name: str, token_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens/{tokenName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "tokenName": _SERIALIZER.url( - "token_name", token_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9-]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_tokens_create_request( - resource_group_name: str, registry_name: str, token_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens/{tokenName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "tokenName": _SERIALIZER.url( - "token_name", token_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9-]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_tokens_update_request( - resource_group_name: str, registry_name: str, token_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens/{tokenName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "tokenName": _SERIALIZER.url( - "token_name", token_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9-]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_tokens_delete_request( - resource_group_name: str, registry_name: str, token_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens/{tokenName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "tokenName": _SERIALIZER.url( - "token_name", token_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9-]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_webhooks_list_request( - resource_group_name: str, registry_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_webhooks_get_request( - resource_group_name: str, registry_name: str, webhook_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "webhookName": _SERIALIZER.url( - "webhook_name", webhook_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_webhooks_create_request( - resource_group_name: str, registry_name: str, webhook_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "webhookName": _SERIALIZER.url( - "webhook_name", webhook_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_webhooks_update_request( - resource_group_name: str, registry_name: str, webhook_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "webhookName": _SERIALIZER.url( - "webhook_name", webhook_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_webhooks_delete_request( - resource_group_name: str, registry_name: str, webhook_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "webhookName": _SERIALIZER.url( - "webhook_name", webhook_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_webhooks_get_callback_config_request( # pylint: disable=name-too-long - resource_group_name: str, registry_name: str, webhook_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/getCallbackConfig" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "webhookName": _SERIALIZER.url( - "webhook_name", webhook_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_webhooks_list_events_request( - resource_group_name: str, registry_name: str, webhook_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/listEvents" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "webhookName": _SERIALIZER.url( - "webhook_name", webhook_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_webhooks_ping_request( - resource_group_name: str, registry_name: str, webhook_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-01-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/ping" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "registryName": _SERIALIZER.url( - "registry_name", registry_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - "webhookName": _SERIALIZER.url( - "webhook_name", webhook_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9]*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class Operations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~container_registry_management_client.ContainerRegistryManagementClient`'s - :attr:`operations` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerRegistryManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list(self, **kwargs: Any) -> ItemPaged["_models.OperationDefinition"]: - """List the operations for the provider. - - :return: An iterator like instance of OperationDefinition - :rtype: - ~azure.core.paging.ItemPaged[~container_registry_management_client.models.OperationDefinition] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models._models.OperationListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_operations_list_request( - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize( - _models._models.OperationListResult, pipeline_response # pylint: disable=protected-access - ) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - -class RegistriesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~container_registry_management_client.ContainerRegistryManagementClient`'s - :attr:`registries` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerRegistryManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @overload - def check_name_availability( - self, - registry_name_check_request: _models.RegistryNameCheckRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.RegistryNameStatus: - """Checks whether the container registry name is available for use. The name must contain only - alphanumeric characters, be globally unique, and between 5 and 50 characters in length. - - :param registry_name_check_request: The request body. Required. - :type registry_name_check_request: - ~container_registry_management_client.models.RegistryNameCheckRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: RegistryNameStatus - :rtype: ~container_registry_management_client.models.RegistryNameStatus - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def check_name_availability( - self, registry_name_check_request: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.RegistryNameStatus: - """Checks whether the container registry name is available for use. The name must contain only - alphanumeric characters, be globally unique, and between 5 and 50 characters in length. - - :param registry_name_check_request: The request body. Required. - :type registry_name_check_request: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: RegistryNameStatus - :rtype: ~container_registry_management_client.models.RegistryNameStatus - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def check_name_availability( - self, registry_name_check_request: Union[_models.RegistryNameCheckRequest, IO[bytes]], **kwargs: Any - ) -> _models.RegistryNameStatus: - """Checks whether the container registry name is available for use. The name must contain only - alphanumeric characters, be globally unique, and between 5 and 50 characters in length. - - :param registry_name_check_request: The request body. Is either a RegistryNameCheckRequest type - or a IO[bytes] type. Required. - :type registry_name_check_request: - ~container_registry_management_client.models.RegistryNameCheckRequest or IO[bytes] - :return: RegistryNameStatus - :rtype: ~container_registry_management_client.models.RegistryNameStatus - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.RegistryNameStatus] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(registry_name_check_request, (IOBase, bytes)): - _content = registry_name_check_request - else: - _json = self._serialize.body(registry_name_check_request, "RegistryNameCheckRequest") - - _request = build_registries_check_name_availability_request( - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize("RegistryNameStatus", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def list(self, **kwargs: Any) -> ItemPaged["_models.Registry"]: - """Lists all the container registries under the specified subscription. - - :return: An iterator like instance of Registry - :rtype: ~azure.core.paging.ItemPaged[~container_registry_management_client.models.Registry] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models._models.RegistryListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_registries_list_request( - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize( - _models._models.RegistryListResult, pipeline_response # pylint: disable=protected-access - ) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.Registry"]: - """Lists all the container registries under the specified resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of Registry - :rtype: ~azure.core.paging.ItemPaged[~container_registry_management_client.models.Registry] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models._models.RegistryListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_registries_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize( - _models._models.RegistryListResult, pipeline_response # pylint: disable=protected-access - ) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> _models.Registry: - """Gets the properties of the specified container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :return: Registry - :rtype: ~container_registry_management_client.models.Registry - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.Registry] = kwargs.pop("cls", None) - - _request = build_registries_get_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize("Registry", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_initial( - self, resource_group_name: str, registry_name: str, registry: Union[_models.Registry, IO[bytes]], **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(registry, (IOBase, bytes)): - _content = registry - else: - _json = self._serialize.body(registry, "Registry") - - _request = build_registries_create_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - registry_name: str, - registry: _models.Registry, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Registry]: - """Creates a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param registry: The parameters for creating a container registry. Required. - :type registry: ~container_registry_management_client.models.Registry - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns Registry - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Registry] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - registry_name: str, - registry: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Registry]: - """Creates a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param registry: The parameters for creating a container registry. Required. - :type registry: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns Registry - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Registry] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, resource_group_name: str, registry_name: str, registry: Union[_models.Registry, IO[bytes]], **kwargs: Any - ) -> LROPoller[_models.Registry]: - """Creates a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param registry: The parameters for creating a container registry. Is either a Registry type or - a IO[bytes] type. Required. - :type registry: ~container_registry_management_client.models.Registry or IO[bytes] - :return: An instance of LROPoller that returns Registry - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Registry] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Registry] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - registry=registry, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Registry", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, - LROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.Registry].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.Registry]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _update_initial( - self, - resource_group_name: str, - registry_name: str, - registry_update_parameters: Union[_models.RegistryUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(registry_update_parameters, (IOBase, bytes)): - _content = registry_update_parameters - else: - _json = self._serialize.body(registry_update_parameters, "RegistryUpdateParameters") - - _request = build_registries_update_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - registry_name: str, - registry_update_parameters: _models.RegistryUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Registry]: - """Updates a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param registry_update_parameters: The parameters for updating a container registry. Required. - :type registry_update_parameters: - ~container_registry_management_client.models.RegistryUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns Registry - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Registry] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - registry_name: str, - registry_update_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Registry]: - """Updates a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param registry_update_parameters: The parameters for updating a container registry. Required. - :type registry_update_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns Registry - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Registry] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - registry_name: str, - registry_update_parameters: Union[_models.RegistryUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.Registry]: - """Updates a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param registry_update_parameters: The parameters for updating a container registry. Is either - a RegistryUpdateParameters type or a IO[bytes] type. Required. - :type registry_update_parameters: - ~container_registry_management_client.models.RegistryUpdateParameters or IO[bytes] - :return: An instance of LROPoller that returns Registry - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Registry] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Registry] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - registry_update_parameters=registry_update_parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Registry", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, - LROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.Registry].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.Registry]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_registries_delete_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> LROPoller[None]: - """Deletes a container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, LROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - def _generate_credentials_initial( - self, - resource_group_name: str, - registry_name: str, - generate_credentials_parameters: Union[_models.GenerateCredentialsParameters, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(generate_credentials_parameters, (IOBase, bytes)): - _content = generate_credentials_parameters - else: - _json = self._serialize.body(generate_credentials_parameters, "GenerateCredentialsParameters") - - _request = build_registries_generate_credentials_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_generate_credentials( - self, - resource_group_name: str, - registry_name: str, - generate_credentials_parameters: _models.GenerateCredentialsParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.GenerateCredentialsResult]: - """Generate keys for a token of a specified container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param generate_credentials_parameters: The parameters for generating credentials. Required. - :type generate_credentials_parameters: - ~container_registry_management_client.models.GenerateCredentialsParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns GenerateCredentialsResult - :rtype: - ~azure.core.polling.LROPoller[~container_registry_management_client.models.GenerateCredentialsResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_generate_credentials( - self, - resource_group_name: str, - registry_name: str, - generate_credentials_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.GenerateCredentialsResult]: - """Generate keys for a token of a specified container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param generate_credentials_parameters: The parameters for generating credentials. Required. - :type generate_credentials_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns GenerateCredentialsResult - :rtype: - ~azure.core.polling.LROPoller[~container_registry_management_client.models.GenerateCredentialsResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_generate_credentials( - self, - resource_group_name: str, - registry_name: str, - generate_credentials_parameters: Union[_models.GenerateCredentialsParameters, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.GenerateCredentialsResult]: - """Generate keys for a token of a specified container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param generate_credentials_parameters: The parameters for generating credentials. Is either a - GenerateCredentialsParameters type or a IO[bytes] type. Required. - :type generate_credentials_parameters: - ~container_registry_management_client.models.GenerateCredentialsParameters or IO[bytes] - :return: An instance of LROPoller that returns GenerateCredentialsResult - :rtype: - ~azure.core.polling.LROPoller[~container_registry_management_client.models.GenerateCredentialsResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.GenerateCredentialsResult] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._generate_credentials_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - generate_credentials_parameters=generate_credentials_parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("GenerateCredentialsResult", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, LROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.GenerateCredentialsResult].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.GenerateCredentialsResult]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _import_image_initial( - self, - resource_group_name: str, - registry_name: str, - parameters: Union[_models.ImportImageParameters, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ImportImageParameters") - - _request = build_registries_import_image_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_import_image( - self, - resource_group_name: str, - registry_name: str, - parameters: _models.ImportImageParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Copies an image to this container registry from the specified container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param parameters: The parameters specifying the image to copy and the source container - registry. Required. - :type parameters: ~container_registry_management_client.models.ImportImageParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_import_image( - self, - resource_group_name: str, - registry_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Copies an image to this container registry from the specified container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param parameters: The parameters specifying the image to copy and the source container - registry. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_import_image( - self, - resource_group_name: str, - registry_name: str, - parameters: Union[_models.ImportImageParameters, IO[bytes]], - **kwargs: Any - ) -> LROPoller[None]: - """Copies an image to this container registry from the specified container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param parameters: The parameters specifying the image to copy and the source container - registry. Is either a ImportImageParameters type or a IO[bytes] type. Required. - :type parameters: ~container_registry_management_client.models.ImportImageParameters or - IO[bytes] - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._import_image_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - parameters=parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, LROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_credentials( - self, resource_group_name: str, registry_name: str, **kwargs: Any - ) -> _models.RegistryListCredentialsResult: - """Lists the login credentials for the specified container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :return: RegistryListCredentialsResult - :rtype: ~container_registry_management_client.models.RegistryListCredentialsResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.RegistryListCredentialsResult] = kwargs.pop("cls", None) - - _request = build_registries_list_credentials_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize("RegistryListCredentialsResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def list_usages( - self, resource_group_name: str, registry_name: str, **kwargs: Any - ) -> _models.RegistryUsageListResult: - """Gets the quota usages for the specified container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :return: RegistryUsageListResult - :rtype: ~container_registry_management_client.models.RegistryUsageListResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.RegistryUsageListResult] = kwargs.pop("cls", None) - - _request = build_registries_list_usages_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize("RegistryUsageListResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def list_private_link_resources( - self, resource_group_name: str, registry_name: str, **kwargs: Any - ) -> ItemPaged["_models.PrivateLinkResource"]: - """Lists the private link resources for a container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :return: An iterator like instance of PrivateLinkResource - :rtype: - ~azure.core.paging.ItemPaged[~container_registry_management_client.models.PrivateLinkResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models._models.PrivateLinkResourceListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_registries_list_private_link_resources_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize( - _models._models.PrivateLinkResourceListResult, pipeline_response # pylint: disable=protected-access - ) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_private_link_resource( - self, resource_group_name: str, registry_name: str, group_name: str, **kwargs: Any - ) -> _models.PrivateLinkResource: - """Gets a private link resource by a specified group name for a container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param group_name: The name of the private link associated with the Azure resource. Required. - :type group_name: str - :return: PrivateLinkResource - :rtype: ~container_registry_management_client.models.PrivateLinkResource - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.PrivateLinkResource] = kwargs.pop("cls", None) - - _request = build_registries_get_private_link_resource_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - group_name=group_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize("PrivateLinkResource", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def regenerate_credential( - self, - resource_group_name: str, - registry_name: str, - regenerate_credential_parameters: _models.RegenerateCredentialParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.RegistryListCredentialsResult: - """Regenerates one of the login credentials for the specified container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param regenerate_credential_parameters: Specifies name of the password which should be - regenerated -- password or password2. Required. - :type regenerate_credential_parameters: - ~container_registry_management_client.models.RegenerateCredentialParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: RegistryListCredentialsResult - :rtype: ~container_registry_management_client.models.RegistryListCredentialsResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def regenerate_credential( - self, - resource_group_name: str, - registry_name: str, - regenerate_credential_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.RegistryListCredentialsResult: - """Regenerates one of the login credentials for the specified container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param regenerate_credential_parameters: Specifies name of the password which should be - regenerated -- password or password2. Required. - :type regenerate_credential_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: RegistryListCredentialsResult - :rtype: ~container_registry_management_client.models.RegistryListCredentialsResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def regenerate_credential( - self, - resource_group_name: str, - registry_name: str, - regenerate_credential_parameters: Union[_models.RegenerateCredentialParameters, IO[bytes]], - **kwargs: Any - ) -> _models.RegistryListCredentialsResult: - """Regenerates one of the login credentials for the specified container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param regenerate_credential_parameters: Specifies name of the password which should be - regenerated -- password or password2. Is either a RegenerateCredentialParameters type or a - IO[bytes] type. Required. - :type regenerate_credential_parameters: - ~container_registry_management_client.models.RegenerateCredentialParameters or IO[bytes] - :return: RegistryListCredentialsResult - :rtype: ~container_registry_management_client.models.RegistryListCredentialsResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.RegistryListCredentialsResult] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(regenerate_credential_parameters, (IOBase, bytes)): - _content = regenerate_credential_parameters - else: - _json = self._serialize.body(regenerate_credential_parameters, "RegenerateCredentialParameters") - - _request = build_registries_regenerate_credential_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize("RegistryListCredentialsResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - -class CacheRulesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~container_registry_management_client.ContainerRegistryManagementClient`'s - :attr:`cache_rules` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerRegistryManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> ItemPaged["_models.CacheRule"]: - """Lists all cache rule resources for the specified container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :return: An iterator like instance of CacheRule - :rtype: ~azure.core.paging.ItemPaged[~container_registry_management_client.models.CacheRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models._models.CacheRulesListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_cache_rules_list_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize( - _models._models.CacheRulesListResult, pipeline_response # pylint: disable=protected-access - ) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, resource_group_name: str, registry_name: str, cache_rule_name: str, **kwargs: Any - ) -> _models.CacheRule: - """Gets the properties of the specified cache rule resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param cache_rule_name: The name of the cache rule. Required. - :type cache_rule_name: str - :return: CacheRule - :rtype: ~container_registry_management_client.models.CacheRule - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.CacheRule] = kwargs.pop("cls", None) - - _request = build_cache_rules_get_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - cache_rule_name=cache_rule_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize("CacheRule", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_initial( - self, - resource_group_name: str, - registry_name: str, - cache_rule_name: str, - cache_rule_create_parameters: Union[_models.CacheRule, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(cache_rule_create_parameters, (IOBase, bytes)): - _content = cache_rule_create_parameters - else: - _json = self._serialize.body(cache_rule_create_parameters, "CacheRule") - - _request = build_cache_rules_create_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - cache_rule_name=cache_rule_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - registry_name: str, - cache_rule_name: str, - cache_rule_create_parameters: _models.CacheRule, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CacheRule]: - """Creates a cache rule for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param cache_rule_name: The name of the cache rule. Required. - :type cache_rule_name: str - :param cache_rule_create_parameters: The parameters for creating a cache rule. Required. - :type cache_rule_create_parameters: ~container_registry_management_client.models.CacheRule - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns CacheRule - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.CacheRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - registry_name: str, - cache_rule_name: str, - cache_rule_create_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CacheRule]: - """Creates a cache rule for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param cache_rule_name: The name of the cache rule. Required. - :type cache_rule_name: str - :param cache_rule_create_parameters: The parameters for creating a cache rule. Required. - :type cache_rule_create_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns CacheRule - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.CacheRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, - resource_group_name: str, - registry_name: str, - cache_rule_name: str, - cache_rule_create_parameters: Union[_models.CacheRule, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.CacheRule]: - """Creates a cache rule for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param cache_rule_name: The name of the cache rule. Required. - :type cache_rule_name: str - :param cache_rule_create_parameters: The parameters for creating a cache rule. Is either a - CacheRule type or a IO[bytes] type. Required. - :type cache_rule_create_parameters: ~container_registry_management_client.models.CacheRule or - IO[bytes] - :return: An instance of LROPoller that returns CacheRule - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.CacheRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CacheRule] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - cache_rule_name=cache_rule_name, - cache_rule_create_parameters=cache_rule_create_parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CacheRule", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, - LROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.CacheRule].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.CacheRule]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _update_initial( - self, - resource_group_name: str, - registry_name: str, - cache_rule_name: str, - cache_rule_update_parameters: Union[_models.CacheRuleUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(cache_rule_update_parameters, (IOBase, bytes)): - _content = cache_rule_update_parameters - else: - _json = self._serialize.body(cache_rule_update_parameters, "CacheRuleUpdateParameters") - - _request = build_cache_rules_update_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - cache_rule_name=cache_rule_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - registry_name: str, - cache_rule_name: str, - cache_rule_update_parameters: _models.CacheRuleUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CacheRule]: - """Updates a cache rule for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param cache_rule_name: The name of the cache rule. Required. - :type cache_rule_name: str - :param cache_rule_update_parameters: The parameters for updating a cache rule. Required. - :type cache_rule_update_parameters: - ~container_registry_management_client.models.CacheRuleUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns CacheRule - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.CacheRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - registry_name: str, - cache_rule_name: str, - cache_rule_update_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CacheRule]: - """Updates a cache rule for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param cache_rule_name: The name of the cache rule. Required. - :type cache_rule_name: str - :param cache_rule_update_parameters: The parameters for updating a cache rule. Required. - :type cache_rule_update_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns CacheRule - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.CacheRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - registry_name: str, - cache_rule_name: str, - cache_rule_update_parameters: Union[_models.CacheRuleUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.CacheRule]: - """Updates a cache rule for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param cache_rule_name: The name of the cache rule. Required. - :type cache_rule_name: str - :param cache_rule_update_parameters: The parameters for updating a cache rule. Is either a - CacheRuleUpdateParameters type or a IO[bytes] type. Required. - :type cache_rule_update_parameters: - ~container_registry_management_client.models.CacheRuleUpdateParameters or IO[bytes] - :return: An instance of LROPoller that returns CacheRule - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.CacheRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CacheRule] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - cache_rule_name=cache_rule_name, - cache_rule_update_parameters=cache_rule_update_parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CacheRule", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, - LROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.CacheRule].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.CacheRule]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, registry_name: str, cache_rule_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_cache_rules_delete_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - cache_rule_name=cache_rule_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, resource_group_name: str, registry_name: str, cache_rule_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes a cache rule resource from a container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param cache_rule_name: The name of the cache rule. Required. - :type cache_rule_name: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - cache_rule_name=cache_rule_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, LROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - -class ConnectedRegistriesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~container_registry_management_client.ContainerRegistryManagementClient`'s - :attr:`connected_registries` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerRegistryManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, resource_group_name: str, registry_name: str, *, filter: Optional[str] = None, **kwargs: Any - ) -> ItemPaged["_models.ConnectedRegistry"]: - """Lists all connected registries for the specified container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :keyword filter: An OData filter expression that describes a subset of connectedRegistries to - return. The parameters that can be filtered are parent.id (the resource id of the - connectedRegistry parent), mode, and connectionState. The supported operator is eq. Default - value is None. - :paramtype filter: str - :return: An iterator like instance of ConnectedRegistry - :rtype: - ~azure.core.paging.ItemPaged[~container_registry_management_client.models.ConnectedRegistry] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models._models.ConnectedRegistryListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_connected_registries_list_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - subscription_id=self._config.subscription_id, - filter=filter, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize( - _models._models.ConnectedRegistryListResult, pipeline_response # pylint: disable=protected-access - ) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, resource_group_name: str, registry_name: str, connected_registry_name: str, **kwargs: Any - ) -> _models.ConnectedRegistry: - """Gets the properties of the connected registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param connected_registry_name: The name of the connected registry. Required. - :type connected_registry_name: str - :return: ConnectedRegistry - :rtype: ~container_registry_management_client.models.ConnectedRegistry - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.ConnectedRegistry] = kwargs.pop("cls", None) - - _request = build_connected_registries_get_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - connected_registry_name=connected_registry_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize("ConnectedRegistry", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_initial( - self, - resource_group_name: str, - registry_name: str, - connected_registry_name: str, - connected_registry_create_parameters: Union[_models.ConnectedRegistry, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(connected_registry_create_parameters, (IOBase, bytes)): - _content = connected_registry_create_parameters - else: - _json = self._serialize.body(connected_registry_create_parameters, "ConnectedRegistry") - - _request = build_connected_registries_create_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - connected_registry_name=connected_registry_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - registry_name: str, - connected_registry_name: str, - connected_registry_create_parameters: _models.ConnectedRegistry, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ConnectedRegistry]: - """Creates a connected registry for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param connected_registry_name: The name of the connected registry. Required. - :type connected_registry_name: str - :param connected_registry_create_parameters: The parameters for creating a connectedRegistry. - Required. - :type connected_registry_create_parameters: - ~container_registry_management_client.models.ConnectedRegistry - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns ConnectedRegistry - :rtype: - ~azure.core.polling.LROPoller[~container_registry_management_client.models.ConnectedRegistry] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - registry_name: str, - connected_registry_name: str, - connected_registry_create_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ConnectedRegistry]: - """Creates a connected registry for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param connected_registry_name: The name of the connected registry. Required. - :type connected_registry_name: str - :param connected_registry_create_parameters: The parameters for creating a connectedRegistry. - Required. - :type connected_registry_create_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns ConnectedRegistry - :rtype: - ~azure.core.polling.LROPoller[~container_registry_management_client.models.ConnectedRegistry] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, - resource_group_name: str, - registry_name: str, - connected_registry_name: str, - connected_registry_create_parameters: Union[_models.ConnectedRegistry, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.ConnectedRegistry]: - """Creates a connected registry for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param connected_registry_name: The name of the connected registry. Required. - :type connected_registry_name: str - :param connected_registry_create_parameters: The parameters for creating a connectedRegistry. - Is either a ConnectedRegistry type or a IO[bytes] type. Required. - :type connected_registry_create_parameters: - ~container_registry_management_client.models.ConnectedRegistry or IO[bytes] - :return: An instance of LROPoller that returns ConnectedRegistry - :rtype: - ~azure.core.polling.LROPoller[~container_registry_management_client.models.ConnectedRegistry] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ConnectedRegistry] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - connected_registry_name=connected_registry_name, - connected_registry_create_parameters=connected_registry_create_parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ConnectedRegistry", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, - LROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.ConnectedRegistry].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ConnectedRegistry]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _update_initial( - self, - resource_group_name: str, - registry_name: str, - connected_registry_name: str, - connected_registry_update_parameters: Union[_models.ConnectedRegistryUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(connected_registry_update_parameters, (IOBase, bytes)): - _content = connected_registry_update_parameters - else: - _json = self._serialize.body(connected_registry_update_parameters, "ConnectedRegistryUpdateParameters") - - _request = build_connected_registries_update_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - connected_registry_name=connected_registry_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - registry_name: str, - connected_registry_name: str, - connected_registry_update_parameters: _models.ConnectedRegistryUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ConnectedRegistry]: - """Updates a connected registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param connected_registry_name: The name of the connected registry. Required. - :type connected_registry_name: str - :param connected_registry_update_parameters: The parameters for updating a connectedRegistry. - Required. - :type connected_registry_update_parameters: - ~container_registry_management_client.models.ConnectedRegistryUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns ConnectedRegistry - :rtype: - ~azure.core.polling.LROPoller[~container_registry_management_client.models.ConnectedRegistry] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - registry_name: str, - connected_registry_name: str, - connected_registry_update_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ConnectedRegistry]: - """Updates a connected registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param connected_registry_name: The name of the connected registry. Required. - :type connected_registry_name: str - :param connected_registry_update_parameters: The parameters for updating a connectedRegistry. - Required. - :type connected_registry_update_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns ConnectedRegistry - :rtype: - ~azure.core.polling.LROPoller[~container_registry_management_client.models.ConnectedRegistry] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - registry_name: str, - connected_registry_name: str, - connected_registry_update_parameters: Union[_models.ConnectedRegistryUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.ConnectedRegistry]: - """Updates a connected registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param connected_registry_name: The name of the connected registry. Required. - :type connected_registry_name: str - :param connected_registry_update_parameters: The parameters for updating a connectedRegistry. - Is either a ConnectedRegistryUpdateParameters type or a IO[bytes] type. Required. - :type connected_registry_update_parameters: - ~container_registry_management_client.models.ConnectedRegistryUpdateParameters or IO[bytes] - :return: An instance of LROPoller that returns ConnectedRegistry - :rtype: - ~azure.core.polling.LROPoller[~container_registry_management_client.models.ConnectedRegistry] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ConnectedRegistry] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - connected_registry_name=connected_registry_name, - connected_registry_update_parameters=connected_registry_update_parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ConnectedRegistry", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, - LROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.ConnectedRegistry].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ConnectedRegistry]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, registry_name: str, connected_registry_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_connected_registries_delete_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - connected_registry_name=connected_registry_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, resource_group_name: str, registry_name: str, connected_registry_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes a connected registry from a container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param connected_registry_name: The name of the connected registry. Required. - :type connected_registry_name: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - connected_registry_name=connected_registry_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, LROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - def _deactivate_initial( - self, resource_group_name: str, registry_name: str, connected_registry_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_connected_registries_deactivate_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - connected_registry_name=connected_registry_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_deactivate( - self, resource_group_name: str, registry_name: str, connected_registry_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deactivates the connected registry instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param connected_registry_name: The name of the connected registry. Required. - :type connected_registry_name: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._deactivate_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - connected_registry_name=connected_registry_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, LROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def resync( - self, resource_group_name: str, registry_name: str, connected_registry_name: str, **kwargs: Any - ) -> _models.ConnectedRegistry: - """Resync the connected registry instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param connected_registry_name: The name of the connected registry. Required. - :type connected_registry_name: str - :return: ConnectedRegistry - :rtype: ~container_registry_management_client.models.ConnectedRegistry - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.ConnectedRegistry] = kwargs.pop("cls", None) - - _request = build_connected_registries_resync_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - connected_registry_name=connected_registry_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize("ConnectedRegistry", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - -class CredentialSetsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~container_registry_management_client.ContainerRegistryManagementClient`'s - :attr:`credential_sets` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerRegistryManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> ItemPaged["_models.CredentialSet"]: - """Lists all credential set resources for the specified container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :return: An iterator like instance of CredentialSet - :rtype: - ~azure.core.paging.ItemPaged[~container_registry_management_client.models.CredentialSet] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models._models.CredentialSetListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_credential_sets_list_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize( - _models._models.CredentialSetListResult, pipeline_response # pylint: disable=protected-access - ) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, resource_group_name: str, registry_name: str, credential_set_name: str, **kwargs: Any - ) -> _models.CredentialSet: - """Gets the properties of the specified credential set resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param credential_set_name: The name of the credential set. Required. - :type credential_set_name: str - :return: CredentialSet - :rtype: ~container_registry_management_client.models.CredentialSet - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.CredentialSet] = kwargs.pop("cls", None) - - _request = build_credential_sets_get_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - credential_set_name=credential_set_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize("CredentialSet", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_initial( - self, - resource_group_name: str, - registry_name: str, - credential_set_name: str, - credential_set_create_parameters: Union[_models.CredentialSet, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(credential_set_create_parameters, (IOBase, bytes)): - _content = credential_set_create_parameters - else: - _json = self._serialize.body(credential_set_create_parameters, "CredentialSet") - - _request = build_credential_sets_create_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - credential_set_name=credential_set_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - registry_name: str, - credential_set_name: str, - credential_set_create_parameters: _models.CredentialSet, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CredentialSet]: - """Creates a credential set for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param credential_set_name: The name of the credential set. Required. - :type credential_set_name: str - :param credential_set_create_parameters: The parameters for creating a credential set. - Required. - :type credential_set_create_parameters: - ~container_registry_management_client.models.CredentialSet - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns CredentialSet - :rtype: - ~azure.core.polling.LROPoller[~container_registry_management_client.models.CredentialSet] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - registry_name: str, - credential_set_name: str, - credential_set_create_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CredentialSet]: - """Creates a credential set for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param credential_set_name: The name of the credential set. Required. - :type credential_set_name: str - :param credential_set_create_parameters: The parameters for creating a credential set. - Required. - :type credential_set_create_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns CredentialSet - :rtype: - ~azure.core.polling.LROPoller[~container_registry_management_client.models.CredentialSet] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, - resource_group_name: str, - registry_name: str, - credential_set_name: str, - credential_set_create_parameters: Union[_models.CredentialSet, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.CredentialSet]: - """Creates a credential set for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param credential_set_name: The name of the credential set. Required. - :type credential_set_name: str - :param credential_set_create_parameters: The parameters for creating a credential set. Is - either a CredentialSet type or a IO[bytes] type. Required. - :type credential_set_create_parameters: - ~container_registry_management_client.models.CredentialSet or IO[bytes] - :return: An instance of LROPoller that returns CredentialSet - :rtype: - ~azure.core.polling.LROPoller[~container_registry_management_client.models.CredentialSet] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CredentialSet] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - credential_set_name=credential_set_name, - credential_set_create_parameters=credential_set_create_parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CredentialSet", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, - LROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.CredentialSet].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.CredentialSet]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _update_initial( - self, - resource_group_name: str, - registry_name: str, - credential_set_name: str, - credential_set_update_parameters: Union[_models.CredentialSetUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(credential_set_update_parameters, (IOBase, bytes)): - _content = credential_set_update_parameters - else: - _json = self._serialize.body(credential_set_update_parameters, "CredentialSetUpdateParameters") - - _request = build_credential_sets_update_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - credential_set_name=credential_set_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - registry_name: str, - credential_set_name: str, - credential_set_update_parameters: _models.CredentialSetUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CredentialSet]: - """Updates a credential set for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param credential_set_name: The name of the credential set. Required. - :type credential_set_name: str - :param credential_set_update_parameters: The parameters for updating a credential set. - Required. - :type credential_set_update_parameters: - ~container_registry_management_client.models.CredentialSetUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns CredentialSet - :rtype: - ~azure.core.polling.LROPoller[~container_registry_management_client.models.CredentialSet] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - registry_name: str, - credential_set_name: str, - credential_set_update_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.CredentialSet]: - """Updates a credential set for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param credential_set_name: The name of the credential set. Required. - :type credential_set_name: str - :param credential_set_update_parameters: The parameters for updating a credential set. - Required. - :type credential_set_update_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns CredentialSet - :rtype: - ~azure.core.polling.LROPoller[~container_registry_management_client.models.CredentialSet] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - registry_name: str, - credential_set_name: str, - credential_set_update_parameters: Union[_models.CredentialSetUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.CredentialSet]: - """Updates a credential set for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param credential_set_name: The name of the credential set. Required. - :type credential_set_name: str - :param credential_set_update_parameters: The parameters for updating a credential set. Is - either a CredentialSetUpdateParameters type or a IO[bytes] type. Required. - :type credential_set_update_parameters: - ~container_registry_management_client.models.CredentialSetUpdateParameters or IO[bytes] - :return: An instance of LROPoller that returns CredentialSet - :rtype: - ~azure.core.polling.LROPoller[~container_registry_management_client.models.CredentialSet] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CredentialSet] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - credential_set_name=credential_set_name, - credential_set_update_parameters=credential_set_update_parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CredentialSet", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, - LROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.CredentialSet].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.CredentialSet]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, registry_name: str, credential_set_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_credential_sets_delete_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - credential_set_name=credential_set_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, resource_group_name: str, registry_name: str, credential_set_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes a credential set from a container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param credential_set_name: The name of the credential set. Required. - :type credential_set_name: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - credential_set_name=credential_set_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, LROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - -class ExportPipelinesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~container_registry_management_client.ContainerRegistryManagementClient`'s - :attr:`export_pipelines` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerRegistryManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> ItemPaged["_models.ExportPipeline"]: - """Lists all export pipelines for the specified container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :return: An iterator like instance of ExportPipeline - :rtype: - ~azure.core.paging.ItemPaged[~container_registry_management_client.models.ExportPipeline] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models._models.ExportPipelineListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_export_pipelines_list_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize( - _models._models.ExportPipelineListResult, pipeline_response # pylint: disable=protected-access - ) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, resource_group_name: str, registry_name: str, export_pipeline_name: str, **kwargs: Any - ) -> _models.ExportPipeline: - """Gets the properties of the export pipeline. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param export_pipeline_name: The name of the export pipeline. Required. - :type export_pipeline_name: str - :return: ExportPipeline - :rtype: ~container_registry_management_client.models.ExportPipeline - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.ExportPipeline] = kwargs.pop("cls", None) - - _request = build_export_pipelines_get_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - export_pipeline_name=export_pipeline_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize("ExportPipeline", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_initial( - self, - resource_group_name: str, - registry_name: str, - export_pipeline_name: str, - export_pipeline_create_parameters: Union[_models.ExportPipeline, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(export_pipeline_create_parameters, (IOBase, bytes)): - _content = export_pipeline_create_parameters - else: - _json = self._serialize.body(export_pipeline_create_parameters, "ExportPipeline") - - _request = build_export_pipelines_create_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - export_pipeline_name=export_pipeline_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - registry_name: str, - export_pipeline_name: str, - export_pipeline_create_parameters: _models.ExportPipeline, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ExportPipeline]: - """Creates an export pipeline for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param export_pipeline_name: The name of the export pipeline. Required. - :type export_pipeline_name: str - :param export_pipeline_create_parameters: The parameters for creating an export pipeline. - Required. - :type export_pipeline_create_parameters: - ~container_registry_management_client.models.ExportPipeline - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns ExportPipeline - :rtype: - ~azure.core.polling.LROPoller[~container_registry_management_client.models.ExportPipeline] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - registry_name: str, - export_pipeline_name: str, - export_pipeline_create_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ExportPipeline]: - """Creates an export pipeline for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param export_pipeline_name: The name of the export pipeline. Required. - :type export_pipeline_name: str - :param export_pipeline_create_parameters: The parameters for creating an export pipeline. - Required. - :type export_pipeline_create_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns ExportPipeline - :rtype: - ~azure.core.polling.LROPoller[~container_registry_management_client.models.ExportPipeline] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, - resource_group_name: str, - registry_name: str, - export_pipeline_name: str, - export_pipeline_create_parameters: Union[_models.ExportPipeline, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.ExportPipeline]: - """Creates an export pipeline for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param export_pipeline_name: The name of the export pipeline. Required. - :type export_pipeline_name: str - :param export_pipeline_create_parameters: The parameters for creating an export pipeline. Is - either a ExportPipeline type or a IO[bytes] type. Required. - :type export_pipeline_create_parameters: - ~container_registry_management_client.models.ExportPipeline or IO[bytes] - :return: An instance of LROPoller that returns ExportPipeline - :rtype: - ~azure.core.polling.LROPoller[~container_registry_management_client.models.ExportPipeline] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ExportPipeline] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - export_pipeline_name=export_pipeline_name, - export_pipeline_create_parameters=export_pipeline_create_parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ExportPipeline", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, - LROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.ExportPipeline].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ExportPipeline]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, registry_name: str, export_pipeline_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_export_pipelines_delete_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - export_pipeline_name=export_pipeline_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, resource_group_name: str, registry_name: str, export_pipeline_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes an export pipeline from a container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param export_pipeline_name: The name of the export pipeline. Required. - :type export_pipeline_name: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - export_pipeline_name=export_pipeline_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, LROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - -class ImportPipelinesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~container_registry_management_client.ContainerRegistryManagementClient`'s - :attr:`import_pipelines` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerRegistryManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> ItemPaged["_models.ImportPipeline"]: - """Lists all import pipelines for the specified container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :return: An iterator like instance of ImportPipeline - :rtype: - ~azure.core.paging.ItemPaged[~container_registry_management_client.models.ImportPipeline] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models._models.ImportPipelineListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_import_pipelines_list_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize( - _models._models.ImportPipelineListResult, pipeline_response # pylint: disable=protected-access - ) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, resource_group_name: str, registry_name: str, import_pipeline_name: str, **kwargs: Any - ) -> _models.ImportPipeline: - """Gets the properties of the import pipeline. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param import_pipeline_name: The name of the import pipeline. Required. - :type import_pipeline_name: str - :return: ImportPipeline - :rtype: ~container_registry_management_client.models.ImportPipeline - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.ImportPipeline] = kwargs.pop("cls", None) - - _request = build_import_pipelines_get_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - import_pipeline_name=import_pipeline_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize("ImportPipeline", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_initial( - self, - resource_group_name: str, - registry_name: str, - import_pipeline_name: str, - import_pipeline_create_parameters: Union[_models.ImportPipeline, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(import_pipeline_create_parameters, (IOBase, bytes)): - _content = import_pipeline_create_parameters - else: - _json = self._serialize.body(import_pipeline_create_parameters, "ImportPipeline") - - _request = build_import_pipelines_create_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - import_pipeline_name=import_pipeline_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - registry_name: str, - import_pipeline_name: str, - import_pipeline_create_parameters: _models.ImportPipeline, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ImportPipeline]: - """Creates an import pipeline for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param import_pipeline_name: The name of the import pipeline. Required. - :type import_pipeline_name: str - :param import_pipeline_create_parameters: The parameters for creating an import pipeline. - Required. - :type import_pipeline_create_parameters: - ~container_registry_management_client.models.ImportPipeline - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns ImportPipeline - :rtype: - ~azure.core.polling.LROPoller[~container_registry_management_client.models.ImportPipeline] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - registry_name: str, - import_pipeline_name: str, - import_pipeline_create_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ImportPipeline]: - """Creates an import pipeline for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param import_pipeline_name: The name of the import pipeline. Required. - :type import_pipeline_name: str - :param import_pipeline_create_parameters: The parameters for creating an import pipeline. - Required. - :type import_pipeline_create_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns ImportPipeline - :rtype: - ~azure.core.polling.LROPoller[~container_registry_management_client.models.ImportPipeline] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, - resource_group_name: str, - registry_name: str, - import_pipeline_name: str, - import_pipeline_create_parameters: Union[_models.ImportPipeline, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.ImportPipeline]: - """Creates an import pipeline for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param import_pipeline_name: The name of the import pipeline. Required. - :type import_pipeline_name: str - :param import_pipeline_create_parameters: The parameters for creating an import pipeline. Is - either a ImportPipeline type or a IO[bytes] type. Required. - :type import_pipeline_create_parameters: - ~container_registry_management_client.models.ImportPipeline or IO[bytes] - :return: An instance of LROPoller that returns ImportPipeline - :rtype: - ~azure.core.polling.LROPoller[~container_registry_management_client.models.ImportPipeline] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ImportPipeline] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - import_pipeline_name=import_pipeline_name, - import_pipeline_create_parameters=import_pipeline_create_parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ImportPipeline", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, - LROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.ImportPipeline].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ImportPipeline]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, registry_name: str, import_pipeline_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_import_pipelines_delete_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - import_pipeline_name=import_pipeline_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, resource_group_name: str, registry_name: str, import_pipeline_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes an import pipeline from a container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param import_pipeline_name: The name of the import pipeline. Required. - :type import_pipeline_name: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - import_pipeline_name=import_pipeline_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, LROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - -class ArchivesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~container_registry_management_client.ContainerRegistryManagementClient`'s - :attr:`archives` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerRegistryManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, resource_group_name: str, registry_name: str, package_type: str, **kwargs: Any - ) -> ItemPaged["_models.Archive"]: - """Lists all archives for the specified container registry and package type. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param package_type: The package type. Required. - :type package_type: str - :return: An iterator like instance of Archive - :rtype: ~azure.core.paging.ItemPaged[~container_registry_management_client.models.Archive] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models._models.ArchiveListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_archives_list_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - package_type=package_type, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize( - _models._models.ArchiveListResult, pipeline_response # pylint: disable=protected-access - ) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, resource_group_name: str, registry_name: str, package_type: str, archive_name: str, **kwargs: Any - ) -> _models.Archive: - """Gets the properties of the archive. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param package_type: The package type. Required. - :type package_type: str - :param archive_name: The name of the archive resource. Required. - :type archive_name: str - :return: Archive - :rtype: ~container_registry_management_client.models.Archive - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.Archive] = kwargs.pop("cls", None) - - _request = build_archives_get_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - package_type=package_type, - archive_name=archive_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize("Archive", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_initial( - self, - resource_group_name: str, - registry_name: str, - package_type: str, - archive_name: str, - archive_create_parameters: Union[_models.Archive, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(archive_create_parameters, (IOBase, bytes)): - _content = archive_create_parameters - else: - _json = self._serialize.body(archive_create_parameters, "Archive") - - _request = build_archives_create_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - package_type=package_type, - archive_name=archive_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - registry_name: str, - package_type: str, - archive_name: str, - archive_create_parameters: _models.Archive, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Archive]: - """Creates a archive for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param package_type: The package type. Required. - :type package_type: str - :param archive_name: The name of the archive resource. Required. - :type archive_name: str - :param archive_create_parameters: The parameters for creating a archive. Required. - :type archive_create_parameters: ~container_registry_management_client.models.Archive - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns Archive - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Archive] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - registry_name: str, - package_type: str, - archive_name: str, - archive_create_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Archive]: - """Creates a archive for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param package_type: The package type. Required. - :type package_type: str - :param archive_name: The name of the archive resource. Required. - :type archive_name: str - :param archive_create_parameters: The parameters for creating a archive. Required. - :type archive_create_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns Archive - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Archive] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, - resource_group_name: str, - registry_name: str, - package_type: str, - archive_name: str, - archive_create_parameters: Union[_models.Archive, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.Archive]: - """Creates a archive for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param package_type: The package type. Required. - :type package_type: str - :param archive_name: The name of the archive resource. Required. - :type archive_name: str - :param archive_create_parameters: The parameters for creating a archive. Is either a Archive - type or a IO[bytes] type. Required. - :type archive_create_parameters: ~container_registry_management_client.models.Archive or - IO[bytes] - :return: An instance of LROPoller that returns Archive - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Archive] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Archive] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - package_type=package_type, - archive_name=archive_name, - archive_create_parameters=archive_create_parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Archive", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, - LROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.Archive].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.Archive]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @overload - def update( - self, - resource_group_name: str, - registry_name: str, - package_type: str, - archive_name: str, - archive_update_parameters: _models.ArchiveUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.Archive: - """Updates a archive for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param package_type: The package type. Required. - :type package_type: str - :param archive_name: The name of the archive resource. Required. - :type archive_name: str - :param archive_update_parameters: The parameters for updating a archive. Required. - :type archive_update_parameters: - ~container_registry_management_client.models.ArchiveUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: Archive - :rtype: ~container_registry_management_client.models.Archive - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - registry_name: str, - package_type: str, - archive_name: str, - archive_update_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.Archive: - """Updates a archive for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param package_type: The package type. Required. - :type package_type: str - :param archive_name: The name of the archive resource. Required. - :type archive_name: str - :param archive_update_parameters: The parameters for updating a archive. Required. - :type archive_update_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: Archive - :rtype: ~container_registry_management_client.models.Archive - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update( - self, - resource_group_name: str, - registry_name: str, - package_type: str, - archive_name: str, - archive_update_parameters: Union[_models.ArchiveUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> _models.Archive: - """Updates a archive for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param package_type: The package type. Required. - :type package_type: str - :param archive_name: The name of the archive resource. Required. - :type archive_name: str - :param archive_update_parameters: The parameters for updating a archive. Is either a - ArchiveUpdateParameters type or a IO[bytes] type. Required. - :type archive_update_parameters: - ~container_registry_management_client.models.ArchiveUpdateParameters or IO[bytes] - :return: Archive - :rtype: ~container_registry_management_client.models.Archive - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Archive] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(archive_update_parameters, (IOBase, bytes)): - _content = archive_update_parameters - else: - _json = self._serialize.body(archive_update_parameters, "ArchiveUpdateParameters") - - _request = build_archives_update_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - package_type=package_type, - archive_name=archive_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize("Archive", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _delete_initial( - self, resource_group_name: str, registry_name: str, package_type: str, archive_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_archives_delete_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - package_type=package_type, - archive_name=archive_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, resource_group_name: str, registry_name: str, package_type: str, archive_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes a archive from a container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param package_type: The package type. Required. - :type package_type: str - :param archive_name: The name of the archive resource. Required. - :type archive_name: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - package_type=package_type, - archive_name=archive_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, LROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - -class ArchiveVersionsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~container_registry_management_client.ContainerRegistryManagementClient`'s - :attr:`archive_versions` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerRegistryManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, resource_group_name: str, registry_name: str, package_type: str, archive_name: str, **kwargs: Any - ) -> ItemPaged["_models.ArchiveVersion"]: - """Lists all archive versions for the specified container registry, repository type and archive - name. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param package_type: The package type. Required. - :type package_type: str - :param archive_name: The name of the archive resource. Required. - :type archive_name: str - :return: An iterator like instance of ArchiveVersion - :rtype: - ~azure.core.paging.ItemPaged[~container_registry_management_client.models.ArchiveVersion] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models._models.ArchiveVersionListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_archive_versions_list_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - package_type=package_type, - archive_name=archive_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize( - _models._models.ArchiveVersionListResult, pipeline_response # pylint: disable=protected-access - ) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, - resource_group_name: str, - registry_name: str, - package_type: str, - archive_name: str, - archive_version_name: str, - **kwargs: Any - ) -> _models.ArchiveVersion: - """Gets the properties of the archive version. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param package_type: The package type. Required. - :type package_type: str - :param archive_name: The name of the archive resource. Required. - :type archive_name: str - :param archive_version_name: The name of the archive version resource. Required. - :type archive_version_name: str - :return: ArchiveVersion - :rtype: ~container_registry_management_client.models.ArchiveVersion - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.ArchiveVersion] = kwargs.pop("cls", None) - - _request = build_archive_versions_get_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - package_type=package_type, - archive_name=archive_name, - archive_version_name=archive_version_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize("ArchiveVersion", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_initial( - self, - resource_group_name: str, - registry_name: str, - package_type: str, - archive_name: str, - archive_version_name: str, - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_archive_versions_create_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - package_type=package_type, - archive_name=archive_name, - archive_version_name=archive_version_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_create( - self, - resource_group_name: str, - registry_name: str, - package_type: str, - archive_name: str, - archive_version_name: str, - **kwargs: Any - ) -> LROPoller[_models.ArchiveVersion]: - """Creates a archive version for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param package_type: The package type. Required. - :type package_type: str - :param archive_name: The name of the archive resource. Required. - :type archive_name: str - :param archive_version_name: The name of the archive version resource. Required. - :type archive_version_name: str - :return: An instance of LROPoller that returns ArchiveVersion - :rtype: - ~azure.core.polling.LROPoller[~container_registry_management_client.models.ArchiveVersion] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.ArchiveVersion] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - package_type=package_type, - archive_name=archive_name, - archive_version_name=archive_version_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ArchiveVersion", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, - LROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.ArchiveVersion].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ArchiveVersion]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, - resource_group_name: str, - registry_name: str, - package_type: str, - archive_name: str, - archive_version_name: str, - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_archive_versions_delete_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - package_type=package_type, - archive_name=archive_name, - archive_version_name=archive_version_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, - resource_group_name: str, - registry_name: str, - package_type: str, - archive_name: str, - archive_version_name: str, - **kwargs: Any - ) -> LROPoller[None]: - """Deletes a archive version from a container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param package_type: The package type. Required. - :type package_type: str - :param archive_name: The name of the archive resource. Required. - :type archive_name: str - :param archive_version_name: The name of the archive version resource. Required. - :type archive_version_name: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - package_type=package_type, - archive_name=archive_name, - archive_version_name=archive_version_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, LROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - -class PipelineRunsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~container_registry_management_client.ContainerRegistryManagementClient`'s - :attr:`pipeline_runs` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerRegistryManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> ItemPaged["_models.PipelineRun"]: - """Lists all the pipeline runs for the specified container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :return: An iterator like instance of PipelineRun - :rtype: ~azure.core.paging.ItemPaged[~container_registry_management_client.models.PipelineRun] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models._models.PipelineRunListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_pipeline_runs_list_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize( - _models._models.PipelineRunListResult, pipeline_response # pylint: disable=protected-access - ) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, resource_group_name: str, registry_name: str, pipeline_run_name: str, **kwargs: Any - ) -> _models.PipelineRun: - """Gets the detailed information for a given pipeline run. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param pipeline_run_name: The name of the pipeline run. Required. - :type pipeline_run_name: str - :return: PipelineRun - :rtype: ~container_registry_management_client.models.PipelineRun - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.PipelineRun] = kwargs.pop("cls", None) - - _request = build_pipeline_runs_get_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - pipeline_run_name=pipeline_run_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize("PipelineRun", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_initial( - self, - resource_group_name: str, - registry_name: str, - pipeline_run_name: str, - pipeline_run_create_parameters: Union[_models.PipelineRun, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(pipeline_run_create_parameters, (IOBase, bytes)): - _content = pipeline_run_create_parameters - else: - _json = self._serialize.body(pipeline_run_create_parameters, "PipelineRun") - - _request = build_pipeline_runs_create_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - pipeline_run_name=pipeline_run_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - registry_name: str, - pipeline_run_name: str, - pipeline_run_create_parameters: _models.PipelineRun, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.PipelineRun]: - """Creates a pipeline run for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param pipeline_run_name: The name of the pipeline run. Required. - :type pipeline_run_name: str - :param pipeline_run_create_parameters: The parameters for creating a pipeline run. Required. - :type pipeline_run_create_parameters: ~container_registry_management_client.models.PipelineRun - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns PipelineRun - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.PipelineRun] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - registry_name: str, - pipeline_run_name: str, - pipeline_run_create_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.PipelineRun]: - """Creates a pipeline run for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param pipeline_run_name: The name of the pipeline run. Required. - :type pipeline_run_name: str - :param pipeline_run_create_parameters: The parameters for creating a pipeline run. Required. - :type pipeline_run_create_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns PipelineRun - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.PipelineRun] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, - resource_group_name: str, - registry_name: str, - pipeline_run_name: str, - pipeline_run_create_parameters: Union[_models.PipelineRun, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.PipelineRun]: - """Creates a pipeline run for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param pipeline_run_name: The name of the pipeline run. Required. - :type pipeline_run_name: str - :param pipeline_run_create_parameters: The parameters for creating a pipeline run. Is either a - PipelineRun type or a IO[bytes] type. Required. - :type pipeline_run_create_parameters: ~container_registry_management_client.models.PipelineRun - or IO[bytes] - :return: An instance of LROPoller that returns PipelineRun - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.PipelineRun] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PipelineRun] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - pipeline_run_name=pipeline_run_name, - pipeline_run_create_parameters=pipeline_run_create_parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("PipelineRun", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, - LROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.PipelineRun].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.PipelineRun]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, registry_name: str, pipeline_run_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_pipeline_runs_delete_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - pipeline_run_name=pipeline_run_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, resource_group_name: str, registry_name: str, pipeline_run_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes a pipeline run from a container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param pipeline_run_name: The name of the pipeline run. Required. - :type pipeline_run_name: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - pipeline_run_name=pipeline_run_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, LROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - -class PrivateEndpointConnectionsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~container_registry_management_client.ContainerRegistryManagementClient`'s - :attr:`private_endpoint_connections` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerRegistryManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, resource_group_name: str, registry_name: str, **kwargs: Any - ) -> ItemPaged["_models.PrivateEndpointConnection"]: - """List all private endpoint connections in a container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :return: An iterator like instance of PrivateEndpointConnection - :rtype: - ~azure.core.paging.ItemPaged[~container_registry_management_client.models.PrivateEndpointConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models._models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_private_endpoint_connections_list_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize( - _models._models.PrivateEndpointConnectionListResult, # pylint: disable=protected-access - pipeline_response, - ) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, resource_group_name: str, registry_name: str, private_endpoint_connection_name: str, **kwargs: Any - ) -> _models.PrivateEndpointConnection: - """Get the specified private endpoint connection associated with the container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :return: PrivateEndpointConnection - :rtype: ~container_registry_management_client.models.PrivateEndpointConnection - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) - - _request = build_private_endpoint_connections_get_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - private_endpoint_connection_name=private_endpoint_connection_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( - self, - resource_group_name: str, - registry_name: str, - private_endpoint_connection_name: str, - private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(private_endpoint_connection, (IOBase, bytes)): - _content = private_endpoint_connection - else: - _json = self._serialize.body(private_endpoint_connection, "PrivateEndpointConnection") - - _request = build_private_endpoint_connections_create_or_update_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - private_endpoint_connection_name=private_endpoint_connection_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - registry_name: str, - private_endpoint_connection_name: str, - private_endpoint_connection: _models.PrivateEndpointConnection, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.PrivateEndpointConnection]: - """Update the state of specified private endpoint connection associated with the container - registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :param private_endpoint_connection: The parameters for creating a private endpoint connection. - Required. - :type private_endpoint_connection: - ~container_registry_management_client.models.PrivateEndpointConnection - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns PrivateEndpointConnection - :rtype: - ~azure.core.polling.LROPoller[~container_registry_management_client.models.PrivateEndpointConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - registry_name: str, - private_endpoint_connection_name: str, - private_endpoint_connection: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.PrivateEndpointConnection]: - """Update the state of specified private endpoint connection associated with the container - registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :param private_endpoint_connection: The parameters for creating a private endpoint connection. - Required. - :type private_endpoint_connection: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns PrivateEndpointConnection - :rtype: - ~azure.core.polling.LROPoller[~container_registry_management_client.models.PrivateEndpointConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, - resource_group_name: str, - registry_name: str, - private_endpoint_connection_name: str, - private_endpoint_connection: Union[_models.PrivateEndpointConnection, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.PrivateEndpointConnection]: - """Update the state of specified private endpoint connection associated with the container - registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :param private_endpoint_connection: The parameters for creating a private endpoint connection. - Is either a PrivateEndpointConnection type or a IO[bytes] type. Required. - :type private_endpoint_connection: - ~container_registry_management_client.models.PrivateEndpointConnection or IO[bytes] - :return: An instance of LROPoller that returns PrivateEndpointConnection - :rtype: - ~azure.core.polling.LROPoller[~container_registry_management_client.models.PrivateEndpointConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - private_endpoint_connection_name=private_endpoint_connection_name, - private_endpoint_connection=private_endpoint_connection, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, - LROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.PrivateEndpointConnection].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.PrivateEndpointConnection]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, registry_name: str, private_endpoint_connection_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_private_endpoint_connections_delete_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - private_endpoint_connection_name=private_endpoint_connection_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, resource_group_name: str, registry_name: str, private_endpoint_connection_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes the specified private endpoint connection associated with the container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - private_endpoint_connection_name=private_endpoint_connection_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, LROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - -class ReplicationsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~container_registry_management_client.ContainerRegistryManagementClient`'s - :attr:`replications` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerRegistryManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> ItemPaged["_models.Replication"]: - """Lists all the replications for the specified container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :return: An iterator like instance of Replication - :rtype: ~azure.core.paging.ItemPaged[~container_registry_management_client.models.Replication] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models._models.ReplicationListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_replications_list_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize( - _models._models.ReplicationListResult, pipeline_response # pylint: disable=protected-access - ) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, resource_group_name: str, registry_name: str, replication_name: str, **kwargs: Any - ) -> _models.Replication: - """Gets the properties of the specified replication. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param replication_name: The name of the replication. Required. - :type replication_name: str - :return: Replication - :rtype: ~container_registry_management_client.models.Replication - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.Replication] = kwargs.pop("cls", None) - - _request = build_replications_get_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - replication_name=replication_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize("Replication", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_initial( - self, - resource_group_name: str, - registry_name: str, - replication_name: str, - replication: Union[_models.Replication, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(replication, (IOBase, bytes)): - _content = replication - else: - _json = self._serialize.body(replication, "Replication") - - _request = build_replications_create_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - replication_name=replication_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - registry_name: str, - replication_name: str, - replication: _models.Replication, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Replication]: - """Creates a replication for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param replication_name: The name of the replication. Required. - :type replication_name: str - :param replication: The parameters for creating a replication. Required. - :type replication: ~container_registry_management_client.models.Replication - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns Replication - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Replication] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - registry_name: str, - replication_name: str, - replication: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Replication]: - """Creates a replication for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param replication_name: The name of the replication. Required. - :type replication_name: str - :param replication: The parameters for creating a replication. Required. - :type replication: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns Replication - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Replication] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, - resource_group_name: str, - registry_name: str, - replication_name: str, - replication: Union[_models.Replication, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.Replication]: - """Creates a replication for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param replication_name: The name of the replication. Required. - :type replication_name: str - :param replication: The parameters for creating a replication. Is either a Replication type or - a IO[bytes] type. Required. - :type replication: ~container_registry_management_client.models.Replication or IO[bytes] - :return: An instance of LROPoller that returns Replication - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Replication] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Replication] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - replication_name=replication_name, - replication=replication, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Replication", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, - LROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.Replication].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.Replication]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _update_initial( - self, - resource_group_name: str, - registry_name: str, - replication_name: str, - replication_update_parameters: Union[_models.ReplicationUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(replication_update_parameters, (IOBase, bytes)): - _content = replication_update_parameters - else: - _json = self._serialize.body(replication_update_parameters, "ReplicationUpdateParameters") - - _request = build_replications_update_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - replication_name=replication_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - registry_name: str, - replication_name: str, - replication_update_parameters: _models.ReplicationUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Replication]: - """Updates a replication for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param replication_name: The name of the replication. Required. - :type replication_name: str - :param replication_update_parameters: The parameters for updating a replication. Required. - :type replication_update_parameters: - ~container_registry_management_client.models.ReplicationUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns Replication - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Replication] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - registry_name: str, - replication_name: str, - replication_update_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Replication]: - """Updates a replication for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param replication_name: The name of the replication. Required. - :type replication_name: str - :param replication_update_parameters: The parameters for updating a replication. Required. - :type replication_update_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns Replication - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Replication] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - registry_name: str, - replication_name: str, - replication_update_parameters: Union[_models.ReplicationUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.Replication]: - """Updates a replication for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param replication_name: The name of the replication. Required. - :type replication_name: str - :param replication_update_parameters: The parameters for updating a replication. Is either a - ReplicationUpdateParameters type or a IO[bytes] type. Required. - :type replication_update_parameters: - ~container_registry_management_client.models.ReplicationUpdateParameters or IO[bytes] - :return: An instance of LROPoller that returns Replication - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Replication] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Replication] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - replication_name=replication_name, - replication_update_parameters=replication_update_parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Replication", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, - LROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.Replication].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.Replication]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, registry_name: str, replication_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_replications_delete_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - replication_name=replication_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, resource_group_name: str, registry_name: str, replication_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes a replication from a container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param replication_name: The name of the replication. Required. - :type replication_name: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - replication_name=replication_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, LROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - -class ScopeMapsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~container_registry_management_client.ContainerRegistryManagementClient`'s - :attr:`scope_maps` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerRegistryManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> ItemPaged["_models.ScopeMap"]: - """Lists all the scope maps for the specified container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :return: An iterator like instance of ScopeMap - :rtype: ~azure.core.paging.ItemPaged[~container_registry_management_client.models.ScopeMap] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models._models.ScopeMapListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_scope_maps_list_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize( - _models._models.ScopeMapListResult, pipeline_response # pylint: disable=protected-access - ) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get(self, resource_group_name: str, registry_name: str, scope_map_name: str, **kwargs: Any) -> _models.ScopeMap: - """Gets the properties of the specified scope map. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param scope_map_name: The name of the scope map. Required. - :type scope_map_name: str - :return: ScopeMap - :rtype: ~container_registry_management_client.models.ScopeMap - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.ScopeMap] = kwargs.pop("cls", None) - - _request = build_scope_maps_get_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - scope_map_name=scope_map_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize("ScopeMap", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_initial( - self, - resource_group_name: str, - registry_name: str, - scope_map_name: str, - scope_map_create_parameters: Union[_models.ScopeMap, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(scope_map_create_parameters, (IOBase, bytes)): - _content = scope_map_create_parameters - else: - _json = self._serialize.body(scope_map_create_parameters, "ScopeMap") - - _request = build_scope_maps_create_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - scope_map_name=scope_map_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - registry_name: str, - scope_map_name: str, - scope_map_create_parameters: _models.ScopeMap, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ScopeMap]: - """Creates a scope map for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param scope_map_name: The name of the scope map. Required. - :type scope_map_name: str - :param scope_map_create_parameters: The parameters for creating a scope map. Required. - :type scope_map_create_parameters: ~container_registry_management_client.models.ScopeMap - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns ScopeMap - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.ScopeMap] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - registry_name: str, - scope_map_name: str, - scope_map_create_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ScopeMap]: - """Creates a scope map for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param scope_map_name: The name of the scope map. Required. - :type scope_map_name: str - :param scope_map_create_parameters: The parameters for creating a scope map. Required. - :type scope_map_create_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns ScopeMap - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.ScopeMap] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, - resource_group_name: str, - registry_name: str, - scope_map_name: str, - scope_map_create_parameters: Union[_models.ScopeMap, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.ScopeMap]: - """Creates a scope map for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param scope_map_name: The name of the scope map. Required. - :type scope_map_name: str - :param scope_map_create_parameters: The parameters for creating a scope map. Is either a - ScopeMap type or a IO[bytes] type. Required. - :type scope_map_create_parameters: ~container_registry_management_client.models.ScopeMap or - IO[bytes] - :return: An instance of LROPoller that returns ScopeMap - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.ScopeMap] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ScopeMap] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - scope_map_name=scope_map_name, - scope_map_create_parameters=scope_map_create_parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ScopeMap", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, - LROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.ScopeMap].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ScopeMap]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _update_initial( - self, - resource_group_name: str, - registry_name: str, - scope_map_name: str, - scope_map_update_parameters: Union[_models.ScopeMapUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(scope_map_update_parameters, (IOBase, bytes)): - _content = scope_map_update_parameters - else: - _json = self._serialize.body(scope_map_update_parameters, "ScopeMapUpdateParameters") - - _request = build_scope_maps_update_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - scope_map_name=scope_map_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - registry_name: str, - scope_map_name: str, - scope_map_update_parameters: _models.ScopeMapUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ScopeMap]: - """Updates a scope map with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param scope_map_name: The name of the scope map. Required. - :type scope_map_name: str - :param scope_map_update_parameters: The parameters for updating a scope map. Required. - :type scope_map_update_parameters: - ~container_registry_management_client.models.ScopeMapUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns ScopeMap - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.ScopeMap] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - registry_name: str, - scope_map_name: str, - scope_map_update_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ScopeMap]: - """Updates a scope map with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param scope_map_name: The name of the scope map. Required. - :type scope_map_name: str - :param scope_map_update_parameters: The parameters for updating a scope map. Required. - :type scope_map_update_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns ScopeMap - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.ScopeMap] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - registry_name: str, - scope_map_name: str, - scope_map_update_parameters: Union[_models.ScopeMapUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.ScopeMap]: - """Updates a scope map with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param scope_map_name: The name of the scope map. Required. - :type scope_map_name: str - :param scope_map_update_parameters: The parameters for updating a scope map. Is either a - ScopeMapUpdateParameters type or a IO[bytes] type. Required. - :type scope_map_update_parameters: - ~container_registry_management_client.models.ScopeMapUpdateParameters or IO[bytes] - :return: An instance of LROPoller that returns ScopeMap - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.ScopeMap] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ScopeMap] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - scope_map_name=scope_map_name, - scope_map_update_parameters=scope_map_update_parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ScopeMap", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, - LROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.ScopeMap].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ScopeMap]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, registry_name: str, scope_map_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_scope_maps_delete_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - scope_map_name=scope_map_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, resource_group_name: str, registry_name: str, scope_map_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes a scope map from a container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param scope_map_name: The name of the scope map. Required. - :type scope_map_name: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - scope_map_name=scope_map_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, LROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - -class TokensOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~container_registry_management_client.ContainerRegistryManagementClient`'s - :attr:`tokens` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerRegistryManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> ItemPaged["_models.Token"]: - """Lists all the tokens for the specified container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :return: An iterator like instance of Token - :rtype: ~azure.core.paging.ItemPaged[~container_registry_management_client.models.Token] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models._models.TokenListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_tokens_list_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize( - _models._models.TokenListResult, pipeline_response # pylint: disable=protected-access - ) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get(self, resource_group_name: str, registry_name: str, token_name: str, **kwargs: Any) -> _models.Token: - """Gets the properties of the specified token. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param token_name: The name of the token. Required. - :type token_name: str - :return: Token - :rtype: ~container_registry_management_client.models.Token - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.Token] = kwargs.pop("cls", None) - - _request = build_tokens_get_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - token_name=token_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize("Token", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_initial( - self, - resource_group_name: str, - registry_name: str, - token_name: str, - token_create_parameters: Union[_models.Token, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(token_create_parameters, (IOBase, bytes)): - _content = token_create_parameters - else: - _json = self._serialize.body(token_create_parameters, "Token") - - _request = build_tokens_create_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - token_name=token_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - registry_name: str, - token_name: str, - token_create_parameters: _models.Token, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Token]: - """Creates a token for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param token_name: The name of the token. Required. - :type token_name: str - :param token_create_parameters: The parameters for creating a token. Required. - :type token_create_parameters: ~container_registry_management_client.models.Token - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns Token - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Token] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - registry_name: str, - token_name: str, - token_create_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Token]: - """Creates a token for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param token_name: The name of the token. Required. - :type token_name: str - :param token_create_parameters: The parameters for creating a token. Required. - :type token_create_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns Token - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Token] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, - resource_group_name: str, - registry_name: str, - token_name: str, - token_create_parameters: Union[_models.Token, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.Token]: - """Creates a token for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param token_name: The name of the token. Required. - :type token_name: str - :param token_create_parameters: The parameters for creating a token. Is either a Token type or - a IO[bytes] type. Required. - :type token_create_parameters: ~container_registry_management_client.models.Token or IO[bytes] - :return: An instance of LROPoller that returns Token - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Token] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Token] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - token_name=token_name, - token_create_parameters=token_create_parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Token", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, - LROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.Token].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.Token]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _update_initial( - self, - resource_group_name: str, - registry_name: str, - token_name: str, - token_update_parameters: Union[_models.TokenUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(token_update_parameters, (IOBase, bytes)): - _content = token_update_parameters - else: - _json = self._serialize.body(token_update_parameters, "TokenUpdateParameters") - - _request = build_tokens_update_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - token_name=token_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - registry_name: str, - token_name: str, - token_update_parameters: _models.TokenUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Token]: - """Updates a token with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param token_name: The name of the token. Required. - :type token_name: str - :param token_update_parameters: The parameters for updating a token. Required. - :type token_update_parameters: - ~container_registry_management_client.models.TokenUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns Token - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Token] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - registry_name: str, - token_name: str, - token_update_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Token]: - """Updates a token with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param token_name: The name of the token. Required. - :type token_name: str - :param token_update_parameters: The parameters for updating a token. Required. - :type token_update_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns Token - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Token] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - registry_name: str, - token_name: str, - token_update_parameters: Union[_models.TokenUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.Token]: - """Updates a token with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param token_name: The name of the token. Required. - :type token_name: str - :param token_update_parameters: The parameters for updating a token. Is either a - TokenUpdateParameters type or a IO[bytes] type. Required. - :type token_update_parameters: - ~container_registry_management_client.models.TokenUpdateParameters or IO[bytes] - :return: An instance of LROPoller that returns Token - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Token] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Token] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - token_name=token_name, - token_update_parameters=token_update_parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Token", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, - LROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.Token].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.Token]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, registry_name: str, token_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_tokens_delete_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - token_name=token_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, resource_group_name: str, registry_name: str, token_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes a token from a container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param token_name: The name of the token. Required. - :type token_name: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - token_name=token_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, LROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - -class WebhooksOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~container_registry_management_client.ContainerRegistryManagementClient`'s - :attr:`webhooks` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerRegistryManagementClientConfiguration = ( - input_args.pop(0) if input_args else kwargs.pop("config") - ) - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> ItemPaged["_models.Webhook"]: - """Lists all the webhooks for the specified container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :return: An iterator like instance of Webhook - :rtype: ~azure.core.paging.ItemPaged[~container_registry_management_client.models.Webhook] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models._models.WebhookListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_webhooks_list_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize( - _models._models.WebhookListResult, pipeline_response # pylint: disable=protected-access - ) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get(self, resource_group_name: str, registry_name: str, webhook_name: str, **kwargs: Any) -> _models.Webhook: - """Gets the properties of the specified webhook. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param webhook_name: The name of the webhook. Required. - :type webhook_name: str - :return: Webhook - :rtype: ~container_registry_management_client.models.Webhook - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.Webhook] = kwargs.pop("cls", None) - - _request = build_webhooks_get_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - webhook_name=webhook_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize("Webhook", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_initial( - self, - resource_group_name: str, - registry_name: str, - webhook_name: str, - webhook_create_parameters: Union[_models.WebhookCreateParameters, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(webhook_create_parameters, (IOBase, bytes)): - _content = webhook_create_parameters - else: - _json = self._serialize.body(webhook_create_parameters, "WebhookCreateParameters") - - _request = build_webhooks_create_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - webhook_name=webhook_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create( - self, - resource_group_name: str, - registry_name: str, - webhook_name: str, - webhook_create_parameters: _models.WebhookCreateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Webhook]: - """Creates a webhook for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param webhook_name: The name of the webhook. Required. - :type webhook_name: str - :param webhook_create_parameters: The parameters for creating a webhook. Required. - :type webhook_create_parameters: - ~container_registry_management_client.models.WebhookCreateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns Webhook - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Webhook] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create( - self, - resource_group_name: str, - registry_name: str, - webhook_name: str, - webhook_create_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Webhook]: - """Creates a webhook for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param webhook_name: The name of the webhook. Required. - :type webhook_name: str - :param webhook_create_parameters: The parameters for creating a webhook. Required. - :type webhook_create_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns Webhook - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Webhook] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create( - self, - resource_group_name: str, - registry_name: str, - webhook_name: str, - webhook_create_parameters: Union[_models.WebhookCreateParameters, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.Webhook]: - """Creates a webhook for a container registry with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param webhook_name: The name of the webhook. Required. - :type webhook_name: str - :param webhook_create_parameters: The parameters for creating a webhook. Is either a - WebhookCreateParameters type or a IO[bytes] type. Required. - :type webhook_create_parameters: - ~container_registry_management_client.models.WebhookCreateParameters or IO[bytes] - :return: An instance of LROPoller that returns Webhook - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Webhook] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Webhook] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - webhook_name=webhook_name, - webhook_create_parameters=webhook_create_parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Webhook", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, - LROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.Webhook].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.Webhook]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _update_initial( - self, - resource_group_name: str, - registry_name: str, - webhook_name: str, - webhook_update_parameters: Union[_models.WebhookUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(webhook_update_parameters, (IOBase, bytes)): - _content = webhook_update_parameters - else: - _json = self._serialize.body(webhook_update_parameters, "WebhookUpdateParameters") - - _request = build_webhooks_update_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - webhook_name=webhook_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - registry_name: str, - webhook_name: str, - webhook_update_parameters: _models.WebhookUpdateParameters, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Webhook]: - """Updates a webhook with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param webhook_name: The name of the webhook. Required. - :type webhook_name: str - :param webhook_update_parameters: The parameters for updating a webhook. Required. - :type webhook_update_parameters: - ~container_registry_management_client.models.WebhookUpdateParameters - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns Webhook - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Webhook] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - registry_name: str, - webhook_name: str, - webhook_update_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Webhook]: - """Updates a webhook with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param webhook_name: The name of the webhook. Required. - :type webhook_name: str - :param webhook_update_parameters: The parameters for updating a webhook. Required. - :type webhook_update_parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns Webhook - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Webhook] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - registry_name: str, - webhook_name: str, - webhook_update_parameters: Union[_models.WebhookUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.Webhook]: - """Updates a webhook with the specified parameters. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param webhook_name: The name of the webhook. Required. - :type webhook_name: str - :param webhook_update_parameters: The parameters for updating a webhook. Is either a - WebhookUpdateParameters type or a IO[bytes] type. Required. - :type webhook_update_parameters: - ~container_registry_management_client.models.WebhookUpdateParameters or IO[bytes] - :return: An instance of LROPoller that returns Webhook - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Webhook] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Webhook] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - webhook_name=webhook_name, - webhook_update_parameters=webhook_update_parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Webhook", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, - LROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.Webhook].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.Webhook]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, registry_name: str, webhook_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_webhooks_delete_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - webhook_name=webhook_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, resource_group_name: str, registry_name: str, webhook_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes a webhook from a container registry. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param webhook_name: The name of the webhook. Required. - :type webhook_name: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - registry_name=registry_name, - webhook_name=webhook_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, LROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def get_callback_config( - self, resource_group_name: str, registry_name: str, webhook_name: str, **kwargs: Any - ) -> _models.CallbackConfig: - """Gets the configuration of service URI and custom headers for the webhook. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param webhook_name: The name of the webhook. Required. - :type webhook_name: str - :return: CallbackConfig - :rtype: ~container_registry_management_client.models.CallbackConfig - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.CallbackConfig] = kwargs.pop("cls", None) - - _request = build_webhooks_get_callback_config_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - webhook_name=webhook_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize("CallbackConfig", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def list_events( - self, resource_group_name: str, registry_name: str, webhook_name: str, **kwargs: Any - ) -> ItemPaged["_models.Event"]: - """Lists recent events for the specified webhook. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param webhook_name: The name of the webhook. Required. - :type webhook_name: str - :return: An iterator like instance of Event - :rtype: ~azure.core.paging.ItemPaged[~container_registry_management_client.models.Event] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models._models.EventListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_webhooks_list_events_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - webhook_name=webhook_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize( - _models._models.EventListResult, pipeline_response # pylint: disable=protected-access - ) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def ping(self, resource_group_name: str, registry_name: str, webhook_name: str, **kwargs: Any) -> _models.EventInfo: - """Triggers a ping event to be sent to the webhook. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param registry_name: The name of the container registry. Required. - :type registry_name: str - :param webhook_name: The name of the webhook. Required. - :type webhook_name: str - :return: EventInfo - :rtype: ~container_registry_management_client.models.EventInfo - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.EventInfo] = kwargs.pop("cls", None) - - _request = build_webhooks_ping_request( - resource_group_name=resource_group_name, - registry_name=registry_name, - webhook_name=webhook_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize("EventInfo", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/operations/_patch.py b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/operations/_patch.py deleted file mode 100644 index 87676c65a8f..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/operations/_patch.py +++ /dev/null @@ -1,21 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------- -"""Customize generated code here. - -Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize -""" - - -__all__: list[str] = [] # Add all objects you want publicly available to users at this package level - - -def patch_sdk(): - """Do not remove from this file. - - `patch_sdk` is a last resort escape hatch that allows you to do customizations - you can't accomplish using the techniques described in - https://aka.ms/azsdk/python/dpcodegen/python/customize - """ diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/py.typed b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/py.typed deleted file mode 100644 index e5aff4f83af..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/generated/container_registry_management_client/py.typed +++ /dev/null @@ -1 +0,0 @@ -# Marker file for PEP 561. \ No newline at end of file diff --git a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/readme.md b/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/readme.md deleted file mode 100644 index 537cddb5a31..00000000000 --- a/src/azure-cli/azure/cli/vendored_sdks/containerregistry/v2026_01_01_preview/readme.md +++ /dev/null @@ -1,9 +0,0 @@ -```yaml -openapi-type: arm -tag: package-2026-01-preview - -# Tag: package-2026-01-preview - -input-file: - - ./containerregistry.json -``` \ No newline at end of file diff --git a/src/azure-cli/setup.py b/src/azure-cli/setup.py index 48a3960e46e..fd6cc110d1b 100644 --- a/src/azure-cli/setup.py +++ b/src/azure-cli/setup.py @@ -77,7 +77,7 @@ 'azure-mgmt-cognitiveservices~=14.1.0', 'azure-mgmt-compute~=34.1.0', 'azure-mgmt-containerinstance==10.2.0b1', - 'azure-mgmt-containerregistry==14.1.0b1', + 'azure-mgmt-containerregistry==15.1.0b1', 'azure-mgmt-containerservice~=40.2.0', 'azure-mgmt-cosmosdb==9.9.0', 'azure-mgmt-datalake-store~=1.1.0b1', From 74c0afe9caf41207e0326433a1cb039e6ef4afe0 Mon Sep 17 00:00:00 2001 From: Tony Vargas Date: Mon, 23 Mar 2026 16:35:50 -0700 Subject: [PATCH 7/7] Update test recordings for acr cache commands Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../latest/recordings/test_acr_cache.yaml | 783 ++++++------ .../test_acr_cache_managed_identity.yaml | 1126 +++++++++++++++++ .../acr/tests/latest/test_acr_commands.py | 8 +- 3 files changed, 1511 insertions(+), 406 deletions(-) create mode 100644 src/azure-cli/azure/cli/command_modules/acr/tests/latest/recordings/test_acr_cache_managed_identity.yaml diff --git a/src/azure-cli/azure/cli/command_modules/acr/tests/latest/recordings/test_acr_cache.yaml b/src/azure-cli/azure/cli/command_modules/acr/tests/latest/recordings/test_acr_cache.yaml index 369a9a0ea6a..401bd16df5a 100644 --- a/src/azure-cli/azure/cli/command_modules/acr/tests/latest/recordings/test_acr_cache.yaml +++ b/src/azure-cli/azure/cli/command_modules/acr/tests/latest/recordings/test_acr_cache.yaml @@ -1,7 +1,7 @@ interactions: - request: body: '{"location": "westus", "sku": {"name": "Standard"}, "properties": {"adminUserEnabled": - false, "anonymousPullEnabled": false}}' + false}}' headers: Accept: - application/json @@ -12,31 +12,29 @@ interactions: Connection: - keep-alive Content-Length: - - '125' + - '94' Content-Type: - application/json ParameterSetName: - -n -g -l --sku User-Agent: - - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002?api-version=2025-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002?api-version=2026-01-01-preview response: body: - string: '{"sku":{"name":"Standard","tier":"Standard"},"type":"Microsoft.ContainerRegistry/registries","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002","name":"clireg000002","location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-05-16T02:42:30.4558651+00:00","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-16T02:42:30.4558651+00:00"},"properties":{"loginServer":"clireg000002.azurecr.io","creationDate":"2025-05-16T02:42:30.4558651Z","provisioningState":"Creating","adminUserEnabled":false,"policies":{"quarantinePolicy":{"status":"disabled"},"trustPolicy":{"type":"Notary","status":"disabled"},"retentionPolicy":{"days":7,"lastUpdatedTime":"2025-05-16T02:42:48.3792601+00:00","status":"disabled"},"exportPolicy":{"status":"enabled"},"azureADAuthenticationAsArmPolicy":{"status":"enabled"},"softDeletePolicy":{"retentionDays":7,"lastUpdatedTime":"2025-05-16T02:42:48.3793104+00:00","status":"disabled"}},"encryption":{"status":"disabled"},"dataEndpointEnabled":false,"dataEndpointHostNames":[],"privateEndpointConnections":[],"publicNetworkAccess":"Enabled","networkRuleBypassOptions":"AzureServices","zoneRedundancy":"Disabled","anonymousPullEnabled":false,"metadataSearch":"Disabled","roleAssignmentMode":"LegacyRegistryPermissions","autoGeneratedDomainNameLabelScope":"Unsecure"}}' + string: '{"sku":{"name":"Standard","tier":"Standard"},"type":"Microsoft.ContainerRegistry/registries","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002","name":"clireg000002","location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-23T23:12:43.689915+00:00","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-23T23:12:43.689915+00:00"},"properties":{"loginServer":"clireg000002.azurecr.io","creationDate":"2026-03-23T23:12:43.689915Z","provisioningState":"Succeeded","adminUserEnabled":false,"policies":{"quarantinePolicy":{"status":"disabled"},"trustPolicy":{"type":"Notary","status":"disabled"},"retentionPolicy":{"days":7,"lastUpdatedTime":"2026-03-23T23:12:55.2909443+00:00","status":"disabled"},"exportPolicy":{"status":"enabled"},"azureADAuthenticationAsArmPolicy":{"status":"enabled"},"softDeletePolicy":{"retentionDays":7,"lastUpdatedTime":"2026-03-23T23:12:55.2909943+00:00","status":"disabled"}},"encryption":{"status":"disabled"},"dataEndpointEnabled":false,"regionalEndpoints":"Disabled","dataEndpointHostNames":[],"regionalEndpointHostNames":[],"endpointProtocol":"IPv4","privateEndpointConnections":[],"publicNetworkAccess":"Enabled","networkRuleBypassOptions":"AzureServices","networkRuleBypassAllowedForTasks":false,"zoneRedundancy":"Disabled","anonymousPullEnabled":false,"metadataSearch":"Disabled","roleAssignmentMode":"LegacyRegistryPermissions","autoGeneratedDomainNameLabelScope":"Unsecure"}}' headers: api-supported-versions: - - 2025-03-01-preview - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/operationStatuses/registries-67bb5be2-31ff-11f0-8a73-644ed7a2823f?api-version=2025-03-01-preview&t=638829601687220585&c=MIIHpTCCBo2gAwIBAgITOgWXBJzHWActAOyA9gAEBZcEnDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjUwNDE4MDkxNjUyWhcNMjUxMDE1MDkxNjUyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALJ4tFzYjQAGXlMN4RVSj_Zp98bnnigeY99sbhZrAOQOjxR_04cAp0TrBwLXaA2b6MkNp3EWrqmwj8LAHlmiUmx_C5YeMG8WQUVkZMbfJNmAjSKJvmH2VO_H9OVOiiWemCFWlBXZMT6O1LsK-KI4EQtlTwXEv4-zXiqUQqjqHZQX6IJGxxcuw3R6KS00hFc9B4Ve9K9uvRk3OzuC_2evEuKFQfmIkhFu9gMtFnEBgp0E5Srek5Sh6WRO2V6wjcdtrFJ2dMStIbypiaJysxjNaLwTxBjKAJiyxkrxbuS0IPj2v4oOwkFSl9khCWu-ivje49N19yGiq_5BL-QYySfUPF0CAwEAAaOCBJIwggSOMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFghfmRS4WsmTQCAWQCAQcwggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBQpIRfJ6SPCR16Dy9sN1AQtQKjWNDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwIwDAYKKwYBBAGCN3sEAjAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBACBpx57mqT5wt5VuFMhMv-QcXTs5QrWkz021CcXp44eWUSJBLP35O0JDRyA13V3zowD9Dkl6HKRosiwIhfUwb1VWxMZt1K97bfrlhekU_IFyRNImksBTl4Hg5mL7M4PQvDu_hNxb1NW9JnL8B4LEl-FVcKtOFC8R2wp_2vglSGujfVsEzQMXxCECc_j-T0saauGgdaItgRGQ-1JrKdhZ1FvHWU2eeab0zXatBPn7nyaNmU7DK2icP38PQp3g8yPPlpv1joUzz1GMBJXhtHRWCv93tVfT5q9DZQ-_S2H_1Y2raeucg8kUfGEvVuQ27w1bGi2QRDLtEtuNHgzpR3RB7os&s=cCk8Gt6KvsKKV0qtFtmF0bg8cKaSeb6Uc9i6WmD12uBZurFH6PMYqfFQ1nQ5L4FVHBtN8GKNGDMrmcIYuVGdDSYaHzyQwxEv1uunjaXHQyAGnmdpEqfjKtXc3D0bbHpUpyaYWpr66eq11IFB6aqH2DocLI4YJ1lICeUrbX7Rm67wuLp8KjfE-jKJh_hEAJ85wzOkftrNv41ztZj5YIKEL397vy2O8QFIve7Zs-Sfmbzj00hyUZvZivZsZH1V1rnynQ0yRYP03gzT2S6UBIIRs1AhQoHnHA872y0ZUwMzkaW6DGB9P_ZnyQ7E4UQMQUvnsW4FoXyLYUi_PFGlWqYKhQ&h=TcPcZhTJFofb93nDrPJ14xPZbi5wi58ASrVpJjd8GQ8 + - 2026-01-01-preview cache-control: - no-cache content-length: - - '1481' + - '1608' content-type: - application/json; charset=utf-8 date: - - Fri, 16 May 2025 02:42:48 GMT + - Mon, 23 Mar 2026 23:12:55 GMT expires: - '-1' pragma: @@ -48,113 +46,13 @@ interactions: x-content-type-options: - nosniff x-ms-operation-identifier: - - tenantId=54826b22-38d6-4fb2-bad9-b7b93a3e9c5a,objectId=d44a2991-98c6-47c3-b59b-2b30d72cfcc2/japaneast/fcb83215-29fa-46c8-8c44-3f501d4999eb + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=1de06a28-1a3a-4047-8877-0fb23647661b/westus/5e601f09-2580-44a0-84bc-dcd51c0f4186 x-ms-ratelimit-remaining-subscription-global-writes: - - '2998' + - '12000' x-ms-ratelimit-remaining-subscription-writes: - - '198' + - '800' x-msedge-ref: - - 'Ref A: E7B81F1571A64FE6ACE21C63B5E81FA8 Ref B: TYO01EDGE3010 Ref C: 2025-05-16T02:42:28Z' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - acr create - Connection: - - keep-alive - ParameterSetName: - - -n -g -l --sku - User-Agent: - - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/operationStatuses/registries-67bb5be2-31ff-11f0-8a73-644ed7a2823f?api-version=2025-03-01-preview&t=638829601687220585&c=MIIHpTCCBo2gAwIBAgITOgWXBJzHWActAOyA9gAEBZcEnDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjUwNDE4MDkxNjUyWhcNMjUxMDE1MDkxNjUyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALJ4tFzYjQAGXlMN4RVSj_Zp98bnnigeY99sbhZrAOQOjxR_04cAp0TrBwLXaA2b6MkNp3EWrqmwj8LAHlmiUmx_C5YeMG8WQUVkZMbfJNmAjSKJvmH2VO_H9OVOiiWemCFWlBXZMT6O1LsK-KI4EQtlTwXEv4-zXiqUQqjqHZQX6IJGxxcuw3R6KS00hFc9B4Ve9K9uvRk3OzuC_2evEuKFQfmIkhFu9gMtFnEBgp0E5Srek5Sh6WRO2V6wjcdtrFJ2dMStIbypiaJysxjNaLwTxBjKAJiyxkrxbuS0IPj2v4oOwkFSl9khCWu-ivje49N19yGiq_5BL-QYySfUPF0CAwEAAaOCBJIwggSOMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFghfmRS4WsmTQCAWQCAQcwggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBQpIRfJ6SPCR16Dy9sN1AQtQKjWNDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwIwDAYKKwYBBAGCN3sEAjAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBACBpx57mqT5wt5VuFMhMv-QcXTs5QrWkz021CcXp44eWUSJBLP35O0JDRyA13V3zowD9Dkl6HKRosiwIhfUwb1VWxMZt1K97bfrlhekU_IFyRNImksBTl4Hg5mL7M4PQvDu_hNxb1NW9JnL8B4LEl-FVcKtOFC8R2wp_2vglSGujfVsEzQMXxCECc_j-T0saauGgdaItgRGQ-1JrKdhZ1FvHWU2eeab0zXatBPn7nyaNmU7DK2icP38PQp3g8yPPlpv1joUzz1GMBJXhtHRWCv93tVfT5q9DZQ-_S2H_1Y2raeucg8kUfGEvVuQ27w1bGi2QRDLtEtuNHgzpR3RB7os&s=cCk8Gt6KvsKKV0qtFtmF0bg8cKaSeb6Uc9i6WmD12uBZurFH6PMYqfFQ1nQ5L4FVHBtN8GKNGDMrmcIYuVGdDSYaHzyQwxEv1uunjaXHQyAGnmdpEqfjKtXc3D0bbHpUpyaYWpr66eq11IFB6aqH2DocLI4YJ1lICeUrbX7Rm67wuLp8KjfE-jKJh_hEAJ85wzOkftrNv41ztZj5YIKEL397vy2O8QFIve7Zs-Sfmbzj00hyUZvZivZsZH1V1rnynQ0yRYP03gzT2S6UBIIRs1AhQoHnHA872y0ZUwMzkaW6DGB9P_ZnyQ7E4UQMQUvnsW4FoXyLYUi_PFGlWqYKhQ&h=TcPcZhTJFofb93nDrPJ14xPZbi5wi58ASrVpJjd8GQ8 - response: - body: - string: '{"status":"Succeeded"}' - headers: - api-supported-versions: - - 2025-03-01-preview - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/operationStatuses/registries-67bb5be2-31ff-11f0-8a73-644ed7a2823f?api-version=2025-03-01-preview&t=638829601697220963&c=MIIHpTCCBo2gAwIBAgITOgWXBJzHWActAOyA9gAEBZcEnDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjUwNDE4MDkxNjUyWhcNMjUxMDE1MDkxNjUyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALJ4tFzYjQAGXlMN4RVSj_Zp98bnnigeY99sbhZrAOQOjxR_04cAp0TrBwLXaA2b6MkNp3EWrqmwj8LAHlmiUmx_C5YeMG8WQUVkZMbfJNmAjSKJvmH2VO_H9OVOiiWemCFWlBXZMT6O1LsK-KI4EQtlTwXEv4-zXiqUQqjqHZQX6IJGxxcuw3R6KS00hFc9B4Ve9K9uvRk3OzuC_2evEuKFQfmIkhFu9gMtFnEBgp0E5Srek5Sh6WRO2V6wjcdtrFJ2dMStIbypiaJysxjNaLwTxBjKAJiyxkrxbuS0IPj2v4oOwkFSl9khCWu-ivje49N19yGiq_5BL-QYySfUPF0CAwEAAaOCBJIwggSOMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFghfmRS4WsmTQCAWQCAQcwggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBQpIRfJ6SPCR16Dy9sN1AQtQKjWNDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwIwDAYKKwYBBAGCN3sEAjAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBACBpx57mqT5wt5VuFMhMv-QcXTs5QrWkz021CcXp44eWUSJBLP35O0JDRyA13V3zowD9Dkl6HKRosiwIhfUwb1VWxMZt1K97bfrlhekU_IFyRNImksBTl4Hg5mL7M4PQvDu_hNxb1NW9JnL8B4LEl-FVcKtOFC8R2wp_2vglSGujfVsEzQMXxCECc_j-T0saauGgdaItgRGQ-1JrKdhZ1FvHWU2eeab0zXatBPn7nyaNmU7DK2icP38PQp3g8yPPlpv1joUzz1GMBJXhtHRWCv93tVfT5q9DZQ-_S2H_1Y2raeucg8kUfGEvVuQ27w1bGi2QRDLtEtuNHgzpR3RB7os&s=I9kDeinBdZC-9qrhJ357YH8oqdahS2OoR28hdTcpaWktOvSOKuDBmM-iIDnZ7mZvkrH6T5smXu3peSi1moHnUAm8yyMPYmNZflQOrxzUJ8pKQebv55gNODjuhnPRPbvVkyUXSRRUJFH2Vc3Gf0cUuxL824cQEYI1QFKOk1h77P0mqO26UOCTIWn-bxrcC1PSH8DpBZB4DhmihcEfboA0JLMVJWLy5zXuZuS8GyV2eq0FdfBfxTHK9ZfI7XnkT1O6lUfO_GfzraLWZ4PBwN9IeXwfGNQzLNAqqcYzBLhcFdHu4mrHesTOhGNR5jmgkttRReJOqLJOCuwoqJ5YeEGjfg&h=yqgZqQCEInSGPAd2DYz7niqWLaXloQKJyDOD5eF2UD8 - cache-control: - - no-cache - content-length: - - '22' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 16 May 2025 02:42:49 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-cache: - - CONFIG_NOCACHE - x-content-type-options: - - nosniff - x-ms-operation-identifier: - - tenantId=54826b22-38d6-4fb2-bad9-b7b93a3e9c5a,objectId=d44a2991-98c6-47c3-b59b-2b30d72cfcc2/japaneast/0261e14c-39d7-47e0-80ff-92881c185616 - x-ms-ratelimit-remaining-subscription-global-reads: - - '3749' - x-msedge-ref: - - 'Ref A: E3F93BAEDD314D7594A3DE28CF94C129 Ref B: TYO01EDGE3010 Ref C: 2025-05-16T02:42:49Z' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - acr create - Connection: - - keep-alive - ParameterSetName: - - -n -g -l --sku - User-Agent: - - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002?api-version=2025-03-01-preview - response: - body: - string: '{"sku":{"name":"Standard","tier":"Standard"},"type":"Microsoft.ContainerRegistry/registries","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002","name":"clireg000002","location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-05-16T02:42:30.4558651+00:00","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-16T02:42:30.4558651+00:00"},"properties":{"loginServer":"clireg000002.azurecr.io","creationDate":"2025-05-16T02:42:30.4558651Z","provisioningState":"Succeeded","adminUserEnabled":false,"policies":{"quarantinePolicy":{"status":"disabled"},"trustPolicy":{"type":"Notary","status":"disabled"},"retentionPolicy":{"days":7,"lastUpdatedTime":"2025-05-16T02:42:48.3792601+00:00","status":"disabled"},"exportPolicy":{"status":"enabled"},"azureADAuthenticationAsArmPolicy":{"status":"enabled"},"softDeletePolicy":{"retentionDays":7,"lastUpdatedTime":"2025-05-16T02:42:48.3793104+00:00","status":"disabled"}},"encryption":{"status":"disabled"},"dataEndpointEnabled":false,"dataEndpointHostNames":[],"privateEndpointConnections":[],"publicNetworkAccess":"Enabled","networkRuleBypassOptions":"AzureServices","zoneRedundancy":"Disabled","anonymousPullEnabled":false,"metadataSearch":"Disabled","roleAssignmentMode":"LegacyRegistryPermissions","autoGeneratedDomainNameLabelScope":"Unsecure"}}' - headers: - api-supported-versions: - - 2025-03-01-preview - cache-control: - - no-cache - content-length: - - '1482' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 16 May 2025 02:42:50 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-cache: - - CONFIG_NOCACHE - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-global-reads: - - '3749' - x-msedge-ref: - - 'Ref A: 9761E93F575A428E92AD0A80B3FEA600 Ref B: TYO01EDGE3010 Ref C: 2025-05-16T02:42:49Z' + - 'Ref A: 0BEC4E5CDE3F42EFA21FC2B4B985E5A5 Ref B: MWH011020808034 Ref C: 2026-03-23T23:12:43Z' status: code: 200 message: OK @@ -172,21 +70,21 @@ interactions: ParameterSetName: - -n -r -l -u -p User-Agent: - - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resources?$filter=resourceType%20eq%20%27Microsoft.ContainerRegistry%2Fregistries%27&api-version=2024-11-01 response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002","name":"clireg000002","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-05-16T02:42:30.4558651Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-16T02:42:30.4558651Z"}}]}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvarga","name":"anvarga","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dev-anvarga/providers/Microsoft.ManagedIdentity/userAssignedIdentities/anvargaidentity":{"principalId":"bf7b10eb-1784-40fb-bc60-2bc2c780d6a4","clientId":"c8deb855-42ed-432b-99f5-dc9cbc6c8d02"}}},"tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-04-20T21:35:14.9732943Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-10-17T18:24:37.9722734Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvargadev","name":"anvargadev","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus3","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2024-10-16T00:02:46.5515473Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2024-10-16T00:02:46.5515473Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/anvarga-artifactcache/providers/Microsoft.ContainerRegistry/registries/anvargasd","name":"anvargasd","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"australiaeast","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-09-03T18:42:30.1306296Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-07T01:16:30.8836181Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvargacuseuap","name":"anvargacuseuap","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"centraluseuap","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-10-17T05:09:28.2847833Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-10-17T05:09:28.2847833Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvargatargetregistry","name":"anvargatargetregistry","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-11-14T21:32:22.1211214Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-11-14T21:32:22.1211214Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvargacuseuap2","name":"anvargacuseuap2","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"centraluseuap","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-01-16T23:59:03.139671Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-01-16T23:59:03.139671Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/anvarga-artifactcache/providers/Microsoft.ContainerRegistry/registries/anvargaupstreamfirewall","name":"anvargaupstreamfirewall","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-02T19:52:04.3843475Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-02T19:54:36.3753519Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/acranvargalogs","name":"acranvargalogs","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-11T22:00:56.7502595Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-11T22:00:56.7502595Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/abac-artifact-cache/providers/Microsoft.ContainerRegistry/registries/abacupstream","name":"abacupstream","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-16T22:05:31.24Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-16T22:05:31.24Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/abac-artifact-cache/providers/Microsoft.ContainerRegistry/registries/abacdownstream","name":"abacdownstream","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-16T22:06:06.547017Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-16T22:06:06.547017Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf002","name":"perf002","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:47.0749168Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:47.0749168Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf005","name":"perf005","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:36:04.5870512Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-18T14:51:49.3136858Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf000","name":"perf000","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:35.5817756Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:35.5817756Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf003","name":"perf003","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:52.6000756Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:52.6000756Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf001","name":"perf001","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:40.8123499Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:40.8123499Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf004","name":"perf004","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:58.8025388Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:58.8025388Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002","name":"clireg000002","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-23T23:12:43.689915Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-23T23:12:43.689915Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/anvarga-demo/providers/Microsoft.ContainerRegistry/registries/anvargadownstream","name":"anvargadownstream","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus2euap","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-01-28T23:23:41.5959636Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-01-28T23:29:01.5110085Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/anvarga-demo/providers/Microsoft.ContainerRegistry/registries/anvargaupstream","name":"anvargaupstream","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus2euap","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-01-28T23:24:03.8642396Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-01-28T23:24:03.8642396Z"}}]}' headers: cache-control: - no-cache content-length: - - '534' + - '10255' content-type: - application/json; charset=utf-8 date: - - Fri, 16 May 2025 02:42:52 GMT + - Mon, 23 Mar 2026 23:12:55 GMT expires: - '-1' pragma: @@ -198,17 +96,17 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-global-reads: - - '3749' + - '16499' x-msedge-ref: - - 'Ref A: D8791F17D7CF4760839501ABA06B9F06 Ref B: TYO201151006062 Ref C: 2025-05-16T02:42:51Z' + - 'Ref A: 43267E0E9F1048D6B960B24F2B48E9AE Ref B: MWH011020806052 Ref C: 2026-03-23T23:12:55Z' status: code: 200 message: OK - request: - body: '{"identity": {"type": "SystemAssigned"}, "properties": {"loginServer": - "mcr.microsoft.com", "authCredentials": [{"name": "Credential1", "usernameSecretIdentifier": - "https://cliimportkv73021.vault.azure.net/secrets/SPusername", "passwordSecretIdentifier": - "https://cliimportkv73021.vault.azure.net/secrets/SPpassword"}]}}' + body: '{"properties": {"loginServer": "mcr.microsoft.com", "authCredentials": + [{"name": "Credential1", "usernameSecretIdentifier": "https://cliimportkv73021.vault.azure.net/secrets/SPusername", + "passwordSecretIdentifier": "https://cliimportkv73021.vault.azure.net/secrets/SPpassword"}]}, + "identity": {"type": "SystemAssigned"}}' headers: Accept: - application/json @@ -225,31 +123,30 @@ interactions: ParameterSetName: - -n -r -l -u -p User-Agent: - - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1?api-version=2023-01-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1?api-version=2026-01-01-preview response: body: - string: '{"type":"Microsoft.ContainerRegistry/registries/credentialSets","identity":{"principalId":"7cf980a9-7474-4691-8576-90fc596e283d","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","type":"systemAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1","name":"test1","systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-05-16T02:42:52.9162128+00:00","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-16T02:42:52.9162128+00:00"},"properties":{"loginServer":"mcr.microsoft.com","authCredentials":[{"name":"Credential1","usernameSecretIdentifier":"https://cliimportkv73021.vault.azure.net/secrets/SPusername","passwordSecretIdentifier":"https://cliimportkv73021.vault.azure.net/secrets/SPpassword","credentialHealth":{"status":"Unhealthy","errorCode":"invalid_grant","errorMessage":"AADSTS53003: - Access has been blocked by Conditional Access policies. The access policy - does not allow token issuance. Trace ID: c39a850a-2c34-4212-8caa-254d9c953f00 - Correlation ID: c6844b14-7cbd-41f6-961d-fa78bd0d41d1 Timestamp: 2025-05-16 - 02:42:55Z"}}],"creationDate":"2025-05-16T02:42:54.6464883+00:00","provisioningState":"Creating"}}' + string: '{"type":"Microsoft.ContainerRegistry/registries/credentialSets","identity":{"principalId":"5f1cdd77-6d0e-41c9-bc61-f024e6c54f84","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"systemAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1","name":"test1","systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-23T23:12:56.1180121+00:00","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-23T23:12:56.1180121+00:00"},"properties":{"loginServer":"mcr.microsoft.com","authCredentials":[{"name":"Credential1","usernameSecretIdentifier":"https://cliimportkv73021.vault.azure.net/secrets/SPusername","passwordSecretIdentifier":"https://cliimportkv73021.vault.azure.net/secrets/SPpassword","credentialHealth":{"status":"Unhealthy","errorCode":"Forbidden","errorMessage":"The + user, group or application ''name=microsoft.containerregistry/registries;appid=722cb8a2-0245-48cb-b863-b1c8f892fa7a;oid=5f1cdd77-6d0e-41c9-bc61-f024e6c54f84;iss=https://sts.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47/'' + does not have secrets get permission on key vault ''cliimportkv73021;location=westus''. + For help resolving this issue, please see https://go.microsoft.com/fwlink/?linkid=2125287"}}],"creationDate":"2026-03-23T23:12:57.2477507+00:00","provisioningState":"Creating"}}' headers: api-supported-versions: - 2023-01-01-preview, 2023-06-01-preview, 2023-07-01, 2023-08-01-preview, 2023-11-01-preview, 2024-01-01-preview, 2024-11-01-preview, 2025-03-01-preview, 2025-04-01, 2025-05-01-preview, - 2025-09-01-preview + 2025-06-01-preview, 2025-09-01-preview, 2025-11-01, 2025-12-01-preview, 2026-01-01-preview azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1/operationStatuses/credentialsets-c6844b14-7cbd-41f6-961d-fa78bd0d41d1?api-version=2023-01-01-preview&t=638829601752755586&c=MIIHpTCCBo2gAwIBAgITOgWXBJzHWActAOyA9gAEBZcEnDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjUwNDE4MDkxNjUyWhcNMjUxMDE1MDkxNjUyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALJ4tFzYjQAGXlMN4RVSj_Zp98bnnigeY99sbhZrAOQOjxR_04cAp0TrBwLXaA2b6MkNp3EWrqmwj8LAHlmiUmx_C5YeMG8WQUVkZMbfJNmAjSKJvmH2VO_H9OVOiiWemCFWlBXZMT6O1LsK-KI4EQtlTwXEv4-zXiqUQqjqHZQX6IJGxxcuw3R6KS00hFc9B4Ve9K9uvRk3OzuC_2evEuKFQfmIkhFu9gMtFnEBgp0E5Srek5Sh6WRO2V6wjcdtrFJ2dMStIbypiaJysxjNaLwTxBjKAJiyxkrxbuS0IPj2v4oOwkFSl9khCWu-ivje49N19yGiq_5BL-QYySfUPF0CAwEAAaOCBJIwggSOMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFghfmRS4WsmTQCAWQCAQcwggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBQpIRfJ6SPCR16Dy9sN1AQtQKjWNDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwIwDAYKKwYBBAGCN3sEAjAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBACBpx57mqT5wt5VuFMhMv-QcXTs5QrWkz021CcXp44eWUSJBLP35O0JDRyA13V3zowD9Dkl6HKRosiwIhfUwb1VWxMZt1K97bfrlhekU_IFyRNImksBTl4Hg5mL7M4PQvDu_hNxb1NW9JnL8B4LEl-FVcKtOFC8R2wp_2vglSGujfVsEzQMXxCECc_j-T0saauGgdaItgRGQ-1JrKdhZ1FvHWU2eeab0zXatBPn7nyaNmU7DK2icP38PQp3g8yPPlpv1joUzz1GMBJXhtHRWCv93tVfT5q9DZQ-_S2H_1Y2raeucg8kUfGEvVuQ27w1bGi2QRDLtEtuNHgzpR3RB7os&s=kd29-FaLMwAQwL1v70gZKKVmpNQqGCsqyxRqLU__qZG3BxwO-cHVzRgTwH_Uq2aG70UvhKf6iTyOEQqKEf40e1DXUOkxN7HGzTfohII8g7jfP3IHfcoiv6_Prtn1HL0Ld0jJiPV72wsZeA2Xm7cNoiO1GpGn859Mok_-4QSRHqoT1IN1ZjlBkc1t2QlNklGoy9bzUxXKekdE4Yy65_mU-8pa-tWnXr1HZigeodMhHtNIlsBKXX3VGEKnuGIFn3FXnW7QD9CWOZNrm7j9Pi7kHQ9gjlZOVrZVCe8TV1c4b8yR2lTih0Vf5V5Qdf8O9KqI4sSB5BGKUhNJebYvWBGBxQ&h=gJvovn7FPfU18Bt8i67WPZahSSeV-7wMC_rt5yCw8OQ + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1/operationStatuses/credentialsets-17788f3a-9222-477b-8efe-460defa64ce7?api-version=2026-01-01-preview&t=639099043777742418&c=MIIIJjCCBw6gAwIBAgIQXAg_KQfqNmXWsnKmcWm-CjANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBXQ1VTIENBIDAxMB4XDTI2MDMwMzE4NDAwNFoXDTI2MDgzMDAwNDAwNFowQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCq2QsnpddKa8kR8gt-vA9VEusmZorO2S-vbINESl_vgl_PJICxJntGEX47Fd1DDc76k_3GujB58pb9CVQcLZ3-ca4xBv6hEqbf7VGNJdlUmL6V31uaLBLUMfEySd5hdTIpu4K8C1BsXVfomETR-eBTaEKo7U6rad09i8wEBquSFVf5S7J71JehWC4rsigucyf3uMHNqTzZudQy7Dr4g3o1z8GDPMMNrN8NB6XUfnHR60daMf2EzZU2v746EHu58MN3kAveFfbqRrcWd5-tDS7K-u-_1JBNmgg_vgVE_HIXLJ-H3nSUSgujW4YOVJzkyLbU8xAJiSJ_NeLBYjJyJhCNAgMBAAGjggUkMIIFIDCBnQYDVR0gBIGVMIGSMAwGCisGAQQBgjd7AQEwZgYKKwYBBAGCN3sCAjBYMFYGCCsGAQUFBwICMEoeSAAzADMAZQAwADEAOQAyADEALQA0AGQANgA0AC0ANABmADgAYwAtAGEAMAA1ADUALQA1AGIAZABhAGYAZgBkADUAZQAzADMAZDAMBgorBgEEAYI3ewMCMAwGCisGAQQBgjd7BAIwDAYDVR0TAQH_BAIwADAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDgYDVR0PAQH_BAQDAgWgMB0GA1UdDgQWBBRvNYqFx4fDp-iV_6CV_JvtWzks-DAfBgNVHSMEGDAWgBQU0jfg9tZ9ft2NurplqwSUJeCWHTCCAfsGA1UdHwSCAfIwggHuMHugeaB3hnVodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwfaB7oHmGd2h0dHA6Ly9zZWNvbmRhcnktY2RuLnBraS5jb3JlLndpbmRvd3MubmV0L3dlc3RjZW50cmFsdXMvY3Jscy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxLzI1L2N1cnJlbnQuY3JsMGygaqBohmZodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwgYGgf6B9hntodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwggIABggrBgEFBQcBAQSCAfIwggHuMH4GCCsGAQUFBzAChnJodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jYWNlcnRzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvY2VydC5jZXIwgYAGCCsGAQUFBzAChnRodHRwOi8vc2Vjb25kYXJ5LWNkbi5wa2kuY29yZS53aW5kb3dzLm5ldC93ZXN0Y2VudHJhbHVzL2NhY2VydHMvY2NtZXdlc3RjZW50cmFsdXNwa2kvY2NtZXdlc3RjZW50cmFsdXNpY2EwMS9jZXJ0LmNlcjBvBggrBgEFBQcwAoZjaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3dlc3RjZW50cmFsdXMvY2FjZXJ0cy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxL2NlcnQuY2VyMHgGCCsGAQUFBzAChmxodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEwDQYJKoZIhvcNAQELBQADggEBAHyESoM-hJA8co5aYFKQj6Yb2naSt-_hW50RjbHBbcf7c32Ujn8L-srkiIyVxkEpzXn0sgWpC8m9Wmwi-IXcD8wG3oPqMrn5ZYvIwrFdrlRwKg23jUltqn23uy8oAzIxCBsBblPSNyWSbEL5Vi52YbLITPHu4uEC7Exy9jJvn6cttL4bste7Sfve85Dd-RbogDrr8HBad8-CN8sHHSyii8mKaK7rq75VE6arRrM28SQgrKJDPrv40C9I6Z5pK40CEUfpYyWTzS6FkLMf7SIjhz0Ilua9xqzb0IO32oVtuv4c-GmmjyJy8FRZzgEYbW_CUh19Gx-9L_Sd5ZzebW5exxE&s=j7GGQdcDWZjl5d5KMrv9BtyPYo06qJF6NeRfvX_shIPhvcQ-fmnf9SveMOvSDBz6P7gH_vra3s_CNoucCiwvKUuEm1YuxPtoo_VGhlfZJdJlK_s7QFoaJikuUAK6PQ21yM7zrbT__2f9gs4fd1fLNSy-2XxC6IRCzaXbYrhSgY5g72uKRcicBhumC5asFZ799mKuwoDIgr7ydEnsUodUy_YtWKIojFRWY2-_ZOFu8AS8qjxzaHDPqVZtJxzfw6RgnbwhZMgGzu4-WuVdJing7L5nsHEvf8SAclKydTuU7vhYDxEeWZkRCWe0-vZu_jwvJNONcxhHRqJisGREpi2i7A&h=dSiycW_Ji3EJxU9HR2WzHgfXuwDWyaTjGyHPw8hMLiQ cache-control: - no-cache content-length: - - '1316' + - '1465' content-type: - application/json; charset=utf-8 date: - - Fri, 16 May 2025 02:42:54 GMT + - Mon, 23 Mar 2026 23:12:57 GMT expires: - '-1' pragma: @@ -261,13 +158,13 @@ interactions: x-content-type-options: - nosniff x-ms-operation-identifier: - - tenantId=54826b22-38d6-4fb2-bad9-b7b93a3e9c5a,objectId=d44a2991-98c6-47c3-b59b-2b30d72cfcc2/japaneast/a62feec9-be9c-4968-b4d1-a42b7489f6fa + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=1de06a28-1a3a-4047-8877-0fb23647661b/westus/4bbc3469-c0af-4ece-a94b-6efe9108c4aa x-ms-ratelimit-remaining-subscription-global-writes: - - '2999' + - '11999' x-ms-ratelimit-remaining-subscription-writes: - - '199' + - '799' x-msedge-ref: - - 'Ref A: 0D5BE1AEB9BF49938AA6E6F0E62A93A5 Ref B: TYO201151001025 Ref C: 2025-05-16T02:42:52Z' + - 'Ref A: 4338A843FFD94343AB22577134207EF5 Ref B: MWH011020808042 Ref C: 2026-03-23T23:12:55Z' status: code: 201 message: Created @@ -285,9 +182,9 @@ interactions: ParameterSetName: - -n -r -l -u -p User-Agent: - - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1/operationStatuses/credentialsets-c6844b14-7cbd-41f6-961d-fa78bd0d41d1?api-version=2023-01-01-preview&t=638829601752755586&c=MIIHpTCCBo2gAwIBAgITOgWXBJzHWActAOyA9gAEBZcEnDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjUwNDE4MDkxNjUyWhcNMjUxMDE1MDkxNjUyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALJ4tFzYjQAGXlMN4RVSj_Zp98bnnigeY99sbhZrAOQOjxR_04cAp0TrBwLXaA2b6MkNp3EWrqmwj8LAHlmiUmx_C5YeMG8WQUVkZMbfJNmAjSKJvmH2VO_H9OVOiiWemCFWlBXZMT6O1LsK-KI4EQtlTwXEv4-zXiqUQqjqHZQX6IJGxxcuw3R6KS00hFc9B4Ve9K9uvRk3OzuC_2evEuKFQfmIkhFu9gMtFnEBgp0E5Srek5Sh6WRO2V6wjcdtrFJ2dMStIbypiaJysxjNaLwTxBjKAJiyxkrxbuS0IPj2v4oOwkFSl9khCWu-ivje49N19yGiq_5BL-QYySfUPF0CAwEAAaOCBJIwggSOMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFghfmRS4WsmTQCAWQCAQcwggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBQpIRfJ6SPCR16Dy9sN1AQtQKjWNDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwIwDAYKKwYBBAGCN3sEAjAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBACBpx57mqT5wt5VuFMhMv-QcXTs5QrWkz021CcXp44eWUSJBLP35O0JDRyA13V3zowD9Dkl6HKRosiwIhfUwb1VWxMZt1K97bfrlhekU_IFyRNImksBTl4Hg5mL7M4PQvDu_hNxb1NW9JnL8B4LEl-FVcKtOFC8R2wp_2vglSGujfVsEzQMXxCECc_j-T0saauGgdaItgRGQ-1JrKdhZ1FvHWU2eeab0zXatBPn7nyaNmU7DK2icP38PQp3g8yPPlpv1joUzz1GMBJXhtHRWCv93tVfT5q9DZQ-_S2H_1Y2raeucg8kUfGEvVuQ27w1bGi2QRDLtEtuNHgzpR3RB7os&s=kd29-FaLMwAQwL1v70gZKKVmpNQqGCsqyxRqLU__qZG3BxwO-cHVzRgTwH_Uq2aG70UvhKf6iTyOEQqKEf40e1DXUOkxN7HGzTfohII8g7jfP3IHfcoiv6_Prtn1HL0Ld0jJiPV72wsZeA2Xm7cNoiO1GpGn859Mok_-4QSRHqoT1IN1ZjlBkc1t2QlNklGoy9bzUxXKekdE4Yy65_mU-8pa-tWnXr1HZigeodMhHtNIlsBKXX3VGEKnuGIFn3FXnW7QD9CWOZNrm7j9Pi7kHQ9gjlZOVrZVCe8TV1c4b8yR2lTih0Vf5V5Qdf8O9KqI4sSB5BGKUhNJebYvWBGBxQ&h=gJvovn7FPfU18Bt8i67WPZahSSeV-7wMC_rt5yCw8OQ + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1/operationStatuses/credentialsets-17788f3a-9222-477b-8efe-460defa64ce7?api-version=2026-01-01-preview&t=639099043777742418&c=MIIIJjCCBw6gAwIBAgIQXAg_KQfqNmXWsnKmcWm-CjANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBXQ1VTIENBIDAxMB4XDTI2MDMwMzE4NDAwNFoXDTI2MDgzMDAwNDAwNFowQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCq2QsnpddKa8kR8gt-vA9VEusmZorO2S-vbINESl_vgl_PJICxJntGEX47Fd1DDc76k_3GujB58pb9CVQcLZ3-ca4xBv6hEqbf7VGNJdlUmL6V31uaLBLUMfEySd5hdTIpu4K8C1BsXVfomETR-eBTaEKo7U6rad09i8wEBquSFVf5S7J71JehWC4rsigucyf3uMHNqTzZudQy7Dr4g3o1z8GDPMMNrN8NB6XUfnHR60daMf2EzZU2v746EHu58MN3kAveFfbqRrcWd5-tDS7K-u-_1JBNmgg_vgVE_HIXLJ-H3nSUSgujW4YOVJzkyLbU8xAJiSJ_NeLBYjJyJhCNAgMBAAGjggUkMIIFIDCBnQYDVR0gBIGVMIGSMAwGCisGAQQBgjd7AQEwZgYKKwYBBAGCN3sCAjBYMFYGCCsGAQUFBwICMEoeSAAzADMAZQAwADEAOQAyADEALQA0AGQANgA0AC0ANABmADgAYwAtAGEAMAA1ADUALQA1AGIAZABhAGYAZgBkADUAZQAzADMAZDAMBgorBgEEAYI3ewMCMAwGCisGAQQBgjd7BAIwDAYDVR0TAQH_BAIwADAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDgYDVR0PAQH_BAQDAgWgMB0GA1UdDgQWBBRvNYqFx4fDp-iV_6CV_JvtWzks-DAfBgNVHSMEGDAWgBQU0jfg9tZ9ft2NurplqwSUJeCWHTCCAfsGA1UdHwSCAfIwggHuMHugeaB3hnVodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwfaB7oHmGd2h0dHA6Ly9zZWNvbmRhcnktY2RuLnBraS5jb3JlLndpbmRvd3MubmV0L3dlc3RjZW50cmFsdXMvY3Jscy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxLzI1L2N1cnJlbnQuY3JsMGygaqBohmZodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwgYGgf6B9hntodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwggIABggrBgEFBQcBAQSCAfIwggHuMH4GCCsGAQUFBzAChnJodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jYWNlcnRzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvY2VydC5jZXIwgYAGCCsGAQUFBzAChnRodHRwOi8vc2Vjb25kYXJ5LWNkbi5wa2kuY29yZS53aW5kb3dzLm5ldC93ZXN0Y2VudHJhbHVzL2NhY2VydHMvY2NtZXdlc3RjZW50cmFsdXNwa2kvY2NtZXdlc3RjZW50cmFsdXNpY2EwMS9jZXJ0LmNlcjBvBggrBgEFBQcwAoZjaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3dlc3RjZW50cmFsdXMvY2FjZXJ0cy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxL2NlcnQuY2VyMHgGCCsGAQUFBzAChmxodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEwDQYJKoZIhvcNAQELBQADggEBAHyESoM-hJA8co5aYFKQj6Yb2naSt-_hW50RjbHBbcf7c32Ujn8L-srkiIyVxkEpzXn0sgWpC8m9Wmwi-IXcD8wG3oPqMrn5ZYvIwrFdrlRwKg23jUltqn23uy8oAzIxCBsBblPSNyWSbEL5Vi52YbLITPHu4uEC7Exy9jJvn6cttL4bste7Sfve85Dd-RbogDrr8HBad8-CN8sHHSyii8mKaK7rq75VE6arRrM28SQgrKJDPrv40C9I6Z5pK40CEUfpYyWTzS6FkLMf7SIjhz0Ilua9xqzb0IO32oVtuv4c-GmmjyJy8FRZzgEYbW_CUh19Gx-9L_Sd5ZzebW5exxE&s=j7GGQdcDWZjl5d5KMrv9BtyPYo06qJF6NeRfvX_shIPhvcQ-fmnf9SveMOvSDBz6P7gH_vra3s_CNoucCiwvKUuEm1YuxPtoo_VGhlfZJdJlK_s7QFoaJikuUAK6PQ21yM7zrbT__2f9gs4fd1fLNSy-2XxC6IRCzaXbYrhSgY5g72uKRcicBhumC5asFZ799mKuwoDIgr7ydEnsUodUy_YtWKIojFRWY2-_ZOFu8AS8qjxzaHDPqVZtJxzfw6RgnbwhZMgGzu4-WuVdJing7L5nsHEvf8SAclKydTuU7vhYDxEeWZkRCWe0-vZu_jwvJNONcxhHRqJisGREpi2i7A&h=dSiycW_Ji3EJxU9HR2WzHgfXuwDWyaTjGyHPw8hMLiQ response: body: string: '{"status":"Succeeded"}' @@ -295,9 +192,9 @@ interactions: api-supported-versions: - 2023-01-01-preview, 2023-06-01-preview, 2023-07-01, 2023-08-01-preview, 2023-11-01-preview, 2024-01-01-preview, 2024-11-01-preview, 2025-03-01-preview, 2025-04-01, 2025-05-01-preview, - 2025-09-01-preview + 2025-06-01-preview, 2025-09-01-preview, 2025-11-01, 2025-12-01-preview, 2026-01-01-preview azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1/operationStatuses/credentialsets-c6844b14-7cbd-41f6-961d-fa78bd0d41d1?api-version=2023-01-01-preview&t=638829601770425436&c=MIIHpTCCBo2gAwIBAgITOgWXBJzHWActAOyA9gAEBZcEnDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjUwNDE4MDkxNjUyWhcNMjUxMDE1MDkxNjUyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALJ4tFzYjQAGXlMN4RVSj_Zp98bnnigeY99sbhZrAOQOjxR_04cAp0TrBwLXaA2b6MkNp3EWrqmwj8LAHlmiUmx_C5YeMG8WQUVkZMbfJNmAjSKJvmH2VO_H9OVOiiWemCFWlBXZMT6O1LsK-KI4EQtlTwXEv4-zXiqUQqjqHZQX6IJGxxcuw3R6KS00hFc9B4Ve9K9uvRk3OzuC_2evEuKFQfmIkhFu9gMtFnEBgp0E5Srek5Sh6WRO2V6wjcdtrFJ2dMStIbypiaJysxjNaLwTxBjKAJiyxkrxbuS0IPj2v4oOwkFSl9khCWu-ivje49N19yGiq_5BL-QYySfUPF0CAwEAAaOCBJIwggSOMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFghfmRS4WsmTQCAWQCAQcwggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBQpIRfJ6SPCR16Dy9sN1AQtQKjWNDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwIwDAYKKwYBBAGCN3sEAjAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBACBpx57mqT5wt5VuFMhMv-QcXTs5QrWkz021CcXp44eWUSJBLP35O0JDRyA13V3zowD9Dkl6HKRosiwIhfUwb1VWxMZt1K97bfrlhekU_IFyRNImksBTl4Hg5mL7M4PQvDu_hNxb1NW9JnL8B4LEl-FVcKtOFC8R2wp_2vglSGujfVsEzQMXxCECc_j-T0saauGgdaItgRGQ-1JrKdhZ1FvHWU2eeab0zXatBPn7nyaNmU7DK2icP38PQp3g8yPPlpv1joUzz1GMBJXhtHRWCv93tVfT5q9DZQ-_S2H_1Y2raeucg8kUfGEvVuQ27w1bGi2QRDLtEtuNHgzpR3RB7os&s=S8Knu8Sqhf7YJ_UorXu5wJIm4dnzHGoLwVkduWtN9ewMDBcBau1GLPfknka295ErV63vQiTnHQ1_GALRCJPsEHZr2G-WwgYWY4AgT6IaOJuZeXLM7sAovn80Of22ABS9alIQO8mhBQZppRQissrGAloKGf6HsvK66W4JC24kx_FsLwYxnNi4uetT57wi_Bwp_1P0SiozxuG2spPoRzC3QGJMGFiZEIunsxobLnVzdU3BlLDJ69KYg6toYFYa64wA5Zq-eR9HLtEnQTzGzoDyk7RAX7DrZfdIn_-7mSrj900A4H7FKiw-1CCYy88LHCcI_HI6GM1owEHjTNNO6xsTcg&h=1XQ7_kQTLKu069mlX-ZgY_wX8h57snd8J2-a1pbkXKk + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1/operationStatuses/credentialsets-17788f3a-9222-477b-8efe-460defa64ce7?api-version=2026-01-01-preview&t=639099043783555564&c=MIIIJjCCBw6gAwIBAgIQXAg_KQfqNmXWsnKmcWm-CjANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBXQ1VTIENBIDAxMB4XDTI2MDMwMzE4NDAwNFoXDTI2MDgzMDAwNDAwNFowQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCq2QsnpddKa8kR8gt-vA9VEusmZorO2S-vbINESl_vgl_PJICxJntGEX47Fd1DDc76k_3GujB58pb9CVQcLZ3-ca4xBv6hEqbf7VGNJdlUmL6V31uaLBLUMfEySd5hdTIpu4K8C1BsXVfomETR-eBTaEKo7U6rad09i8wEBquSFVf5S7J71JehWC4rsigucyf3uMHNqTzZudQy7Dr4g3o1z8GDPMMNrN8NB6XUfnHR60daMf2EzZU2v746EHu58MN3kAveFfbqRrcWd5-tDS7K-u-_1JBNmgg_vgVE_HIXLJ-H3nSUSgujW4YOVJzkyLbU8xAJiSJ_NeLBYjJyJhCNAgMBAAGjggUkMIIFIDCBnQYDVR0gBIGVMIGSMAwGCisGAQQBgjd7AQEwZgYKKwYBBAGCN3sCAjBYMFYGCCsGAQUFBwICMEoeSAAzADMAZQAwADEAOQAyADEALQA0AGQANgA0AC0ANABmADgAYwAtAGEAMAA1ADUALQA1AGIAZABhAGYAZgBkADUAZQAzADMAZDAMBgorBgEEAYI3ewMCMAwGCisGAQQBgjd7BAIwDAYDVR0TAQH_BAIwADAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDgYDVR0PAQH_BAQDAgWgMB0GA1UdDgQWBBRvNYqFx4fDp-iV_6CV_JvtWzks-DAfBgNVHSMEGDAWgBQU0jfg9tZ9ft2NurplqwSUJeCWHTCCAfsGA1UdHwSCAfIwggHuMHugeaB3hnVodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwfaB7oHmGd2h0dHA6Ly9zZWNvbmRhcnktY2RuLnBraS5jb3JlLndpbmRvd3MubmV0L3dlc3RjZW50cmFsdXMvY3Jscy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxLzI1L2N1cnJlbnQuY3JsMGygaqBohmZodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwgYGgf6B9hntodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwggIABggrBgEFBQcBAQSCAfIwggHuMH4GCCsGAQUFBzAChnJodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jYWNlcnRzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvY2VydC5jZXIwgYAGCCsGAQUFBzAChnRodHRwOi8vc2Vjb25kYXJ5LWNkbi5wa2kuY29yZS53aW5kb3dzLm5ldC93ZXN0Y2VudHJhbHVzL2NhY2VydHMvY2NtZXdlc3RjZW50cmFsdXNwa2kvY2NtZXdlc3RjZW50cmFsdXNpY2EwMS9jZXJ0LmNlcjBvBggrBgEFBQcwAoZjaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3dlc3RjZW50cmFsdXMvY2FjZXJ0cy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxL2NlcnQuY2VyMHgGCCsGAQUFBzAChmxodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEwDQYJKoZIhvcNAQELBQADggEBAHyESoM-hJA8co5aYFKQj6Yb2naSt-_hW50RjbHBbcf7c32Ujn8L-srkiIyVxkEpzXn0sgWpC8m9Wmwi-IXcD8wG3oPqMrn5ZYvIwrFdrlRwKg23jUltqn23uy8oAzIxCBsBblPSNyWSbEL5Vi52YbLITPHu4uEC7Exy9jJvn6cttL4bste7Sfve85Dd-RbogDrr8HBad8-CN8sHHSyii8mKaK7rq75VE6arRrM28SQgrKJDPrv40C9I6Z5pK40CEUfpYyWTzS6FkLMf7SIjhz0Ilua9xqzb0IO32oVtuv4c-GmmjyJy8FRZzgEYbW_CUh19Gx-9L_Sd5ZzebW5exxE&s=YlhjG4ANsXm2ODy2eioGU7FjkKT7GVlf574AjDIvYUI6iy2wuOVlegL9WguOVEKUKmPv53tm-cUTbpea7bNMDhImruAzJXYWvo0VbrLQnan75on0xfgyBoQciyVKvjwSwJLvX4m_WaCIKQwF3iYnUKibfj7kyoeKY-xouAIL8CgWzvROBrDEF3SmEmjPMbXTJobf59jJ1w3qi335G7H4L-4_P6tnusjpwx4kLyl2kVBZwzG8niBGTtk2a2vA5q7sNmia6znZj4xsmj1DH0eUyl8e6FXR0DVOy4JgSSNMlLi2dd_gnDpPGxeEC-JbU1RpoAR0sy4fEuUurOLdxa84Ng&h=mRFw7J8MSdBUe962021NGLgUbqUYvZTJ6B68FgaWNwc cache-control: - no-cache content-length: @@ -305,7 +202,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 16 May 2025 02:42:56 GMT + - Mon, 23 Mar 2026 23:12:57 GMT expires: - '-1' pragma: @@ -317,11 +214,11 @@ interactions: x-content-type-options: - nosniff x-ms-operation-identifier: - - tenantId=54826b22-38d6-4fb2-bad9-b7b93a3e9c5a,objectId=d44a2991-98c6-47c3-b59b-2b30d72cfcc2/japaneast/e15f52ca-eca6-4c90-ab3a-aa11e8613472 + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=1de06a28-1a3a-4047-8877-0fb23647661b/westus/1bf475f6-196b-4e82-a411-fb631a537fc2 x-ms-ratelimit-remaining-subscription-global-reads: - - '3749' + - '16499' x-msedge-ref: - - 'Ref A: 5FB65C945D244E669A434479F3776FBA Ref B: TYO201151001025 Ref C: 2025-05-16T02:42:56Z' + - 'Ref A: 7911A3A11A58465CB5D328A2EF485030 Ref B: CO6AA3150220017 Ref C: 2026-03-23T23:12:57Z' status: code: 200 message: OK @@ -339,29 +236,28 @@ interactions: ParameterSetName: - -n -r -l -u -p User-Agent: - - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1?api-version=2023-01-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1?api-version=2026-01-01-preview response: body: - string: '{"type":"Microsoft.ContainerRegistry/registries/credentialSets","identity":{"principalId":"7cf980a9-7474-4691-8576-90fc596e283d","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","type":"systemAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1","name":"test1","systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-05-16T02:42:52.9162128+00:00","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-16T02:42:52.9162128+00:00"},"properties":{"loginServer":"mcr.microsoft.com","authCredentials":[{"name":"Credential1","usernameSecretIdentifier":"https://cliimportkv73021.vault.azure.net/secrets/SPusername","passwordSecretIdentifier":"https://cliimportkv73021.vault.azure.net/secrets/SPpassword","credentialHealth":{"status":"Unhealthy","errorCode":"invalid_grant","errorMessage":"AADSTS53003: - Access has been blocked by Conditional Access policies. The access policy - does not allow token issuance. Trace ID: 67813f66-f79c-4988-b377-80fc3b666e00 - Correlation ID: 9b68b31d-286b-4808-bd97-657ae461779d Timestamp: 2025-05-16 - 02:42:58Z"}}],"creationDate":"2025-05-16T02:42:54.6464883+00:00","provisioningState":"Succeeded"}}' + string: '{"type":"Microsoft.ContainerRegistry/registries/credentialSets","identity":{"principalId":"5f1cdd77-6d0e-41c9-bc61-f024e6c54f84","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"systemAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1","name":"test1","systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-23T23:12:56.1180121+00:00","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-23T23:12:56.1180121+00:00"},"properties":{"loginServer":"mcr.microsoft.com","authCredentials":[{"name":"Credential1","usernameSecretIdentifier":"https://cliimportkv73021.vault.azure.net/secrets/SPusername","passwordSecretIdentifier":"https://cliimportkv73021.vault.azure.net/secrets/SPpassword","credentialHealth":{"status":"Unhealthy","errorCode":"Forbidden","errorMessage":"The + user, group or application ''name=microsoft.containerregistry/registries;appid=722cb8a2-0245-48cb-b863-b1c8f892fa7a;oid=5f1cdd77-6d0e-41c9-bc61-f024e6c54f84;iss=https://sts.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47/'' + does not have secrets get permission on key vault ''cliimportkv73021;location=westus''. + For help resolving this issue, please see https://go.microsoft.com/fwlink/?linkid=2125287"}}],"creationDate":"2026-03-23T23:12:57.2477507+00:00","provisioningState":"Succeeded"}}' headers: api-supported-versions: - 2023-01-01-preview, 2023-06-01-preview, 2023-07-01, 2023-08-01-preview, 2023-11-01-preview, 2024-01-01-preview, 2024-11-01-preview, 2025-03-01-preview, 2025-04-01, 2025-05-01-preview, - 2025-09-01-preview + 2025-06-01-preview, 2025-09-01-preview, 2025-11-01, 2025-12-01-preview, 2026-01-01-preview cache-control: - no-cache content-length: - - '1317' + - '1466' content-type: - application/json; charset=utf-8 date: - - Fri, 16 May 2025 02:42:57 GMT + - Mon, 23 Mar 2026 23:12:58 GMT expires: - '-1' pragma: @@ -373,11 +269,11 @@ interactions: x-content-type-options: - nosniff x-ms-operation-identifier: - - tenantId=54826b22-38d6-4fb2-bad9-b7b93a3e9c5a,objectId=d44a2991-98c6-47c3-b59b-2b30d72cfcc2/japaneast/59df6087-623e-4918-aee2-cd51b003ac56 + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=1de06a28-1a3a-4047-8877-0fb23647661b/westus/618dbab0-a11c-4aeb-a75c-c20263b6c470 x-ms-ratelimit-remaining-subscription-global-reads: - - '3749' + - '16499' x-msedge-ref: - - 'Ref A: 5DA31118413F404AB1E55C0C70123C83 Ref B: TYO201151001025 Ref C: 2025-05-16T02:42:57Z' + - 'Ref A: 9DFC73B56DEC4C8293C8246A7509E7C3 Ref B: CO6AA3150218011 Ref C: 2026-03-23T23:12:58Z' status: code: 200 message: OK @@ -395,29 +291,28 @@ interactions: ParameterSetName: - -r -g User-Agent: - - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets?api-version=2023-01-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets?api-version=2026-01-01-preview response: body: - string: '{"value":[{"type":"Microsoft.ContainerRegistry/registries/credentialSets","identity":{"principalId":"7cf980a9-7474-4691-8576-90fc596e283d","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","type":"systemAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1","name":"test1","systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-05-16T02:42:52.9162128+00:00","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-16T02:42:52.9162128+00:00"},"properties":{"loginServer":"mcr.microsoft.com","authCredentials":[{"name":"Credential1","usernameSecretIdentifier":"https://cliimportkv73021.vault.azure.net/secrets/SPusername","passwordSecretIdentifier":"https://cliimportkv73021.vault.azure.net/secrets/SPpassword","credentialHealth":{"status":"Unhealthy","errorCode":"invalid_grant","errorMessage":"AADSTS53003: - Access has been blocked by Conditional Access policies. The access policy - does not allow token issuance. Trace ID: 17abd207-26b3-4b73-ad14-1cc81375a401 - Correlation ID: 6ae8cf1f-3111-4c68-9cbc-73c7b2aacef2 Timestamp: 2025-05-16 - 02:43:01Z"}}],"creationDate":"2025-05-16T02:42:54.6464883+00:00","provisioningState":"Succeeded"}}]}' + string: '{"value":[{"type":"Microsoft.ContainerRegistry/registries/credentialSets","identity":{"principalId":"5f1cdd77-6d0e-41c9-bc61-f024e6c54f84","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"systemAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1","name":"test1","systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-23T23:12:56.1180121+00:00","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-23T23:12:56.1180121+00:00"},"properties":{"loginServer":"mcr.microsoft.com","authCredentials":[{"name":"Credential1","usernameSecretIdentifier":"https://cliimportkv73021.vault.azure.net/secrets/SPusername","passwordSecretIdentifier":"https://cliimportkv73021.vault.azure.net/secrets/SPpassword","credentialHealth":{"status":"Unhealthy","errorCode":"Forbidden","errorMessage":"The + user, group or application ''name=microsoft.containerregistry/registries;appid=722cb8a2-0245-48cb-b863-b1c8f892fa7a;oid=5f1cdd77-6d0e-41c9-bc61-f024e6c54f84;iss=https://sts.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47/'' + does not have secrets get permission on key vault ''cliimportkv73021;location=westus''. + For help resolving this issue, please see https://go.microsoft.com/fwlink/?linkid=2125287"}}],"creationDate":"2026-03-23T23:12:57.2477507+00:00","provisioningState":"Succeeded"}}]}' headers: api-supported-versions: - 2023-01-01-preview, 2023-06-01-preview, 2023-07-01, 2023-08-01-preview, 2023-11-01-preview, 2024-01-01-preview, 2024-11-01-preview, 2025-03-01-preview, 2025-04-01, 2025-05-01-preview, - 2025-09-01-preview + 2025-06-01-preview, 2025-09-01-preview, 2025-11-01, 2025-12-01-preview, 2026-01-01-preview cache-control: - no-cache content-length: - - '1329' + - '1478' content-type: - application/json; charset=utf-8 date: - - Fri, 16 May 2025 02:43:00 GMT + - Mon, 23 Mar 2026 23:12:59 GMT expires: - '-1' pragma: @@ -429,11 +324,11 @@ interactions: x-content-type-options: - nosniff x-ms-operation-identifier: - - tenantId=54826b22-38d6-4fb2-bad9-b7b93a3e9c5a,objectId=d44a2991-98c6-47c3-b59b-2b30d72cfcc2/japaneast/376fb6ca-0b2c-4ca5-9fd0-9601d92c3111 + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=1de06a28-1a3a-4047-8877-0fb23647661b/westus/86d24d24-a75d-471b-b359-a3417cd801ef x-ms-ratelimit-remaining-subscription-global-reads: - - '3749' + - '16499' x-msedge-ref: - - 'Ref A: F83A25DA6A7349CAB0385B4DCFE1DCBE Ref B: TYO201151006036 Ref C: 2025-05-16T02:43:00Z' + - 'Ref A: FB71EB204C784A9E8CAFAC41277F8F3B Ref B: CO6AA3150219033 Ref C: 2026-03-23T23:12:58Z' status: code: 200 message: OK @@ -451,29 +346,28 @@ interactions: ParameterSetName: - -n -r -g User-Agent: - - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1?api-version=2023-01-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1?api-version=2026-01-01-preview response: body: - string: '{"type":"Microsoft.ContainerRegistry/registries/credentialSets","identity":{"principalId":"7cf980a9-7474-4691-8576-90fc596e283d","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","type":"systemAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1","name":"test1","systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-05-16T02:42:52.9162128+00:00","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-16T02:42:52.9162128+00:00"},"properties":{"loginServer":"mcr.microsoft.com","authCredentials":[{"name":"Credential1","usernameSecretIdentifier":"https://cliimportkv73021.vault.azure.net/secrets/SPusername","passwordSecretIdentifier":"https://cliimportkv73021.vault.azure.net/secrets/SPpassword","credentialHealth":{"status":"Unhealthy","errorCode":"invalid_grant","errorMessage":"AADSTS53003: - Access has been blocked by Conditional Access policies. The access policy - does not allow token issuance. Trace ID: 9bf9241d-acdd-49e8-8de2-8d7b2500bb01 - Correlation ID: 93ed4ff1-7ba0-418f-ab6b-014bd55d9561 Timestamp: 2025-05-16 - 02:43:02Z"}}],"creationDate":"2025-05-16T02:42:54.6464883+00:00","provisioningState":"Succeeded"}}' + string: '{"type":"Microsoft.ContainerRegistry/registries/credentialSets","identity":{"principalId":"5f1cdd77-6d0e-41c9-bc61-f024e6c54f84","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"systemAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1","name":"test1","systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-23T23:12:56.1180121+00:00","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-23T23:12:56.1180121+00:00"},"properties":{"loginServer":"mcr.microsoft.com","authCredentials":[{"name":"Credential1","usernameSecretIdentifier":"https://cliimportkv73021.vault.azure.net/secrets/SPusername","passwordSecretIdentifier":"https://cliimportkv73021.vault.azure.net/secrets/SPpassword","credentialHealth":{"status":"Unhealthy","errorCode":"Forbidden","errorMessage":"The + user, group or application ''name=microsoft.containerregistry/registries;appid=722cb8a2-0245-48cb-b863-b1c8f892fa7a;oid=5f1cdd77-6d0e-41c9-bc61-f024e6c54f84;iss=https://sts.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47/'' + does not have secrets get permission on key vault ''cliimportkv73021;location=westus''. + For help resolving this issue, please see https://go.microsoft.com/fwlink/?linkid=2125287"}}],"creationDate":"2026-03-23T23:12:57.2477507+00:00","provisioningState":"Succeeded"}}' headers: api-supported-versions: - 2023-01-01-preview, 2023-06-01-preview, 2023-07-01, 2023-08-01-preview, 2023-11-01-preview, 2024-01-01-preview, 2024-11-01-preview, 2025-03-01-preview, 2025-04-01, 2025-05-01-preview, - 2025-09-01-preview + 2025-06-01-preview, 2025-09-01-preview, 2025-11-01, 2025-12-01-preview, 2026-01-01-preview cache-control: - no-cache content-length: - - '1317' + - '1466' content-type: - application/json; charset=utf-8 date: - - Fri, 16 May 2025 02:43:02 GMT + - Mon, 23 Mar 2026 23:12:58 GMT expires: - '-1' pragma: @@ -485,11 +379,11 @@ interactions: x-content-type-options: - nosniff x-ms-operation-identifier: - - tenantId=54826b22-38d6-4fb2-bad9-b7b93a3e9c5a,objectId=d44a2991-98c6-47c3-b59b-2b30d72cfcc2/japaneast/75ea9313-85ed-4286-abb3-1fdaaf8ec14c + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=1de06a28-1a3a-4047-8877-0fb23647661b/westus/95966a32-2dcc-4995-bef9-0cb56e60043c x-ms-ratelimit-remaining-subscription-global-reads: - - '3748' + - '16499' x-msedge-ref: - - 'Ref A: 5023BF5BFE8841EDBE89C647D9C08607 Ref B: TYO201100113025 Ref C: 2025-05-16T02:43:01Z' + - 'Ref A: AB39035C655841C0A89963813AF17910 Ref B: MWH011020808054 Ref C: 2026-03-23T23:12:59Z' status: code: 200 message: OK @@ -507,21 +401,21 @@ interactions: ParameterSetName: - -n -r -p User-Agent: - - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resources?$filter=resourceType%20eq%20%27Microsoft.ContainerRegistry%2Fregistries%27&api-version=2024-11-01 response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002","name":"clireg000002","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-05-16T02:42:30.4558651Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-16T02:42:30.4558651Z"}}]}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvarga","name":"anvarga","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dev-anvarga/providers/Microsoft.ManagedIdentity/userAssignedIdentities/anvargaidentity":{"principalId":"bf7b10eb-1784-40fb-bc60-2bc2c780d6a4","clientId":"c8deb855-42ed-432b-99f5-dc9cbc6c8d02"}}},"tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-04-20T21:35:14.9732943Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-10-17T18:24:37.9722734Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvargadev","name":"anvargadev","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus3","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2024-10-16T00:02:46.5515473Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2024-10-16T00:02:46.5515473Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/anvarga-artifactcache/providers/Microsoft.ContainerRegistry/registries/anvargasd","name":"anvargasd","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"australiaeast","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-09-03T18:42:30.1306296Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-07T01:16:30.8836181Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvargacuseuap","name":"anvargacuseuap","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"centraluseuap","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-10-17T05:09:28.2847833Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-10-17T05:09:28.2847833Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvargatargetregistry","name":"anvargatargetregistry","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-11-14T21:32:22.1211214Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-11-14T21:32:22.1211214Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvargacuseuap2","name":"anvargacuseuap2","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"centraluseuap","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-01-16T23:59:03.139671Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-01-16T23:59:03.139671Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/anvarga-artifactcache/providers/Microsoft.ContainerRegistry/registries/anvargaupstreamfirewall","name":"anvargaupstreamfirewall","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-02T19:52:04.3843475Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-02T19:54:36.3753519Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/acranvargalogs","name":"acranvargalogs","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-11T22:00:56.7502595Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-11T22:00:56.7502595Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/abac-artifact-cache/providers/Microsoft.ContainerRegistry/registries/abacupstream","name":"abacupstream","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-16T22:05:31.24Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-16T22:05:31.24Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/abac-artifact-cache/providers/Microsoft.ContainerRegistry/registries/abacdownstream","name":"abacdownstream","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-16T22:06:06.547017Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-16T22:06:06.547017Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf002","name":"perf002","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:47.0749168Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:47.0749168Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf005","name":"perf005","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:36:04.5870512Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-18T14:51:49.3136858Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf000","name":"perf000","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:35.5817756Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:35.5817756Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf003","name":"perf003","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:52.6000756Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:52.6000756Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf001","name":"perf001","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:40.8123499Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:40.8123499Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf004","name":"perf004","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:58.8025388Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:58.8025388Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002","name":"clireg000002","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-23T23:12:43.689915Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-23T23:12:43.689915Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/anvarga-demo/providers/Microsoft.ContainerRegistry/registries/anvargadownstream","name":"anvargadownstream","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus2euap","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-01-28T23:23:41.5959636Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-01-28T23:29:01.5110085Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/anvarga-demo/providers/Microsoft.ContainerRegistry/registries/anvargaupstream","name":"anvargaupstream","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus2euap","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-01-28T23:24:03.8642396Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-01-28T23:24:03.8642396Z"}}]}' headers: cache-control: - no-cache content-length: - - '534' + - '10255' content-type: - application/json; charset=utf-8 date: - - Fri, 16 May 2025 02:43:02 GMT + - Mon, 23 Mar 2026 23:12:58 GMT expires: - '-1' pragma: @@ -533,9 +427,9 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-global-reads: - - '3748' + - '16499' x-msedge-ref: - - 'Ref A: F5E068B0280A4FBC85B0A1891D5DB8A3 Ref B: TYO01EDGE1908 Ref C: 2025-05-16T02:43:03Z' + - 'Ref A: 8464BCDB2D6A4567BB6F21AD3FD8A033 Ref B: CO6AA3150217047 Ref C: 2026-03-23T23:12:59Z' status: code: 200 message: OK @@ -553,29 +447,28 @@ interactions: ParameterSetName: - -n -r -p User-Agent: - - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1?api-version=2023-01-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1?api-version=2026-01-01-preview response: body: - string: '{"type":"Microsoft.ContainerRegistry/registries/credentialSets","identity":{"principalId":"7cf980a9-7474-4691-8576-90fc596e283d","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","type":"systemAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1","name":"test1","systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-05-16T02:42:52.9162128+00:00","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-16T02:42:52.9162128+00:00"},"properties":{"loginServer":"mcr.microsoft.com","authCredentials":[{"name":"Credential1","usernameSecretIdentifier":"https://cliimportkv73021.vault.azure.net/secrets/SPusername","passwordSecretIdentifier":"https://cliimportkv73021.vault.azure.net/secrets/SPpassword","credentialHealth":{"status":"Unhealthy","errorCode":"invalid_grant","errorMessage":"AADSTS53003: - Access has been blocked by Conditional Access policies. The access policy - does not allow token issuance. Trace ID: 7d99a388-8352-477e-bb9e-0e2ef4d23201 - Correlation ID: 3577d886-4053-4610-ad6c-2be06f03e6f3 Timestamp: 2025-05-16 - 02:43:04Z"}}],"creationDate":"2025-05-16T02:42:54.6464883+00:00","provisioningState":"Succeeded"}}' + string: '{"type":"Microsoft.ContainerRegistry/registries/credentialSets","identity":{"principalId":"5f1cdd77-6d0e-41c9-bc61-f024e6c54f84","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"systemAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1","name":"test1","systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-23T23:12:56.1180121+00:00","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-23T23:12:56.1180121+00:00"},"properties":{"loginServer":"mcr.microsoft.com","authCredentials":[{"name":"Credential1","usernameSecretIdentifier":"https://cliimportkv73021.vault.azure.net/secrets/SPusername","passwordSecretIdentifier":"https://cliimportkv73021.vault.azure.net/secrets/SPpassword","credentialHealth":{"status":"Unhealthy","errorCode":"Forbidden","errorMessage":"The + user, group or application ''name=microsoft.containerregistry/registries;appid=722cb8a2-0245-48cb-b863-b1c8f892fa7a;oid=5f1cdd77-6d0e-41c9-bc61-f024e6c54f84;iss=https://sts.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47/'' + does not have secrets get permission on key vault ''cliimportkv73021;location=westus''. + For help resolving this issue, please see https://go.microsoft.com/fwlink/?linkid=2125287"}}],"creationDate":"2026-03-23T23:12:57.2477507+00:00","provisioningState":"Succeeded"}}' headers: api-supported-versions: - 2023-01-01-preview, 2023-06-01-preview, 2023-07-01, 2023-08-01-preview, 2023-11-01-preview, 2024-01-01-preview, 2024-11-01-preview, 2025-03-01-preview, 2025-04-01, 2025-05-01-preview, - 2025-09-01-preview + 2025-06-01-preview, 2025-09-01-preview, 2025-11-01, 2025-12-01-preview, 2026-01-01-preview cache-control: - no-cache content-length: - - '1317' + - '1466' content-type: - application/json; charset=utf-8 date: - - Fri, 16 May 2025 02:43:04 GMT + - Mon, 23 Mar 2026 23:12:59 GMT expires: - '-1' pragma: @@ -587,11 +480,11 @@ interactions: x-content-type-options: - nosniff x-ms-operation-identifier: - - tenantId=54826b22-38d6-4fb2-bad9-b7b93a3e9c5a,objectId=d44a2991-98c6-47c3-b59b-2b30d72cfcc2/japaneast/3bf455f5-cacc-43b4-9ac5-be693704afaf + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=1de06a28-1a3a-4047-8877-0fb23647661b/westus/dc55ef58-bb04-4ee1-856b-9a837db481b7 x-ms-ratelimit-remaining-subscription-global-reads: - - '3749' + - '16499' x-msedge-ref: - - 'Ref A: F4B4EB12A2014CC8B03FD2363E40F71A Ref B: TYO01EDGE1918 Ref C: 2025-05-16T02:43:03Z' + - 'Ref A: 13934F3B11724FBD988CA64098107B08 Ref B: MWH011020808054 Ref C: 2026-03-23T23:12:59Z' status: code: 200 message: OK @@ -609,21 +502,21 @@ interactions: ParameterSetName: - -n -r -p User-Agent: - - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resources?$filter=resourceType%20eq%20%27Microsoft.ContainerRegistry%2Fregistries%27&api-version=2024-11-01 response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002","name":"clireg000002","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-05-16T02:42:30.4558651Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-16T02:42:30.4558651Z"}}]}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvarga","name":"anvarga","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dev-anvarga/providers/Microsoft.ManagedIdentity/userAssignedIdentities/anvargaidentity":{"principalId":"bf7b10eb-1784-40fb-bc60-2bc2c780d6a4","clientId":"c8deb855-42ed-432b-99f5-dc9cbc6c8d02"}}},"tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-04-20T21:35:14.9732943Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-10-17T18:24:37.9722734Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvargadev","name":"anvargadev","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus3","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2024-10-16T00:02:46.5515473Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2024-10-16T00:02:46.5515473Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/anvarga-artifactcache/providers/Microsoft.ContainerRegistry/registries/anvargasd","name":"anvargasd","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"australiaeast","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-09-03T18:42:30.1306296Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-07T01:16:30.8836181Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvargacuseuap","name":"anvargacuseuap","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"centraluseuap","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-10-17T05:09:28.2847833Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-10-17T05:09:28.2847833Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvargatargetregistry","name":"anvargatargetregistry","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-11-14T21:32:22.1211214Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-11-14T21:32:22.1211214Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvargacuseuap2","name":"anvargacuseuap2","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"centraluseuap","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-01-16T23:59:03.139671Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-01-16T23:59:03.139671Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/anvarga-artifactcache/providers/Microsoft.ContainerRegistry/registries/anvargaupstreamfirewall","name":"anvargaupstreamfirewall","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-02T19:52:04.3843475Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-02T19:54:36.3753519Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/acranvargalogs","name":"acranvargalogs","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-11T22:00:56.7502595Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-11T22:00:56.7502595Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/abac-artifact-cache/providers/Microsoft.ContainerRegistry/registries/abacupstream","name":"abacupstream","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-16T22:05:31.24Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-16T22:05:31.24Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/abac-artifact-cache/providers/Microsoft.ContainerRegistry/registries/abacdownstream","name":"abacdownstream","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-16T22:06:06.547017Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-16T22:06:06.547017Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf002","name":"perf002","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:47.0749168Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:47.0749168Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf005","name":"perf005","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:36:04.5870512Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-18T14:51:49.3136858Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf000","name":"perf000","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:35.5817756Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:35.5817756Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf003","name":"perf003","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:52.6000756Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:52.6000756Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf001","name":"perf001","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:40.8123499Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:40.8123499Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf004","name":"perf004","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:58.8025388Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:58.8025388Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002","name":"clireg000002","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-23T23:12:43.689915Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-23T23:12:43.689915Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/anvarga-demo/providers/Microsoft.ContainerRegistry/registries/anvargadownstream","name":"anvargadownstream","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus2euap","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-01-28T23:23:41.5959636Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-01-28T23:29:01.5110085Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/anvarga-demo/providers/Microsoft.ContainerRegistry/registries/anvargaupstream","name":"anvargaupstream","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus2euap","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-01-28T23:24:03.8642396Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-01-28T23:24:03.8642396Z"}}]}' headers: cache-control: - no-cache content-length: - - '534' + - '10255' content-type: - application/json; charset=utf-8 date: - - Fri, 16 May 2025 02:43:04 GMT + - Mon, 23 Mar 2026 23:13:00 GMT expires: - '-1' pragma: @@ -635,9 +528,9 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-global-reads: - - '3749' + - '16499' x-msedge-ref: - - 'Ref A: FA630BB45DF94E638EFBA724E24F58A1 Ref B: TYO201100117045 Ref C: 2025-05-16T02:43:05Z' + - 'Ref A: D5A688265E4543158F7AE242B8757D8A Ref B: MWH011020807052 Ref C: 2026-03-23T23:13:00Z' status: code: 200 message: OK @@ -661,31 +554,30 @@ interactions: ParameterSetName: - -n -r -p User-Agent: - - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1?api-version=2023-01-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1?api-version=2026-01-01-preview response: body: - string: '{"type":"Microsoft.ContainerRegistry/registries/credentialSets","identity":{"principalId":"7cf980a9-7474-4691-8576-90fc596e283d","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","type":"systemAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1","name":"test1","systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-05-16T02:43:06.2206229+00:00","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-16T02:43:06.2206229+00:00"},"properties":{"loginServer":"mcr.microsoft.com","authCredentials":[{"name":"Credential1","usernameSecretIdentifier":"https://cliimportkv73021.vault.azure.net/secrets/SPusername","passwordSecretIdentifier":"https://cliimportkv73021.vault.azure.net/secrets/SPusername","credentialHealth":{"status":"Unhealthy","errorCode":"invalid_grant","errorMessage":"AADSTS53003: - Access has been blocked by Conditional Access policies. The access policy - does not allow token issuance. Trace ID: 7c274bd9-4139-4dc2-a996-c01f0e573b00 - Correlation ID: 45388d24-0473-4888-84b8-8ab931968750 Timestamp: 2025-05-16 - 02:43:06Z"}}],"creationDate":"2025-05-16T02:42:54.6464883+00:00","provisioningState":"Updating"}}' + string: '{"type":"Microsoft.ContainerRegistry/registries/credentialSets","identity":{"principalId":"5f1cdd77-6d0e-41c9-bc61-f024e6c54f84","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"systemAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1","name":"test1","systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-23T23:13:01.0984229+00:00","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-23T23:13:01.0984229+00:00"},"properties":{"loginServer":"mcr.microsoft.com","authCredentials":[{"name":"Credential1","usernameSecretIdentifier":"https://cliimportkv73021.vault.azure.net/secrets/SPusername","passwordSecretIdentifier":"https://cliimportkv73021.vault.azure.net/secrets/SPusername","credentialHealth":{"status":"Unhealthy","errorCode":"Forbidden","errorMessage":"The + user, group or application ''name=microsoft.containerregistry/registries;appid=722cb8a2-0245-48cb-b863-b1c8f892fa7a;oid=5f1cdd77-6d0e-41c9-bc61-f024e6c54f84;iss=https://sts.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47/'' + does not have secrets get permission on key vault ''cliimportkv73021;location=westus''. + For help resolving this issue, please see https://go.microsoft.com/fwlink/?linkid=2125287"}}],"creationDate":"2026-03-23T23:12:57.2477507+00:00","provisioningState":"Updating"}}' headers: api-supported-versions: - 2023-01-01-preview, 2023-06-01-preview, 2023-07-01, 2023-08-01-preview, 2023-11-01-preview, 2024-01-01-preview, 2024-11-01-preview, 2025-03-01-preview, 2025-04-01, 2025-05-01-preview, - 2025-09-01-preview + 2025-06-01-preview, 2025-09-01-preview, 2025-11-01, 2025-12-01-preview, 2026-01-01-preview azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1/operationStatuses/credentialsets-45388d24-0473-4888-84b8-8ab931968750?api-version=2023-01-01-preview&t=638829601869706229&c=MIIHhzCCBm-gAwIBAgITHgbLuWlxY4-k_d1algAABsu5aTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjUwNDE5MTMxMzMyWhcNMjUxMDE2MTMxMzMyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMvHJaUg0aA6C-P-W7rBOoZfQCieq667lznMrFDPEeiLJs-W58e8I_jHbBheje2C5g9-qBPHK6VQBBfZrcs9tzrupbS7wUKQvBkbEEqj19vo7jPtiN4hWOYzxijvMpObILP6eyLeXsL3K6b3th6Mzu1YEGETh8Lh9lsKsgT-uiTSC52uYnO63jpJBr83ivLckQDLkpMN21cpEJpaenMoBGBtKAmREs19pJv5r4HQS73KA4NZgjOChwFPAD7cIPY8jFZduW--1Ej4woncGGu117cZcM1yffltg1tqs5vmfgVc4ru4VoMm2UUdWXj6t8VoG1yJ8zasfOiUeO4CjEJgU0ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFghfmRS4WsmTQCAWQCAQcwggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBQDmHWGUrNZmFtIfL14RXoPR4LL6zAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwIwDAYKKwYBBAGCN3sEAjAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAJcF-z2HGOD5vBAPAiibLynJVPemcCzI2SbO4rX-E6AhWLEMIGFO4peavwLv9iPrFKY29lbs6SxVSu5q_hj7y932SCf-JNEeue2cfiDCPv3T6f2-EAZTfMXrH_G7MaJXKiT0W9b7aewbcPT4xAGaldOb8n9yZp0vrNp9qEtWLm-_bvUf_3_eHf6Iml0lQ01vTCc-k265OG5t1GXtk819ayqNBui5LchwPrubIwRT_p2bmkDy4M-NKrweDScQY2PyCsUp_kdZXbvXoLWAHVgrY7Jq_YDJtDv71360dQ2_5FYlmToG9vPIsDq3H-rE22IKrM8CQsR3ta6g7CXSflNNquQ&s=R5xcVDF9C88zAkttQ3oFxhyyrT3D9BFwwr1w0xHideK2a7FC8b8F1ywuDzGLS11b8nUU70aULKGjWXtD1kTeF0Vc8wjP9RfP3YGgj0cd0nelwrdjyqCykYpPdrPtIZEFV_m3IMeGwUdUkul2Xcj5GJuyNSn387lyw48d4LwXoCuAwS47kSG0mVLPEsGt0E1ZHzadffl9qUOcDrtrL-g__KdWOocRqe3_xgofMKsbB6ZDE1C4APZvt36nHqczNny3Us0V0r4vzo6PSyPuvsk-m03_M7yDdbGLuB3HgZ87YKitMEPkozdaub2-lSf5eHOa6F2N2iMsGwwKAJVxED4qkQ&h=Ljr1DkswZtm2OTd3VxCVbmz3MN4e6cLaBn5nbRGiV34 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1/operationStatuses/credentialsets-1e2ddb6a-d238-411b-be6a-5006c9e1b087?api-version=2026-01-01-preview&t=639099043813015929&c=MIIIJjCCBw6gAwIBAgIQXAg_KQfqNmXWsnKmcWm-CjANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBXQ1VTIENBIDAxMB4XDTI2MDMwMzE4NDAwNFoXDTI2MDgzMDAwNDAwNFowQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCq2QsnpddKa8kR8gt-vA9VEusmZorO2S-vbINESl_vgl_PJICxJntGEX47Fd1DDc76k_3GujB58pb9CVQcLZ3-ca4xBv6hEqbf7VGNJdlUmL6V31uaLBLUMfEySd5hdTIpu4K8C1BsXVfomETR-eBTaEKo7U6rad09i8wEBquSFVf5S7J71JehWC4rsigucyf3uMHNqTzZudQy7Dr4g3o1z8GDPMMNrN8NB6XUfnHR60daMf2EzZU2v746EHu58MN3kAveFfbqRrcWd5-tDS7K-u-_1JBNmgg_vgVE_HIXLJ-H3nSUSgujW4YOVJzkyLbU8xAJiSJ_NeLBYjJyJhCNAgMBAAGjggUkMIIFIDCBnQYDVR0gBIGVMIGSMAwGCisGAQQBgjd7AQEwZgYKKwYBBAGCN3sCAjBYMFYGCCsGAQUFBwICMEoeSAAzADMAZQAwADEAOQAyADEALQA0AGQANgA0AC0ANABmADgAYwAtAGEAMAA1ADUALQA1AGIAZABhAGYAZgBkADUAZQAzADMAZDAMBgorBgEEAYI3ewMCMAwGCisGAQQBgjd7BAIwDAYDVR0TAQH_BAIwADAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDgYDVR0PAQH_BAQDAgWgMB0GA1UdDgQWBBRvNYqFx4fDp-iV_6CV_JvtWzks-DAfBgNVHSMEGDAWgBQU0jfg9tZ9ft2NurplqwSUJeCWHTCCAfsGA1UdHwSCAfIwggHuMHugeaB3hnVodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwfaB7oHmGd2h0dHA6Ly9zZWNvbmRhcnktY2RuLnBraS5jb3JlLndpbmRvd3MubmV0L3dlc3RjZW50cmFsdXMvY3Jscy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxLzI1L2N1cnJlbnQuY3JsMGygaqBohmZodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwgYGgf6B9hntodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwggIABggrBgEFBQcBAQSCAfIwggHuMH4GCCsGAQUFBzAChnJodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jYWNlcnRzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvY2VydC5jZXIwgYAGCCsGAQUFBzAChnRodHRwOi8vc2Vjb25kYXJ5LWNkbi5wa2kuY29yZS53aW5kb3dzLm5ldC93ZXN0Y2VudHJhbHVzL2NhY2VydHMvY2NtZXdlc3RjZW50cmFsdXNwa2kvY2NtZXdlc3RjZW50cmFsdXNpY2EwMS9jZXJ0LmNlcjBvBggrBgEFBQcwAoZjaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3dlc3RjZW50cmFsdXMvY2FjZXJ0cy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxL2NlcnQuY2VyMHgGCCsGAQUFBzAChmxodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEwDQYJKoZIhvcNAQELBQADggEBAHyESoM-hJA8co5aYFKQj6Yb2naSt-_hW50RjbHBbcf7c32Ujn8L-srkiIyVxkEpzXn0sgWpC8m9Wmwi-IXcD8wG3oPqMrn5ZYvIwrFdrlRwKg23jUltqn23uy8oAzIxCBsBblPSNyWSbEL5Vi52YbLITPHu4uEC7Exy9jJvn6cttL4bste7Sfve85Dd-RbogDrr8HBad8-CN8sHHSyii8mKaK7rq75VE6arRrM28SQgrKJDPrv40C9I6Z5pK40CEUfpYyWTzS6FkLMf7SIjhz0Ilua9xqzb0IO32oVtuv4c-GmmjyJy8FRZzgEYbW_CUh19Gx-9L_Sd5ZzebW5exxE&s=hu6x1lIVAeKDd1SS2tY54dzTkGMhoFF9KJFtO3RXgX1HRs4X9XCLpdYBRvUV3Wi3iYgFMpaB4d8qeKCVyXjIHqx9kNKQRYHr1pTOVBhZUaYQEmjrfJ-UxRFONoX-pVugmVqtUW4EVbi-NxKD3f6OvKXoVYWs9C2LGSuneew6t5KdvQOWDXCei1XLQNMupy2ueiHdUotsaI_mv1nFXc1BgUwtDpQxHducJ_nedpkOFTiaF9LodrTp_MbKsiwxqzSMvQyYgVEptlTFFdKNhmfbPm5EJqyPrk0xH5x2GcHt9AUqMzyyEtLTVvBezBw03RxS3i6QsyBM1q_ZV2-QV_N-cA&h=QUAAK8DlPAd1Lakf7lC2WtqoDzuq-IYe8YUOLz12ub4 cache-control: - no-cache content-length: - - '1316' + - '1465' content-type: - application/json; charset=utf-8 date: - - Fri, 16 May 2025 02:43:06 GMT + - Mon, 23 Mar 2026 23:13:01 GMT expires: - '-1' pragma: @@ -697,13 +589,13 @@ interactions: x-content-type-options: - nosniff x-ms-operation-identifier: - - tenantId=54826b22-38d6-4fb2-bad9-b7b93a3e9c5a,objectId=d44a2991-98c6-47c3-b59b-2b30d72cfcc2/japanwest/0fd04701-180e-44fd-ae67-4c04320bbc24 + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=1de06a28-1a3a-4047-8877-0fb23647661b/westus/4afc9662-75d6-49dc-a8fe-c98bd6e5f4d8 x-ms-ratelimit-remaining-subscription-global-writes: - - '2999' + - '11999' x-ms-ratelimit-remaining-subscription-writes: - - '199' + - '799' x-msedge-ref: - - 'Ref A: 9F59C2F2019E47D3BE726275C6D8974C Ref B: TYO201100117023 Ref C: 2025-05-16T02:43:05Z' + - 'Ref A: D0E9476820584E279B1D0A0AA2E07B53 Ref B: CO6AA3150217051 Ref C: 2026-03-23T23:13:00Z' status: code: 201 message: Created @@ -721,9 +613,9 @@ interactions: ParameterSetName: - -n -r -p User-Agent: - - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1/operationStatuses/credentialsets-45388d24-0473-4888-84b8-8ab931968750?api-version=2023-01-01-preview&t=638829601869706229&c=MIIHhzCCBm-gAwIBAgITHgbLuWlxY4-k_d1algAABsu5aTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjUwNDE5MTMxMzMyWhcNMjUxMDE2MTMxMzMyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMvHJaUg0aA6C-P-W7rBOoZfQCieq667lznMrFDPEeiLJs-W58e8I_jHbBheje2C5g9-qBPHK6VQBBfZrcs9tzrupbS7wUKQvBkbEEqj19vo7jPtiN4hWOYzxijvMpObILP6eyLeXsL3K6b3th6Mzu1YEGETh8Lh9lsKsgT-uiTSC52uYnO63jpJBr83ivLckQDLkpMN21cpEJpaenMoBGBtKAmREs19pJv5r4HQS73KA4NZgjOChwFPAD7cIPY8jFZduW--1Ej4woncGGu117cZcM1yffltg1tqs5vmfgVc4ru4VoMm2UUdWXj6t8VoG1yJ8zasfOiUeO4CjEJgU0ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFghfmRS4WsmTQCAWQCAQcwggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBQDmHWGUrNZmFtIfL14RXoPR4LL6zAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwIwDAYKKwYBBAGCN3sEAjAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAJcF-z2HGOD5vBAPAiibLynJVPemcCzI2SbO4rX-E6AhWLEMIGFO4peavwLv9iPrFKY29lbs6SxVSu5q_hj7y932SCf-JNEeue2cfiDCPv3T6f2-EAZTfMXrH_G7MaJXKiT0W9b7aewbcPT4xAGaldOb8n9yZp0vrNp9qEtWLm-_bvUf_3_eHf6Iml0lQ01vTCc-k265OG5t1GXtk819ayqNBui5LchwPrubIwRT_p2bmkDy4M-NKrweDScQY2PyCsUp_kdZXbvXoLWAHVgrY7Jq_YDJtDv71360dQ2_5FYlmToG9vPIsDq3H-rE22IKrM8CQsR3ta6g7CXSflNNquQ&s=R5xcVDF9C88zAkttQ3oFxhyyrT3D9BFwwr1w0xHideK2a7FC8b8F1ywuDzGLS11b8nUU70aULKGjWXtD1kTeF0Vc8wjP9RfP3YGgj0cd0nelwrdjyqCykYpPdrPtIZEFV_m3IMeGwUdUkul2Xcj5GJuyNSn387lyw48d4LwXoCuAwS47kSG0mVLPEsGt0E1ZHzadffl9qUOcDrtrL-g__KdWOocRqe3_xgofMKsbB6ZDE1C4APZvt36nHqczNny3Us0V0r4vzo6PSyPuvsk-m03_M7yDdbGLuB3HgZ87YKitMEPkozdaub2-lSf5eHOa6F2N2iMsGwwKAJVxED4qkQ&h=Ljr1DkswZtm2OTd3VxCVbmz3MN4e6cLaBn5nbRGiV34 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1/operationStatuses/credentialsets-1e2ddb6a-d238-411b-be6a-5006c9e1b087?api-version=2026-01-01-preview&t=639099043813015929&c=MIIIJjCCBw6gAwIBAgIQXAg_KQfqNmXWsnKmcWm-CjANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBXQ1VTIENBIDAxMB4XDTI2MDMwMzE4NDAwNFoXDTI2MDgzMDAwNDAwNFowQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCq2QsnpddKa8kR8gt-vA9VEusmZorO2S-vbINESl_vgl_PJICxJntGEX47Fd1DDc76k_3GujB58pb9CVQcLZ3-ca4xBv6hEqbf7VGNJdlUmL6V31uaLBLUMfEySd5hdTIpu4K8C1BsXVfomETR-eBTaEKo7U6rad09i8wEBquSFVf5S7J71JehWC4rsigucyf3uMHNqTzZudQy7Dr4g3o1z8GDPMMNrN8NB6XUfnHR60daMf2EzZU2v746EHu58MN3kAveFfbqRrcWd5-tDS7K-u-_1JBNmgg_vgVE_HIXLJ-H3nSUSgujW4YOVJzkyLbU8xAJiSJ_NeLBYjJyJhCNAgMBAAGjggUkMIIFIDCBnQYDVR0gBIGVMIGSMAwGCisGAQQBgjd7AQEwZgYKKwYBBAGCN3sCAjBYMFYGCCsGAQUFBwICMEoeSAAzADMAZQAwADEAOQAyADEALQA0AGQANgA0AC0ANABmADgAYwAtAGEAMAA1ADUALQA1AGIAZABhAGYAZgBkADUAZQAzADMAZDAMBgorBgEEAYI3ewMCMAwGCisGAQQBgjd7BAIwDAYDVR0TAQH_BAIwADAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDgYDVR0PAQH_BAQDAgWgMB0GA1UdDgQWBBRvNYqFx4fDp-iV_6CV_JvtWzks-DAfBgNVHSMEGDAWgBQU0jfg9tZ9ft2NurplqwSUJeCWHTCCAfsGA1UdHwSCAfIwggHuMHugeaB3hnVodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwfaB7oHmGd2h0dHA6Ly9zZWNvbmRhcnktY2RuLnBraS5jb3JlLndpbmRvd3MubmV0L3dlc3RjZW50cmFsdXMvY3Jscy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxLzI1L2N1cnJlbnQuY3JsMGygaqBohmZodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwgYGgf6B9hntodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwggIABggrBgEFBQcBAQSCAfIwggHuMH4GCCsGAQUFBzAChnJodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jYWNlcnRzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvY2VydC5jZXIwgYAGCCsGAQUFBzAChnRodHRwOi8vc2Vjb25kYXJ5LWNkbi5wa2kuY29yZS53aW5kb3dzLm5ldC93ZXN0Y2VudHJhbHVzL2NhY2VydHMvY2NtZXdlc3RjZW50cmFsdXNwa2kvY2NtZXdlc3RjZW50cmFsdXNpY2EwMS9jZXJ0LmNlcjBvBggrBgEFBQcwAoZjaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3dlc3RjZW50cmFsdXMvY2FjZXJ0cy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxL2NlcnQuY2VyMHgGCCsGAQUFBzAChmxodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEwDQYJKoZIhvcNAQELBQADggEBAHyESoM-hJA8co5aYFKQj6Yb2naSt-_hW50RjbHBbcf7c32Ujn8L-srkiIyVxkEpzXn0sgWpC8m9Wmwi-IXcD8wG3oPqMrn5ZYvIwrFdrlRwKg23jUltqn23uy8oAzIxCBsBblPSNyWSbEL5Vi52YbLITPHu4uEC7Exy9jJvn6cttL4bste7Sfve85Dd-RbogDrr8HBad8-CN8sHHSyii8mKaK7rq75VE6arRrM28SQgrKJDPrv40C9I6Z5pK40CEUfpYyWTzS6FkLMf7SIjhz0Ilua9xqzb0IO32oVtuv4c-GmmjyJy8FRZzgEYbW_CUh19Gx-9L_Sd5ZzebW5exxE&s=hu6x1lIVAeKDd1SS2tY54dzTkGMhoFF9KJFtO3RXgX1HRs4X9XCLpdYBRvUV3Wi3iYgFMpaB4d8qeKCVyXjIHqx9kNKQRYHr1pTOVBhZUaYQEmjrfJ-UxRFONoX-pVugmVqtUW4EVbi-NxKD3f6OvKXoVYWs9C2LGSuneew6t5KdvQOWDXCei1XLQNMupy2ueiHdUotsaI_mv1nFXc1BgUwtDpQxHducJ_nedpkOFTiaF9LodrTp_MbKsiwxqzSMvQyYgVEptlTFFdKNhmfbPm5EJqyPrk0xH5x2GcHt9AUqMzyyEtLTVvBezBw03RxS3i6QsyBM1q_ZV2-QV_N-cA&h=QUAAK8DlPAd1Lakf7lC2WtqoDzuq-IYe8YUOLz12ub4 response: body: string: '{"status":"Succeeded"}' @@ -731,9 +623,9 @@ interactions: api-supported-versions: - 2023-01-01-preview, 2023-06-01-preview, 2023-07-01, 2023-08-01-preview, 2023-11-01-preview, 2024-01-01-preview, 2024-11-01-preview, 2025-03-01-preview, 2025-04-01, 2025-05-01-preview, - 2025-09-01-preview + 2025-06-01-preview, 2025-09-01-preview, 2025-11-01, 2025-12-01-preview, 2026-01-01-preview azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1/operationStatuses/credentialsets-45388d24-0473-4888-84b8-8ab931968750?api-version=2023-01-01-preview&t=638829601885967597&c=MIIHhzCCBm-gAwIBAgITHgbLuWlxY4-k_d1algAABsu5aTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjUwNDE5MTMxMzMyWhcNMjUxMDE2MTMxMzMyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMvHJaUg0aA6C-P-W7rBOoZfQCieq667lznMrFDPEeiLJs-W58e8I_jHbBheje2C5g9-qBPHK6VQBBfZrcs9tzrupbS7wUKQvBkbEEqj19vo7jPtiN4hWOYzxijvMpObILP6eyLeXsL3K6b3th6Mzu1YEGETh8Lh9lsKsgT-uiTSC52uYnO63jpJBr83ivLckQDLkpMN21cpEJpaenMoBGBtKAmREs19pJv5r4HQS73KA4NZgjOChwFPAD7cIPY8jFZduW--1Ej4woncGGu117cZcM1yffltg1tqs5vmfgVc4ru4VoMm2UUdWXj6t8VoG1yJ8zasfOiUeO4CjEJgU0ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFghfmRS4WsmTQCAWQCAQcwggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBQDmHWGUrNZmFtIfL14RXoPR4LL6zAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwIwDAYKKwYBBAGCN3sEAjAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAJcF-z2HGOD5vBAPAiibLynJVPemcCzI2SbO4rX-E6AhWLEMIGFO4peavwLv9iPrFKY29lbs6SxVSu5q_hj7y932SCf-JNEeue2cfiDCPv3T6f2-EAZTfMXrH_G7MaJXKiT0W9b7aewbcPT4xAGaldOb8n9yZp0vrNp9qEtWLm-_bvUf_3_eHf6Iml0lQ01vTCc-k265OG5t1GXtk819ayqNBui5LchwPrubIwRT_p2bmkDy4M-NKrweDScQY2PyCsUp_kdZXbvXoLWAHVgrY7Jq_YDJtDv71360dQ2_5FYlmToG9vPIsDq3H-rE22IKrM8CQsR3ta6g7CXSflNNquQ&s=c01CdnGr_zQJ2XaxphCgOXdToOCK7NQ4fplxR9fvyoZKJW9DImLWgXLDxA9BS-Vv-p0n321b0zVcmr-Zx2bpg4OdOXzJjML7eAhn0EE0C9qPROCqcyb0nSgAyEaelTaSTHPcwy9kVWrs3PIHZWLSZQP-FZhbyHajGUXkTWE-rB-LkF9smzAE8eLaP5q62GshpCsm_MyCqOjxG8JzroB5GvTf7HeW0240BexVLfh-4xX2aPi0aOf0iZ2opvMLh8Qr56wnGM8sEG1PAafKLIfTmwQOxM-SwNm9MkXWdYbpvQOfMmm8ld9gyBWum5WuISFeUdGmJiEP6P7wnuKvKT1gFA&h=2xzEFU1GAclxjRTXfbs_YiDkTcqoTWLMGYp_Ubsjiow + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1/operationStatuses/credentialsets-1e2ddb6a-d238-411b-be6a-5006c9e1b087?api-version=2026-01-01-preview&t=639099043817170808&c=MIIIJjCCBw6gAwIBAgIQXAg_KQfqNmXWsnKmcWm-CjANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBXQ1VTIENBIDAxMB4XDTI2MDMwMzE4NDAwNFoXDTI2MDgzMDAwNDAwNFowQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCq2QsnpddKa8kR8gt-vA9VEusmZorO2S-vbINESl_vgl_PJICxJntGEX47Fd1DDc76k_3GujB58pb9CVQcLZ3-ca4xBv6hEqbf7VGNJdlUmL6V31uaLBLUMfEySd5hdTIpu4K8C1BsXVfomETR-eBTaEKo7U6rad09i8wEBquSFVf5S7J71JehWC4rsigucyf3uMHNqTzZudQy7Dr4g3o1z8GDPMMNrN8NB6XUfnHR60daMf2EzZU2v746EHu58MN3kAveFfbqRrcWd5-tDS7K-u-_1JBNmgg_vgVE_HIXLJ-H3nSUSgujW4YOVJzkyLbU8xAJiSJ_NeLBYjJyJhCNAgMBAAGjggUkMIIFIDCBnQYDVR0gBIGVMIGSMAwGCisGAQQBgjd7AQEwZgYKKwYBBAGCN3sCAjBYMFYGCCsGAQUFBwICMEoeSAAzADMAZQAwADEAOQAyADEALQA0AGQANgA0AC0ANABmADgAYwAtAGEAMAA1ADUALQA1AGIAZABhAGYAZgBkADUAZQAzADMAZDAMBgorBgEEAYI3ewMCMAwGCisGAQQBgjd7BAIwDAYDVR0TAQH_BAIwADAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDgYDVR0PAQH_BAQDAgWgMB0GA1UdDgQWBBRvNYqFx4fDp-iV_6CV_JvtWzks-DAfBgNVHSMEGDAWgBQU0jfg9tZ9ft2NurplqwSUJeCWHTCCAfsGA1UdHwSCAfIwggHuMHugeaB3hnVodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwfaB7oHmGd2h0dHA6Ly9zZWNvbmRhcnktY2RuLnBraS5jb3JlLndpbmRvd3MubmV0L3dlc3RjZW50cmFsdXMvY3Jscy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxLzI1L2N1cnJlbnQuY3JsMGygaqBohmZodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwgYGgf6B9hntodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwggIABggrBgEFBQcBAQSCAfIwggHuMH4GCCsGAQUFBzAChnJodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jYWNlcnRzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvY2VydC5jZXIwgYAGCCsGAQUFBzAChnRodHRwOi8vc2Vjb25kYXJ5LWNkbi5wa2kuY29yZS53aW5kb3dzLm5ldC93ZXN0Y2VudHJhbHVzL2NhY2VydHMvY2NtZXdlc3RjZW50cmFsdXNwa2kvY2NtZXdlc3RjZW50cmFsdXNpY2EwMS9jZXJ0LmNlcjBvBggrBgEFBQcwAoZjaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3dlc3RjZW50cmFsdXMvY2FjZXJ0cy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxL2NlcnQuY2VyMHgGCCsGAQUFBzAChmxodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEwDQYJKoZIhvcNAQELBQADggEBAHyESoM-hJA8co5aYFKQj6Yb2naSt-_hW50RjbHBbcf7c32Ujn8L-srkiIyVxkEpzXn0sgWpC8m9Wmwi-IXcD8wG3oPqMrn5ZYvIwrFdrlRwKg23jUltqn23uy8oAzIxCBsBblPSNyWSbEL5Vi52YbLITPHu4uEC7Exy9jJvn6cttL4bste7Sfve85Dd-RbogDrr8HBad8-CN8sHHSyii8mKaK7rq75VE6arRrM28SQgrKJDPrv40C9I6Z5pK40CEUfpYyWTzS6FkLMf7SIjhz0Ilua9xqzb0IO32oVtuv4c-GmmjyJy8FRZzgEYbW_CUh19Gx-9L_Sd5ZzebW5exxE&s=qVmAHM9wJt5NgHkGQsRTQ0ftR-2ju-Gp7BPEEY2zaEMJkK2aUYKJlufvfzn7I2LPkNOGjPB6btSirmj-FHqp31ItXFmKM4yAlENToL0aeowYWRHFVmJcq-AZtQdqkRLWGg5lbUNBLgYtfjI714GCwC1LC8jzPqUSPGnNBtKDl4HLYO_Qte2zyJ7KSNXnNEtYNHvGYV11AHGXYLmHBnF1wKz1vooP2dB8PWxAFSVIi_IIyrOZrDQ-D1WRkLuYPn3Zl4jEiB_fQvrbdJ3J6JKL2MTgKbh7ZP062i17Kz-DXQgiw5BF0pCNAXuzg0DG4lW-BcYTabU7JNoj1eU8ML7YdA&h=hgmS8A2Cv9WkQymgN2wWwvDsArUZHjaFsBuvdtC9UJg cache-control: - no-cache content-length: @@ -741,7 +633,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 16 May 2025 02:43:08 GMT + - Mon, 23 Mar 2026 23:13:01 GMT expires: - '-1' pragma: @@ -753,11 +645,11 @@ interactions: x-content-type-options: - nosniff x-ms-operation-identifier: - - tenantId=54826b22-38d6-4fb2-bad9-b7b93a3e9c5a,objectId=d44a2991-98c6-47c3-b59b-2b30d72cfcc2/japanwest/8300e66e-63cb-4a71-978d-e3a571379091 + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=1de06a28-1a3a-4047-8877-0fb23647661b/westus/a96c3227-ad64-4d9a-92a8-3cf17718029d x-ms-ratelimit-remaining-subscription-global-reads: - - '3749' + - '16499' x-msedge-ref: - - 'Ref A: 16874BE73B764390AB99AC842A2B9EC4 Ref B: TYO201100117023 Ref C: 2025-05-16T02:43:07Z' + - 'Ref A: 1B2BB803D33741E082A4E7113C8164F8 Ref B: CO6AA3150220035 Ref C: 2026-03-23T23:13:01Z' status: code: 200 message: OK @@ -775,29 +667,28 @@ interactions: ParameterSetName: - -n -r -p User-Agent: - - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1?api-version=2023-01-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1?api-version=2026-01-01-preview response: body: - string: '{"type":"Microsoft.ContainerRegistry/registries/credentialSets","identity":{"principalId":"7cf980a9-7474-4691-8576-90fc596e283d","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","type":"systemAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1","name":"test1","systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-05-16T02:43:06.2206229+00:00","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-16T02:43:06.2206229+00:00"},"properties":{"loginServer":"mcr.microsoft.com","authCredentials":[{"name":"Credential1","usernameSecretIdentifier":"https://cliimportkv73021.vault.azure.net/secrets/SPusername","passwordSecretIdentifier":"https://cliimportkv73021.vault.azure.net/secrets/SPusername","credentialHealth":{"status":"Unhealthy","errorCode":"invalid_grant","errorMessage":"AADSTS53003: - Access has been blocked by Conditional Access policies. The access policy - does not allow token issuance. Trace ID: c39a850a-2c34-4212-8caa-254dac9a3f00 - Correlation ID: 6ed2d012-1b2d-4bd7-830b-89775a83dcd9 Timestamp: 2025-05-16 - 02:43:09Z"}}],"creationDate":"2025-05-16T02:42:54.6464883+00:00","provisioningState":"Succeeded"}}' + string: '{"type":"Microsoft.ContainerRegistry/registries/credentialSets","identity":{"principalId":"5f1cdd77-6d0e-41c9-bc61-f024e6c54f84","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"systemAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1","name":"test1","systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-23T23:13:01.0984229+00:00","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-23T23:13:01.0984229+00:00"},"properties":{"loginServer":"mcr.microsoft.com","authCredentials":[{"name":"Credential1","usernameSecretIdentifier":"https://cliimportkv73021.vault.azure.net/secrets/SPusername","passwordSecretIdentifier":"https://cliimportkv73021.vault.azure.net/secrets/SPusername","credentialHealth":{"status":"Unhealthy","errorCode":"Forbidden","errorMessage":"The + user, group or application ''name=microsoft.containerregistry/registries;appid=722cb8a2-0245-48cb-b863-b1c8f892fa7a;oid=5f1cdd77-6d0e-41c9-bc61-f024e6c54f84;iss=https://sts.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47/'' + does not have secrets get permission on key vault ''cliimportkv73021;location=westus''. + For help resolving this issue, please see https://go.microsoft.com/fwlink/?linkid=2125287"}}],"creationDate":"2026-03-23T23:12:57.2477507+00:00","provisioningState":"Succeeded"}}' headers: api-supported-versions: - 2023-01-01-preview, 2023-06-01-preview, 2023-07-01, 2023-08-01-preview, 2023-11-01-preview, 2024-01-01-preview, 2024-11-01-preview, 2025-03-01-preview, 2025-04-01, 2025-05-01-preview, - 2025-09-01-preview + 2025-06-01-preview, 2025-09-01-preview, 2025-11-01, 2025-12-01-preview, 2026-01-01-preview cache-control: - no-cache content-length: - - '1317' + - '1466' content-type: - application/json; charset=utf-8 date: - - Fri, 16 May 2025 02:43:09 GMT + - Mon, 23 Mar 2026 23:13:02 GMT expires: - '-1' pragma: @@ -809,11 +700,11 @@ interactions: x-content-type-options: - nosniff x-ms-operation-identifier: - - tenantId=54826b22-38d6-4fb2-bad9-b7b93a3e9c5a,objectId=d44a2991-98c6-47c3-b59b-2b30d72cfcc2/japanwest/7dc74496-2431-4d47-8791-f08ae9d742e7 + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=1de06a28-1a3a-4047-8877-0fb23647661b/westus/18732ad7-bfe6-4668-b8db-bbbf4c9fe176 x-ms-ratelimit-remaining-subscription-global-reads: - - '3749' + - '16499' x-msedge-ref: - - 'Ref A: B045B374A7594B44BE92415E14E9528D Ref B: TYO201100117023 Ref C: 2025-05-16T02:43:08Z' + - 'Ref A: DA62F40D8E06439B9938BCA04F6A79CF Ref B: CO6AA3150218027 Ref C: 2026-03-23T23:13:02Z' status: code: 200 message: OK @@ -831,21 +722,21 @@ interactions: ParameterSetName: - -n -r -s -t -c User-Agent: - - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resources?$filter=resourceType%20eq%20%27Microsoft.ContainerRegistry%2Fregistries%27&api-version=2024-11-01 response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002","name":"clireg000002","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-05-16T02:42:30.4558651Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-16T02:42:30.4558651Z"}}]}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvarga","name":"anvarga","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dev-anvarga/providers/Microsoft.ManagedIdentity/userAssignedIdentities/anvargaidentity":{"principalId":"bf7b10eb-1784-40fb-bc60-2bc2c780d6a4","clientId":"c8deb855-42ed-432b-99f5-dc9cbc6c8d02"}}},"tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-04-20T21:35:14.9732943Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-10-17T18:24:37.9722734Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvargadev","name":"anvargadev","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus3","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2024-10-16T00:02:46.5515473Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2024-10-16T00:02:46.5515473Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/anvarga-artifactcache/providers/Microsoft.ContainerRegistry/registries/anvargasd","name":"anvargasd","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"australiaeast","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-09-03T18:42:30.1306296Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-07T01:16:30.8836181Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvargacuseuap","name":"anvargacuseuap","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"centraluseuap","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-10-17T05:09:28.2847833Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-10-17T05:09:28.2847833Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvargatargetregistry","name":"anvargatargetregistry","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-11-14T21:32:22.1211214Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-11-14T21:32:22.1211214Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvargacuseuap2","name":"anvargacuseuap2","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"centraluseuap","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-01-16T23:59:03.139671Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-01-16T23:59:03.139671Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/anvarga-artifactcache/providers/Microsoft.ContainerRegistry/registries/anvargaupstreamfirewall","name":"anvargaupstreamfirewall","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-02T19:52:04.3843475Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-02T19:54:36.3753519Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/acranvargalogs","name":"acranvargalogs","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-11T22:00:56.7502595Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-11T22:00:56.7502595Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/abac-artifact-cache/providers/Microsoft.ContainerRegistry/registries/abacupstream","name":"abacupstream","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-16T22:05:31.24Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-16T22:05:31.24Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/abac-artifact-cache/providers/Microsoft.ContainerRegistry/registries/abacdownstream","name":"abacdownstream","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-16T22:06:06.547017Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-16T22:06:06.547017Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf002","name":"perf002","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:47.0749168Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:47.0749168Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf005","name":"perf005","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:36:04.5870512Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-18T14:51:49.3136858Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf000","name":"perf000","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:35.5817756Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:35.5817756Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf003","name":"perf003","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:52.6000756Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:52.6000756Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf001","name":"perf001","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:40.8123499Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:40.8123499Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf004","name":"perf004","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:58.8025388Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:58.8025388Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002","name":"clireg000002","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-23T23:12:43.689915Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-23T23:12:43.689915Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/anvarga-demo/providers/Microsoft.ContainerRegistry/registries/anvargadownstream","name":"anvargadownstream","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus2euap","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-01-28T23:23:41.5959636Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-01-28T23:29:01.5110085Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/anvarga-demo/providers/Microsoft.ContainerRegistry/registries/anvargaupstream","name":"anvargaupstream","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus2euap","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-01-28T23:24:03.8642396Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-01-28T23:24:03.8642396Z"}}]}' headers: cache-control: - no-cache content-length: - - '534' + - '10255' content-type: - application/json; charset=utf-8 date: - - Fri, 16 May 2025 02:43:10 GMT + - Mon, 23 Mar 2026 23:13:02 GMT expires: - '-1' pragma: @@ -857,16 +748,15 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-global-reads: - - '3749' + - '16499' x-msedge-ref: - - 'Ref A: 3B53B0B5FBC94FE8925D0AEA1054816B Ref B: TYO201151004040 Ref C: 2025-05-16T02:43:10Z' + - 'Ref A: 7C3B05734C0E44239FB83B44E15AF790 Ref B: CO6AA3150220051 Ref C: 2026-03-23T23:13:02Z' status: code: 200 message: OK - request: - body: '{"properties": {"credentialSetResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1", - "sourceRepository": "mcr.microsoft.com/mcr/hello-world", "targetRepository": - "hello-world"}}' + body: '{"properties": {"sourceRepository": "mcr.microsoft.com/mcr/hello-world", + "targetRepository": "hello-world", "credentialSetResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1"}}' headers: Accept: - application/json @@ -883,18 +773,17 @@ interactions: ParameterSetName: - -n -r -s -t -c User-Agent: - - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test1?api-version=2023-01-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test1?api-version=2026-01-01-preview response: body: - string: '{"type":"Microsoft.ContainerRegistry/registries/cacheRules","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test1","name":"test1","systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-05-16T02:43:11.9522532+00:00","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-16T02:43:11.9522532+00:00"},"properties":{"credentialSetResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1","sourceRepository":"mcr.microsoft.com/mcr/hello-world","targetRepository":"hello-world","creationDate":"2025-05-16T02:43:12.5128891+00:00","provisioningState":"Creating"}}' + string: '{"type":"Microsoft.ContainerRegistry/registries/cacheRules","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test1","name":"test1","systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-23T23:13:03.1912554+00:00","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-23T23:13:03.1912554+00:00"},"properties":{"credentialSetResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1","sourceRepository":"mcr.microsoft.com/mcr/hello-world","targetRepository":"hello-world","creationDate":"2026-03-23T23:13:03.3858295+00:00","provisioningState":"Creating"}}' headers: api-supported-versions: - - 2023-01-01-preview, 2023-06-01-preview, 2023-07-01, 2023-08-01-preview, 2023-11-01-preview, - 2024-11-01-preview, 2025-03-01-preview, 2025-04-01, 2025-05-01-preview + - 2026-01-01-preview azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test1/operationStatuses/cacherules-ab168647-ed48-40a3-a040-231b5762e089?api-version=2023-01-01-preview&t=638829601926241492&c=MIIHpTCCBo2gAwIBAgITOgWXBJzHWActAOyA9gAEBZcEnDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjUwNDE4MDkxNjUyWhcNMjUxMDE1MDkxNjUyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALJ4tFzYjQAGXlMN4RVSj_Zp98bnnigeY99sbhZrAOQOjxR_04cAp0TrBwLXaA2b6MkNp3EWrqmwj8LAHlmiUmx_C5YeMG8WQUVkZMbfJNmAjSKJvmH2VO_H9OVOiiWemCFWlBXZMT6O1LsK-KI4EQtlTwXEv4-zXiqUQqjqHZQX6IJGxxcuw3R6KS00hFc9B4Ve9K9uvRk3OzuC_2evEuKFQfmIkhFu9gMtFnEBgp0E5Srek5Sh6WRO2V6wjcdtrFJ2dMStIbypiaJysxjNaLwTxBjKAJiyxkrxbuS0IPj2v4oOwkFSl9khCWu-ivje49N19yGiq_5BL-QYySfUPF0CAwEAAaOCBJIwggSOMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFghfmRS4WsmTQCAWQCAQcwggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBQpIRfJ6SPCR16Dy9sN1AQtQKjWNDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwIwDAYKKwYBBAGCN3sEAjAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBACBpx57mqT5wt5VuFMhMv-QcXTs5QrWkz021CcXp44eWUSJBLP35O0JDRyA13V3zowD9Dkl6HKRosiwIhfUwb1VWxMZt1K97bfrlhekU_IFyRNImksBTl4Hg5mL7M4PQvDu_hNxb1NW9JnL8B4LEl-FVcKtOFC8R2wp_2vglSGujfVsEzQMXxCECc_j-T0saauGgdaItgRGQ-1JrKdhZ1FvHWU2eeab0zXatBPn7nyaNmU7DK2icP38PQp3g8yPPlpv1joUzz1GMBJXhtHRWCv93tVfT5q9DZQ-_S2H_1Y2raeucg8kUfGEvVuQ27w1bGi2QRDLtEtuNHgzpR3RB7os&s=ci2_WuLuvUFWKQCFOOlFL3L2uaVZr_Oniu757BQs4fIL1SfhBgn9iXo7gxZZbypO8vjD4b4QKm1rH6N3Z6CNQOFG5rrEX9O78BSCBtOH3FliCI87kdga7z2oLJaq6pOJurrITx0HdEBKxratuJEMhECWRgSx-XMu3eSscz3EK1Sp4gw_erWjNZYjiHle79_o7ZMw7kfSblRxLUgc62EwTAiva9ljvG_Lb0L0OOw0HSppICcxeRQqFl1ly-5kANWU-0II7tznC4Lq2CPaVNLDEaIdbj_3WsQhKTyJmTIITHxQGqpJCjOpzuLfCLIWAAsgPX1SE817sonDviamrqq_yQ&h=OXWmwcJ4lvpPPQ63b8lejRHEf_0F2rW4BmRqnvtt_q0 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test1/operationStatuses/cacherules-1b981bd9-6de0-41d2-b700-9a9335242a21?api-version=2026-01-01-preview&t=639099043834256388&c=MIIIJjCCBw6gAwIBAgIQXAg_KQfqNmXWsnKmcWm-CjANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBXQ1VTIENBIDAxMB4XDTI2MDMwMzE4NDAwNFoXDTI2MDgzMDAwNDAwNFowQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCq2QsnpddKa8kR8gt-vA9VEusmZorO2S-vbINESl_vgl_PJICxJntGEX47Fd1DDc76k_3GujB58pb9CVQcLZ3-ca4xBv6hEqbf7VGNJdlUmL6V31uaLBLUMfEySd5hdTIpu4K8C1BsXVfomETR-eBTaEKo7U6rad09i8wEBquSFVf5S7J71JehWC4rsigucyf3uMHNqTzZudQy7Dr4g3o1z8GDPMMNrN8NB6XUfnHR60daMf2EzZU2v746EHu58MN3kAveFfbqRrcWd5-tDS7K-u-_1JBNmgg_vgVE_HIXLJ-H3nSUSgujW4YOVJzkyLbU8xAJiSJ_NeLBYjJyJhCNAgMBAAGjggUkMIIFIDCBnQYDVR0gBIGVMIGSMAwGCisGAQQBgjd7AQEwZgYKKwYBBAGCN3sCAjBYMFYGCCsGAQUFBwICMEoeSAAzADMAZQAwADEAOQAyADEALQA0AGQANgA0AC0ANABmADgAYwAtAGEAMAA1ADUALQA1AGIAZABhAGYAZgBkADUAZQAzADMAZDAMBgorBgEEAYI3ewMCMAwGCisGAQQBgjd7BAIwDAYDVR0TAQH_BAIwADAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDgYDVR0PAQH_BAQDAgWgMB0GA1UdDgQWBBRvNYqFx4fDp-iV_6CV_JvtWzks-DAfBgNVHSMEGDAWgBQU0jfg9tZ9ft2NurplqwSUJeCWHTCCAfsGA1UdHwSCAfIwggHuMHugeaB3hnVodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwfaB7oHmGd2h0dHA6Ly9zZWNvbmRhcnktY2RuLnBraS5jb3JlLndpbmRvd3MubmV0L3dlc3RjZW50cmFsdXMvY3Jscy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxLzI1L2N1cnJlbnQuY3JsMGygaqBohmZodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwgYGgf6B9hntodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwggIABggrBgEFBQcBAQSCAfIwggHuMH4GCCsGAQUFBzAChnJodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jYWNlcnRzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvY2VydC5jZXIwgYAGCCsGAQUFBzAChnRodHRwOi8vc2Vjb25kYXJ5LWNkbi5wa2kuY29yZS53aW5kb3dzLm5ldC93ZXN0Y2VudHJhbHVzL2NhY2VydHMvY2NtZXdlc3RjZW50cmFsdXNwa2kvY2NtZXdlc3RjZW50cmFsdXNpY2EwMS9jZXJ0LmNlcjBvBggrBgEFBQcwAoZjaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3dlc3RjZW50cmFsdXMvY2FjZXJ0cy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxL2NlcnQuY2VyMHgGCCsGAQUFBzAChmxodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEwDQYJKoZIhvcNAQELBQADggEBAHyESoM-hJA8co5aYFKQj6Yb2naSt-_hW50RjbHBbcf7c32Ujn8L-srkiIyVxkEpzXn0sgWpC8m9Wmwi-IXcD8wG3oPqMrn5ZYvIwrFdrlRwKg23jUltqn23uy8oAzIxCBsBblPSNyWSbEL5Vi52YbLITPHu4uEC7Exy9jJvn6cttL4bste7Sfve85Dd-RbogDrr8HBad8-CN8sHHSyii8mKaK7rq75VE6arRrM28SQgrKJDPrv40C9I6Z5pK40CEUfpYyWTzS6FkLMf7SIjhz0Ilua9xqzb0IO32oVtuv4c-GmmjyJy8FRZzgEYbW_CUh19Gx-9L_Sd5ZzebW5exxE&s=XjQ_penM0GmAsXegWVzqFF8ZeEzGwZt5FTe5TB3rRBl0ZGjGsHUilftC-HAg2ZyNXs4h5Phl-RRtEonaEWUsQ24QEEtK1dThUTp71_EScT65Dc25o2SfOwiwgF-jaWA7kfh1QY1Z9FXmbmbK5laJbiHkrbL2oSDHD6Cj1aKfZgRATnNKXaLs7FqoQhBjeTyB_MvhYtFS_TUUBrwckok6_a15xh4cermhLOdJ05v7EB3ySRAnoi3nDwoUjzqtVtW7TTHblOxGgYWYt_ykr2sjC7NnU0NXq10GFjxfavJFRhcV6bLmVI9mCJ7ban_iR8GwD_-QXmWs_2TGsgZ8iLElvA&h=-X_gv8tifGbtt1nOHlNMDwpL4RqaxHul_ucclpoMu1A cache-control: - no-cache content-length: @@ -902,7 +791,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 16 May 2025 02:43:12 GMT + - Mon, 23 Mar 2026 23:13:03 GMT expires: - '-1' pragma: @@ -914,13 +803,13 @@ interactions: x-content-type-options: - nosniff x-ms-operation-identifier: - - tenantId=54826b22-38d6-4fb2-bad9-b7b93a3e9c5a,objectId=d44a2991-98c6-47c3-b59b-2b30d72cfcc2/japaneast/6b99e743-2b83-43f5-8abd-0f8935c9473d + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=1de06a28-1a3a-4047-8877-0fb23647661b/westus/9304d1cf-dbcb-4fe7-8802-524e225fdb15 x-ms-ratelimit-remaining-subscription-global-writes: - - '2999' + - '11999' x-ms-ratelimit-remaining-subscription-writes: - - '199' + - '799' x-msedge-ref: - - 'Ref A: 2EA49B4FE1314968BCC5AE31F99BB5F8 Ref B: TYO201100114047 Ref C: 2025-05-16T02:43:11Z' + - 'Ref A: DA1C60F8CE18448CA475E7E3EA18DC2A Ref B: MWH011020809029 Ref C: 2026-03-23T23:13:02Z' status: code: 201 message: Created @@ -938,18 +827,17 @@ interactions: ParameterSetName: - -n -r -s -t -c User-Agent: - - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test1/operationStatuses/cacherules-ab168647-ed48-40a3-a040-231b5762e089?api-version=2023-01-01-preview&t=638829601926241492&c=MIIHpTCCBo2gAwIBAgITOgWXBJzHWActAOyA9gAEBZcEnDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjUwNDE4MDkxNjUyWhcNMjUxMDE1MDkxNjUyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALJ4tFzYjQAGXlMN4RVSj_Zp98bnnigeY99sbhZrAOQOjxR_04cAp0TrBwLXaA2b6MkNp3EWrqmwj8LAHlmiUmx_C5YeMG8WQUVkZMbfJNmAjSKJvmH2VO_H9OVOiiWemCFWlBXZMT6O1LsK-KI4EQtlTwXEv4-zXiqUQqjqHZQX6IJGxxcuw3R6KS00hFc9B4Ve9K9uvRk3OzuC_2evEuKFQfmIkhFu9gMtFnEBgp0E5Srek5Sh6WRO2V6wjcdtrFJ2dMStIbypiaJysxjNaLwTxBjKAJiyxkrxbuS0IPj2v4oOwkFSl9khCWu-ivje49N19yGiq_5BL-QYySfUPF0CAwEAAaOCBJIwggSOMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFghfmRS4WsmTQCAWQCAQcwggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBQpIRfJ6SPCR16Dy9sN1AQtQKjWNDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwIwDAYKKwYBBAGCN3sEAjAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBACBpx57mqT5wt5VuFMhMv-QcXTs5QrWkz021CcXp44eWUSJBLP35O0JDRyA13V3zowD9Dkl6HKRosiwIhfUwb1VWxMZt1K97bfrlhekU_IFyRNImksBTl4Hg5mL7M4PQvDu_hNxb1NW9JnL8B4LEl-FVcKtOFC8R2wp_2vglSGujfVsEzQMXxCECc_j-T0saauGgdaItgRGQ-1JrKdhZ1FvHWU2eeab0zXatBPn7nyaNmU7DK2icP38PQp3g8yPPlpv1joUzz1GMBJXhtHRWCv93tVfT5q9DZQ-_S2H_1Y2raeucg8kUfGEvVuQ27w1bGi2QRDLtEtuNHgzpR3RB7os&s=ci2_WuLuvUFWKQCFOOlFL3L2uaVZr_Oniu757BQs4fIL1SfhBgn9iXo7gxZZbypO8vjD4b4QKm1rH6N3Z6CNQOFG5rrEX9O78BSCBtOH3FliCI87kdga7z2oLJaq6pOJurrITx0HdEBKxratuJEMhECWRgSx-XMu3eSscz3EK1Sp4gw_erWjNZYjiHle79_o7ZMw7kfSblRxLUgc62EwTAiva9ljvG_Lb0L0OOw0HSppICcxeRQqFl1ly-5kANWU-0II7tznC4Lq2CPaVNLDEaIdbj_3WsQhKTyJmTIITHxQGqpJCjOpzuLfCLIWAAsgPX1SE817sonDviamrqq_yQ&h=OXWmwcJ4lvpPPQ63b8lejRHEf_0F2rW4BmRqnvtt_q0 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test1/operationStatuses/cacherules-1b981bd9-6de0-41d2-b700-9a9335242a21?api-version=2026-01-01-preview&t=639099043834256388&c=MIIIJjCCBw6gAwIBAgIQXAg_KQfqNmXWsnKmcWm-CjANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBXQ1VTIENBIDAxMB4XDTI2MDMwMzE4NDAwNFoXDTI2MDgzMDAwNDAwNFowQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCq2QsnpddKa8kR8gt-vA9VEusmZorO2S-vbINESl_vgl_PJICxJntGEX47Fd1DDc76k_3GujB58pb9CVQcLZ3-ca4xBv6hEqbf7VGNJdlUmL6V31uaLBLUMfEySd5hdTIpu4K8C1BsXVfomETR-eBTaEKo7U6rad09i8wEBquSFVf5S7J71JehWC4rsigucyf3uMHNqTzZudQy7Dr4g3o1z8GDPMMNrN8NB6XUfnHR60daMf2EzZU2v746EHu58MN3kAveFfbqRrcWd5-tDS7K-u-_1JBNmgg_vgVE_HIXLJ-H3nSUSgujW4YOVJzkyLbU8xAJiSJ_NeLBYjJyJhCNAgMBAAGjggUkMIIFIDCBnQYDVR0gBIGVMIGSMAwGCisGAQQBgjd7AQEwZgYKKwYBBAGCN3sCAjBYMFYGCCsGAQUFBwICMEoeSAAzADMAZQAwADEAOQAyADEALQA0AGQANgA0AC0ANABmADgAYwAtAGEAMAA1ADUALQA1AGIAZABhAGYAZgBkADUAZQAzADMAZDAMBgorBgEEAYI3ewMCMAwGCisGAQQBgjd7BAIwDAYDVR0TAQH_BAIwADAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDgYDVR0PAQH_BAQDAgWgMB0GA1UdDgQWBBRvNYqFx4fDp-iV_6CV_JvtWzks-DAfBgNVHSMEGDAWgBQU0jfg9tZ9ft2NurplqwSUJeCWHTCCAfsGA1UdHwSCAfIwggHuMHugeaB3hnVodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwfaB7oHmGd2h0dHA6Ly9zZWNvbmRhcnktY2RuLnBraS5jb3JlLndpbmRvd3MubmV0L3dlc3RjZW50cmFsdXMvY3Jscy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxLzI1L2N1cnJlbnQuY3JsMGygaqBohmZodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwgYGgf6B9hntodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwggIABggrBgEFBQcBAQSCAfIwggHuMH4GCCsGAQUFBzAChnJodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jYWNlcnRzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvY2VydC5jZXIwgYAGCCsGAQUFBzAChnRodHRwOi8vc2Vjb25kYXJ5LWNkbi5wa2kuY29yZS53aW5kb3dzLm5ldC93ZXN0Y2VudHJhbHVzL2NhY2VydHMvY2NtZXdlc3RjZW50cmFsdXNwa2kvY2NtZXdlc3RjZW50cmFsdXNpY2EwMS9jZXJ0LmNlcjBvBggrBgEFBQcwAoZjaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3dlc3RjZW50cmFsdXMvY2FjZXJ0cy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxL2NlcnQuY2VyMHgGCCsGAQUFBzAChmxodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEwDQYJKoZIhvcNAQELBQADggEBAHyESoM-hJA8co5aYFKQj6Yb2naSt-_hW50RjbHBbcf7c32Ujn8L-srkiIyVxkEpzXn0sgWpC8m9Wmwi-IXcD8wG3oPqMrn5ZYvIwrFdrlRwKg23jUltqn23uy8oAzIxCBsBblPSNyWSbEL5Vi52YbLITPHu4uEC7Exy9jJvn6cttL4bste7Sfve85Dd-RbogDrr8HBad8-CN8sHHSyii8mKaK7rq75VE6arRrM28SQgrKJDPrv40C9I6Z5pK40CEUfpYyWTzS6FkLMf7SIjhz0Ilua9xqzb0IO32oVtuv4c-GmmjyJy8FRZzgEYbW_CUh19Gx-9L_Sd5ZzebW5exxE&s=XjQ_penM0GmAsXegWVzqFF8ZeEzGwZt5FTe5TB3rRBl0ZGjGsHUilftC-HAg2ZyNXs4h5Phl-RRtEonaEWUsQ24QEEtK1dThUTp71_EScT65Dc25o2SfOwiwgF-jaWA7kfh1QY1Z9FXmbmbK5laJbiHkrbL2oSDHD6Cj1aKfZgRATnNKXaLs7FqoQhBjeTyB_MvhYtFS_TUUBrwckok6_a15xh4cermhLOdJ05v7EB3ySRAnoi3nDwoUjzqtVtW7TTHblOxGgYWYt_ykr2sjC7NnU0NXq10GFjxfavJFRhcV6bLmVI9mCJ7ban_iR8GwD_-QXmWs_2TGsgZ8iLElvA&h=-X_gv8tifGbtt1nOHlNMDwpL4RqaxHul_ucclpoMu1A response: body: string: '{"status":"Succeeded"}' headers: api-supported-versions: - - 2023-01-01-preview, 2023-06-01-preview, 2023-07-01, 2023-08-01-preview, 2023-11-01-preview, - 2024-11-01-preview, 2025-03-01-preview, 2025-04-01, 2025-05-01-preview + - 2026-01-01-preview azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test1/operationStatuses/cacherules-ab168647-ed48-40a3-a040-231b5762e089?api-version=2023-01-01-preview&t=638829601937262317&c=MIIHpTCCBo2gAwIBAgITOgWXBJzHWActAOyA9gAEBZcEnDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjUwNDE4MDkxNjUyWhcNMjUxMDE1MDkxNjUyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALJ4tFzYjQAGXlMN4RVSj_Zp98bnnigeY99sbhZrAOQOjxR_04cAp0TrBwLXaA2b6MkNp3EWrqmwj8LAHlmiUmx_C5YeMG8WQUVkZMbfJNmAjSKJvmH2VO_H9OVOiiWemCFWlBXZMT6O1LsK-KI4EQtlTwXEv4-zXiqUQqjqHZQX6IJGxxcuw3R6KS00hFc9B4Ve9K9uvRk3OzuC_2evEuKFQfmIkhFu9gMtFnEBgp0E5Srek5Sh6WRO2V6wjcdtrFJ2dMStIbypiaJysxjNaLwTxBjKAJiyxkrxbuS0IPj2v4oOwkFSl9khCWu-ivje49N19yGiq_5BL-QYySfUPF0CAwEAAaOCBJIwggSOMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFghfmRS4WsmTQCAWQCAQcwggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBQpIRfJ6SPCR16Dy9sN1AQtQKjWNDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwIwDAYKKwYBBAGCN3sEAjAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBACBpx57mqT5wt5VuFMhMv-QcXTs5QrWkz021CcXp44eWUSJBLP35O0JDRyA13V3zowD9Dkl6HKRosiwIhfUwb1VWxMZt1K97bfrlhekU_IFyRNImksBTl4Hg5mL7M4PQvDu_hNxb1NW9JnL8B4LEl-FVcKtOFC8R2wp_2vglSGujfVsEzQMXxCECc_j-T0saauGgdaItgRGQ-1JrKdhZ1FvHWU2eeab0zXatBPn7nyaNmU7DK2icP38PQp3g8yPPlpv1joUzz1GMBJXhtHRWCv93tVfT5q9DZQ-_S2H_1Y2raeucg8kUfGEvVuQ27w1bGi2QRDLtEtuNHgzpR3RB7os&s=d7de7uA2JWCdA0jVo1zRf-zACwjveBiCxAPUysuhkh1JDGlRPSe9JQJSaZAKNFOWYDtbjhSgHA8X-SJb681IEg6O2INf6XnfA6IZpxdk8kUkuvdS5gKByhHV3m-XOs1f79arGB2lFc53eGufiRZUO1AOE1yaEepAgtVnWlR0IVslGfyjRX9FOvENBw1rar79dccAIi7SWLtC1UjqT-9AAyoopvhjMwiIDubjshxZQImwnH27Sf9rBHHTjU_URIP1FUvQ5Zn1CmBjhQY8orh1xZjMOyigTFMV9e_gB506a9iB2oWyqKV16878iL-dO9KQ9Ka8QD857wpYDBvh4Soc4g&h=iF-nWo2gQEk6cg-YY6qogAQUTvMZEfB3wg8oCP12bl0 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test1/operationStatuses/cacherules-1b981bd9-6de0-41d2-b700-9a9335242a21?api-version=2026-01-01-preview&t=639099043839243841&c=MIIIJjCCBw6gAwIBAgIQXAg_KQfqNmXWsnKmcWm-CjANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBXQ1VTIENBIDAxMB4XDTI2MDMwMzE4NDAwNFoXDTI2MDgzMDAwNDAwNFowQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCq2QsnpddKa8kR8gt-vA9VEusmZorO2S-vbINESl_vgl_PJICxJntGEX47Fd1DDc76k_3GujB58pb9CVQcLZ3-ca4xBv6hEqbf7VGNJdlUmL6V31uaLBLUMfEySd5hdTIpu4K8C1BsXVfomETR-eBTaEKo7U6rad09i8wEBquSFVf5S7J71JehWC4rsigucyf3uMHNqTzZudQy7Dr4g3o1z8GDPMMNrN8NB6XUfnHR60daMf2EzZU2v746EHu58MN3kAveFfbqRrcWd5-tDS7K-u-_1JBNmgg_vgVE_HIXLJ-H3nSUSgujW4YOVJzkyLbU8xAJiSJ_NeLBYjJyJhCNAgMBAAGjggUkMIIFIDCBnQYDVR0gBIGVMIGSMAwGCisGAQQBgjd7AQEwZgYKKwYBBAGCN3sCAjBYMFYGCCsGAQUFBwICMEoeSAAzADMAZQAwADEAOQAyADEALQA0AGQANgA0AC0ANABmADgAYwAtAGEAMAA1ADUALQA1AGIAZABhAGYAZgBkADUAZQAzADMAZDAMBgorBgEEAYI3ewMCMAwGCisGAQQBgjd7BAIwDAYDVR0TAQH_BAIwADAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDgYDVR0PAQH_BAQDAgWgMB0GA1UdDgQWBBRvNYqFx4fDp-iV_6CV_JvtWzks-DAfBgNVHSMEGDAWgBQU0jfg9tZ9ft2NurplqwSUJeCWHTCCAfsGA1UdHwSCAfIwggHuMHugeaB3hnVodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwfaB7oHmGd2h0dHA6Ly9zZWNvbmRhcnktY2RuLnBraS5jb3JlLndpbmRvd3MubmV0L3dlc3RjZW50cmFsdXMvY3Jscy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxLzI1L2N1cnJlbnQuY3JsMGygaqBohmZodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwgYGgf6B9hntodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwggIABggrBgEFBQcBAQSCAfIwggHuMH4GCCsGAQUFBzAChnJodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jYWNlcnRzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvY2VydC5jZXIwgYAGCCsGAQUFBzAChnRodHRwOi8vc2Vjb25kYXJ5LWNkbi5wa2kuY29yZS53aW5kb3dzLm5ldC93ZXN0Y2VudHJhbHVzL2NhY2VydHMvY2NtZXdlc3RjZW50cmFsdXNwa2kvY2NtZXdlc3RjZW50cmFsdXNpY2EwMS9jZXJ0LmNlcjBvBggrBgEFBQcwAoZjaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3dlc3RjZW50cmFsdXMvY2FjZXJ0cy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxL2NlcnQuY2VyMHgGCCsGAQUFBzAChmxodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEwDQYJKoZIhvcNAQELBQADggEBAHyESoM-hJA8co5aYFKQj6Yb2naSt-_hW50RjbHBbcf7c32Ujn8L-srkiIyVxkEpzXn0sgWpC8m9Wmwi-IXcD8wG3oPqMrn5ZYvIwrFdrlRwKg23jUltqn23uy8oAzIxCBsBblPSNyWSbEL5Vi52YbLITPHu4uEC7Exy9jJvn6cttL4bste7Sfve85Dd-RbogDrr8HBad8-CN8sHHSyii8mKaK7rq75VE6arRrM28SQgrKJDPrv40C9I6Z5pK40CEUfpYyWTzS6FkLMf7SIjhz0Ilua9xqzb0IO32oVtuv4c-GmmjyJy8FRZzgEYbW_CUh19Gx-9L_Sd5ZzebW5exxE&s=VSvrc1OtdWkWFflsllCq2hXWHN-a_-xFiN89PvLEHKX2MkoEnxJOhRGYh8Kkj5nmlOwDM8Nkcp4otpqyrgDYusF3Ud8opOUI-mnUWlEVHedfKOp4QodPdjQx3iXLU0YW4CimkXpJrnDJqjMhRQhXk4RuEwNQ9Fspr365mo_LM-lbx3by3DX0gPGqpFiotzxfWY0J1Zrf4cb8X5U06iszU3y-ADKqXIK_lf4iDWKeyHIfXdrLqMJWtpCQHlJxMyfppFtF0fbqIfEZGA9zLVv6yH_L7srckvXhztu0R3vSHIVw199Yecv82wW-0X9DuOgv9LXd3kDHykZXAIpRX17Z-Q&h=oSa3WZfgcioIfz3qiykKxWuCPka9GYSfDEQhtdEp3Ac cache-control: - no-cache content-length: @@ -957,7 +845,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 16 May 2025 02:43:13 GMT + - Mon, 23 Mar 2026 23:13:03 GMT expires: - '-1' pragma: @@ -969,11 +857,11 @@ interactions: x-content-type-options: - nosniff x-ms-operation-identifier: - - tenantId=54826b22-38d6-4fb2-bad9-b7b93a3e9c5a,objectId=d44a2991-98c6-47c3-b59b-2b30d72cfcc2/japaneast/85796f07-b01a-46fe-98bc-c53a6cf45e81 + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=1de06a28-1a3a-4047-8877-0fb23647661b/westus/43617a81-c8cc-4466-a907-1ac28269a7ad x-ms-ratelimit-remaining-subscription-global-reads: - - '3749' + - '16499' x-msedge-ref: - - 'Ref A: 71C9ED8DAEA04AB2A745CA862AF36DE9 Ref B: TYO201100114047 Ref C: 2025-05-16T02:43:13Z' + - 'Ref A: C1A2E7DE6B1045D2A001C307DB1A01BE Ref B: MWH011020808042 Ref C: 2026-03-23T23:13:03Z' status: code: 200 message: OK @@ -991,16 +879,15 @@ interactions: ParameterSetName: - -n -r -s -t -c User-Agent: - - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test1?api-version=2023-01-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test1?api-version=2026-01-01-preview response: body: - string: '{"type":"Microsoft.ContainerRegistry/registries/cacheRules","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test1","name":"test1","systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-05-16T02:43:11.9522532+00:00","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-16T02:43:11.9522532+00:00"},"properties":{"credentialSetResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1","sourceRepository":"mcr.microsoft.com/mcr/hello-world","targetRepository":"hello-world","creationDate":"2025-05-16T02:43:12.5128891+00:00","provisioningState":"Succeeded"}}' + string: '{"type":"Microsoft.ContainerRegistry/registries/cacheRules","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test1","name":"test1","systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-23T23:13:03.1912554+00:00","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-23T23:13:03.1912554+00:00"},"properties":{"credentialSetResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1","sourceRepository":"mcr.microsoft.com/mcr/hello-world","targetRepository":"hello-world","creationDate":"2026-03-23T23:13:03.3858295+00:00","provisioningState":"Succeeded"}}' headers: api-supported-versions: - - 2023-01-01-preview, 2023-06-01-preview, 2023-07-01, 2023-08-01-preview, 2023-11-01-preview, - 2024-11-01-preview, 2025-03-01-preview, 2025-04-01, 2025-05-01-preview + - 2026-01-01-preview cache-control: - no-cache content-length: @@ -1008,7 +895,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 16 May 2025 02:43:13 GMT + - Mon, 23 Mar 2026 23:13:03 GMT expires: - '-1' pragma: @@ -1020,11 +907,11 @@ interactions: x-content-type-options: - nosniff x-ms-operation-identifier: - - tenantId=54826b22-38d6-4fb2-bad9-b7b93a3e9c5a,objectId=d44a2991-98c6-47c3-b59b-2b30d72cfcc2/japaneast/9907b134-c2a3-4ae6-a754-6d92e8972eca + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=1de06a28-1a3a-4047-8877-0fb23647661b/westus/1569a45b-b88d-4715-944f-ea5b4e5e0bf5 x-ms-ratelimit-remaining-subscription-global-reads: - - '3748' + - '16499' x-msedge-ref: - - 'Ref A: C05D3AD48EF84ADC9185FA1D6D4A8579 Ref B: TYO201100114047 Ref C: 2025-05-16T02:43:13Z' + - 'Ref A: E1465A37D29345DB9C39C52695B59D42 Ref B: MWH011020808031 Ref C: 2026-03-23T23:13:04Z' status: code: 200 message: OK @@ -1042,16 +929,15 @@ interactions: ParameterSetName: - -r -g User-Agent: - - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules?api-version=2023-01-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules?api-version=2026-01-01-preview response: body: - string: '{"value":[{"type":"Microsoft.ContainerRegistry/registries/cacheRules","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test1","name":"test1","systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-05-16T02:43:11.9522532+00:00","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-16T02:43:11.9522532+00:00"},"properties":{"credentialSetResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1","sourceRepository":"mcr.microsoft.com/mcr/hello-world","targetRepository":"hello-world","creationDate":"2025-05-16T02:43:12.5128891+00:00","provisioningState":"Succeeded"}}]}' + string: '{"value":[{"type":"Microsoft.ContainerRegistry/registries/cacheRules","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test1","name":"test1","systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-23T23:13:03.1912554+00:00","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-23T23:13:03.1912554+00:00"},"properties":{"credentialSetResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1","sourceRepository":"mcr.microsoft.com/mcr/hello-world","targetRepository":"hello-world","creationDate":"2026-03-23T23:13:03.3858295+00:00","provisioningState":"Succeeded"}}]}' headers: api-supported-versions: - - 2023-01-01-preview, 2023-06-01-preview, 2023-07-01, 2023-08-01-preview, 2023-11-01-preview, - 2024-11-01-preview, 2025-03-01-preview, 2025-04-01, 2025-05-01-preview + - 2026-01-01-preview cache-control: - no-cache content-length: @@ -1059,7 +945,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 16 May 2025 02:43:18 GMT + - Mon, 23 Mar 2026 23:13:03 GMT expires: - '-1' pragma: @@ -1071,11 +957,11 @@ interactions: x-content-type-options: - nosniff x-ms-operation-identifier: - - tenantId=54826b22-38d6-4fb2-bad9-b7b93a3e9c5a,objectId=d44a2991-98c6-47c3-b59b-2b30d72cfcc2/japaneast/1d96730f-d63c-4f18-8f10-3d55f269ed1e + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=1de06a28-1a3a-4047-8877-0fb23647661b/westus/aeda037c-05a9-44b1-8248-879933975cf9 x-ms-ratelimit-remaining-subscription-global-reads: - - '3749' + - '16499' x-msedge-ref: - - 'Ref A: F1FC7A80F871444593B6B768DC76EBB5 Ref B: TYO201151005060 Ref C: 2025-05-16T02:43:15Z' + - 'Ref A: 60F376DDD5B84AD9A6C68F7E91BAF229 Ref B: MWH011020809052 Ref C: 2026-03-23T23:13:04Z' status: code: 200 message: OK @@ -1093,16 +979,15 @@ interactions: ParameterSetName: - -n -r -g User-Agent: - - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test1?api-version=2023-01-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test1?api-version=2026-01-01-preview response: body: - string: '{"type":"Microsoft.ContainerRegistry/registries/cacheRules","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test1","name":"test1","systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-05-16T02:43:11.9522532+00:00","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-16T02:43:11.9522532+00:00"},"properties":{"credentialSetResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1","sourceRepository":"mcr.microsoft.com/mcr/hello-world","targetRepository":"hello-world","creationDate":"2025-05-16T02:43:12.5128891+00:00","provisioningState":"Succeeded"}}' + string: '{"type":"Microsoft.ContainerRegistry/registries/cacheRules","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test1","name":"test1","systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-23T23:13:03.1912554+00:00","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-23T23:13:03.1912554+00:00"},"properties":{"credentialSetResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1","sourceRepository":"mcr.microsoft.com/mcr/hello-world","targetRepository":"hello-world","creationDate":"2026-03-23T23:13:03.3858295+00:00","provisioningState":"Succeeded"}}' headers: api-supported-versions: - - 2023-01-01-preview, 2023-06-01-preview, 2023-07-01, 2023-08-01-preview, 2023-11-01-preview, - 2024-11-01-preview, 2025-03-01-preview, 2025-04-01, 2025-05-01-preview + - 2026-01-01-preview cache-control: - no-cache content-length: @@ -1110,7 +995,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 16 May 2025 02:43:18 GMT + - Mon, 23 Mar 2026 23:13:04 GMT expires: - '-1' pragma: @@ -1122,11 +1007,11 @@ interactions: x-content-type-options: - nosniff x-ms-operation-identifier: - - tenantId=54826b22-38d6-4fb2-bad9-b7b93a3e9c5a,objectId=d44a2991-98c6-47c3-b59b-2b30d72cfcc2/japaneast/0aa00936-b63a-4e83-8c67-6474c24029f1 + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=1de06a28-1a3a-4047-8877-0fb23647661b/westus/0ce10c4f-c344-48f6-ad38-6e3a4b2acd3b x-ms-ratelimit-remaining-subscription-global-reads: - - '3749' + - '16499' x-msedge-ref: - - 'Ref A: 883E26C1F6114B868CA5FCDF93AE0607 Ref B: TYO201151003023 Ref C: 2025-05-16T02:43:19Z' + - 'Ref A: EB9791A4478C4632B1C76BECE52B96AB Ref B: CO6AA3150217047 Ref C: 2026-03-23T23:13:04Z' status: code: 200 message: OK @@ -1144,21 +1029,21 @@ interactions: ParameterSetName: - -n -r --remove-cred-set User-Agent: - - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resources?$filter=resourceType%20eq%20%27Microsoft.ContainerRegistry%2Fregistries%27&api-version=2024-11-01 response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002","name":"clireg000002","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-05-16T02:42:30.4558651Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-16T02:42:30.4558651Z"}}]}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvarga","name":"anvarga","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dev-anvarga/providers/Microsoft.ManagedIdentity/userAssignedIdentities/anvargaidentity":{"principalId":"bf7b10eb-1784-40fb-bc60-2bc2c780d6a4","clientId":"c8deb855-42ed-432b-99f5-dc9cbc6c8d02"}}},"tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-04-20T21:35:14.9732943Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-10-17T18:24:37.9722734Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvargadev","name":"anvargadev","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus3","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2024-10-16T00:02:46.5515473Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2024-10-16T00:02:46.5515473Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/anvarga-artifactcache/providers/Microsoft.ContainerRegistry/registries/anvargasd","name":"anvargasd","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"australiaeast","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-09-03T18:42:30.1306296Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-07T01:16:30.8836181Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvargacuseuap","name":"anvargacuseuap","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"centraluseuap","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-10-17T05:09:28.2847833Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-10-17T05:09:28.2847833Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvargatargetregistry","name":"anvargatargetregistry","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-11-14T21:32:22.1211214Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-11-14T21:32:22.1211214Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvargacuseuap2","name":"anvargacuseuap2","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"centraluseuap","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-01-16T23:59:03.139671Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-01-16T23:59:03.139671Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/anvarga-artifactcache/providers/Microsoft.ContainerRegistry/registries/anvargaupstreamfirewall","name":"anvargaupstreamfirewall","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-02T19:52:04.3843475Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-02T19:54:36.3753519Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/acranvargalogs","name":"acranvargalogs","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-11T22:00:56.7502595Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-11T22:00:56.7502595Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/abac-artifact-cache/providers/Microsoft.ContainerRegistry/registries/abacupstream","name":"abacupstream","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-16T22:05:31.24Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-16T22:05:31.24Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/abac-artifact-cache/providers/Microsoft.ContainerRegistry/registries/abacdownstream","name":"abacdownstream","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-16T22:06:06.547017Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-16T22:06:06.547017Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf002","name":"perf002","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:47.0749168Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:47.0749168Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf005","name":"perf005","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:36:04.5870512Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-18T14:51:49.3136858Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf000","name":"perf000","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:35.5817756Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:35.5817756Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf003","name":"perf003","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:52.6000756Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:52.6000756Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf001","name":"perf001","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:40.8123499Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:40.8123499Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf004","name":"perf004","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:58.8025388Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:58.8025388Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002","name":"clireg000002","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-23T23:12:43.689915Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-23T23:12:43.689915Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/anvarga-demo/providers/Microsoft.ContainerRegistry/registries/anvargadownstream","name":"anvargadownstream","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus2euap","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-01-28T23:23:41.5959636Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-01-28T23:29:01.5110085Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/anvarga-demo/providers/Microsoft.ContainerRegistry/registries/anvargaupstream","name":"anvargaupstream","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus2euap","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-01-28T23:24:03.8642396Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-01-28T23:24:03.8642396Z"}}]}' headers: cache-control: - no-cache content-length: - - '534' + - '10255' content-type: - application/json; charset=utf-8 date: - - Fri, 16 May 2025 02:43:20 GMT + - Mon, 23 Mar 2026 23:13:05 GMT expires: - '-1' pragma: @@ -1170,9 +1055,9 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-global-reads: - - '3746' + - '16499' x-msedge-ref: - - 'Ref A: 7D3AD79D75364473A060E1B2BABE13D3 Ref B: TYO201151001054 Ref C: 2025-05-16T02:43:20Z' + - 'Ref A: 1C09A381A728401497BEA00B8E7CBF0B Ref B: MWH011020809025 Ref C: 2026-03-23T23:13:05Z' status: code: 200 message: OK @@ -1194,26 +1079,25 @@ interactions: ParameterSetName: - -n -r --remove-cred-set User-Agent: - - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test1?api-version=2023-01-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test1?api-version=2026-01-01-preview response: body: - string: '{"type":"Microsoft.ContainerRegistry/registries/cacheRules","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test1","name":"test1","systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-05-16T02:43:21.541891+00:00","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-16T02:43:21.541891+00:00"},"properties":{"credentialSetResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1","sourceRepository":"mcr.microsoft.com/mcr/hello-world","targetRepository":"hello-world","creationDate":"2025-05-16T02:43:12.5128891+00:00","provisioningState":"Updating"}}' + string: '{"type":"Microsoft.ContainerRegistry/registries/cacheRules","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test1","name":"test1","systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-23T23:13:05.90577+00:00","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-23T23:13:05.90577+00:00"},"properties":{"credentialSetResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1","sourceRepository":"mcr.microsoft.com/mcr/hello-world","targetRepository":"hello-world","creationDate":"2026-03-23T23:13:03.3858295+00:00","provisioningState":"Updating"}}' headers: api-supported-versions: - - 2023-01-01-preview, 2023-06-01-preview, 2023-07-01, 2023-08-01-preview, 2023-11-01-preview, - 2024-11-01-preview, 2025-03-01-preview, 2025-04-01, 2025-05-01-preview + - 2026-01-01-preview azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test1/operationStatuses/cacherules-9182c05a-1a97-403d-86cf-d88422a35a3d?api-version=2023-01-01-preview&t=638829602020263325&c=MIIHpTCCBo2gAwIBAgITOgWXBJzHWActAOyA9gAEBZcEnDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjUwNDE4MDkxNjUyWhcNMjUxMDE1MDkxNjUyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALJ4tFzYjQAGXlMN4RVSj_Zp98bnnigeY99sbhZrAOQOjxR_04cAp0TrBwLXaA2b6MkNp3EWrqmwj8LAHlmiUmx_C5YeMG8WQUVkZMbfJNmAjSKJvmH2VO_H9OVOiiWemCFWlBXZMT6O1LsK-KI4EQtlTwXEv4-zXiqUQqjqHZQX6IJGxxcuw3R6KS00hFc9B4Ve9K9uvRk3OzuC_2evEuKFQfmIkhFu9gMtFnEBgp0E5Srek5Sh6WRO2V6wjcdtrFJ2dMStIbypiaJysxjNaLwTxBjKAJiyxkrxbuS0IPj2v4oOwkFSl9khCWu-ivje49N19yGiq_5BL-QYySfUPF0CAwEAAaOCBJIwggSOMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFghfmRS4WsmTQCAWQCAQcwggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBQpIRfJ6SPCR16Dy9sN1AQtQKjWNDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwIwDAYKKwYBBAGCN3sEAjAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBACBpx57mqT5wt5VuFMhMv-QcXTs5QrWkz021CcXp44eWUSJBLP35O0JDRyA13V3zowD9Dkl6HKRosiwIhfUwb1VWxMZt1K97bfrlhekU_IFyRNImksBTl4Hg5mL7M4PQvDu_hNxb1NW9JnL8B4LEl-FVcKtOFC8R2wp_2vglSGujfVsEzQMXxCECc_j-T0saauGgdaItgRGQ-1JrKdhZ1FvHWU2eeab0zXatBPn7nyaNmU7DK2icP38PQp3g8yPPlpv1joUzz1GMBJXhtHRWCv93tVfT5q9DZQ-_S2H_1Y2raeucg8kUfGEvVuQ27w1bGi2QRDLtEtuNHgzpR3RB7os&s=cUSAL4xe1jgwiwib5jvqvGtAaiJWh-SDCkhq3hHZRJ_pxE2VS5ZH6fjQaUdvOjExuV5Dz9xVgTN9WFm3FsB1STgbEKDHZjZ3r0ypsm_7En84yMorMR23DODa_H6Yui0Vu9axb84xMgrmQmn0ID2VO-VzPSbMaCcq8BNE2xhwzAY9WmevPp0tHz3GfY_rAuF3EBa9SnafOw89mHabLSVeSx9E4XnwNVojNMfr3dPvxF-UN_uHE0bxvwGto-zBK6cGdxo5xEZ2PmDajOCUSv8VH46N6ujvx_E9LzS4nk3qc3qD0GFVCjXFeev59xE3hy3Stk-F9Su-eilTztjxtVrzBA&h=b3olwoJPA1HR1r8e3b9vE-GGDttmt3oZjWDXg1OHzks + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test1/operationStatuses/cacherules-8605378b-22a2-486b-ab82-e372bc48ab0d?api-version=2026-01-01-preview&t=639099043862495223&c=MIIHlDCCBnygAwIBAgIQbRZBCnyTTrdKyx3sn6-cIjANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBFVVMyIENBIDAxMB4XDTI2MDIyNDE4NDcwN1oXDTI2MDgyMDAwNDcwN1owQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDLYIfsKK3BxfjRY95DQ7nTiHuQIybDAR8CX9yInjq_0E3Mb9YwMAQGJklR1lZJqg9M7got1ThcwNEpPovodQrXAzXRPqJ0JyNpNf1UNLgRs-3_mYbXxvSrBdgdZL4WUq9XCQ9WaH2aM3MAuLy8FL835sRe_Zx46G3TsI9Grsv5U-8gTr440L6nsopLTJJzQCpxou4KEuTMiG2GpVzxExJwvUDuutVCxXnsUwksDnhFUbqcJ7mVhhK5If25oHTNYUQwYylqvq_5eVdfEXEzpbP3XfDdKxljTnSMHaniaYcYW3OmhIMmdnHNFiPA9LQ2DtYs_7T68xnPVpbVO0EZ2Em5AgMBAAGjggSSMIIEjjCBnQYDVR0gBIGVMIGSMAwGCisGAQQBgjd7AQEwZgYKKwYBBAGCN3sCAjBYMFYGCCsGAQUFBwICMEoeSAAzADMAZQAwADEAOQAyADEALQA0AGQANgA0AC0ANABmADgAYwAtAGEAMAA1ADUALQA1AGIAZABhAGYAZgBkADUAZQAzADMAZDAMBgorBgEEAYI3ewMCMAwGCisGAQQBgjd7BAIwDAYDVR0TAQH_BAIwADAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDgYDVR0PAQH_BAQDAgWgMB0GA1UdDgQWBBQixmODlrY3K7hS01rA8V_TZUhMsjAfBgNVHSMEGDAWgBT87D7bqnwfgh4FuKEG-UPnArMKuTCCAbIGA1UdHwSCAakwggGlMGmgZ6BlhmNodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvZWFzdHVzMi9jcmxzL2NjbWVlYXN0dXMycGtpL2NjbWVlYXN0dXMyaWNhMDEvNjUvY3VycmVudC5jcmwwa6BpoGeGZWh0dHA6Ly9zZWNvbmRhcnktY2RuLnBraS5jb3JlLndpbmRvd3MubmV0L2Vhc3R1czIvY3Jscy9jY21lZWFzdHVzMnBraS9jY21lZWFzdHVzMmljYTAxLzY1L2N1cnJlbnQuY3JsMFqgWKBWhlRodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vZWFzdHVzMi9jcmxzL2NjbWVlYXN0dXMycGtpL2NjbWVlYXN0dXMyaWNhMDEvNjUvY3VycmVudC5jcmwwb6BtoGuGaWh0dHA6Ly9jY21lZWFzdHVzMnBraS5lYXN0dXMyLnBraS5jb3JlLndpbmRvd3MubmV0L2NlcnRpZmljYXRlQXV0aG9yaXRpZXMvY2NtZWVhc3R1czJpY2EwMS82NS9jdXJyZW50LmNybDCCAbcGCCsGAQUFBwEBBIIBqTCCAaUwbAYIKwYBBQUHMAKGYGh0dHA6Ly9wcmltYXJ5LWNkbi5wa2kuY29yZS53aW5kb3dzLm5ldC9lYXN0dXMyL2NhY2VydHMvY2NtZWVhc3R1czJwa2kvY2NtZWVhc3R1czJpY2EwMS9jZXJ0LmNlcjBuBggrBgEFBQcwAoZiaHR0cDovL3NlY29uZGFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvZWFzdHVzMi9jYWNlcnRzL2NjbWVlYXN0dXMycGtpL2NjbWVlYXN0dXMyaWNhMDEvY2VydC5jZXIwXQYIKwYBBQUHMAKGUWh0dHA6Ly9jcmwubWljcm9zb2Z0LmNvbS9lYXN0dXMyL2NhY2VydHMvY2NtZWVhc3R1czJwa2kvY2NtZWVhc3R1czJpY2EwMS9jZXJ0LmNlcjBmBggrBgEFBQcwAoZaaHR0cDovL2NjbWVlYXN0dXMycGtpLmVhc3R1czIucGtpLmNvcmUud2luZG93cy5uZXQvY2VydGlmaWNhdGVBdXRob3JpdGllcy9jY21lZWFzdHVzMmljYTAxMA0GCSqGSIb3DQEBCwUAA4IBAQBKY8uIen-4v_aGTptgf_04u1F6978whzIp4ZiTbOSXPwNnweOy6hCQUcuaqDgVZEiozCZ3DTEQooEcQdtH6WhiCDn5FLdHIVfLyo35uSdRGa9igGbbQ22s_ZI2_Sp17bV5_a-akDuAb6xVSZB_RbHXoicbUykmyHQ2aRb7wLI-YJ4X_aS00yjgBXHLbbbD1PGhTMYVk-5Qy8AYGA2_CTJ0ZS5toZF1EKxkz6ka6D_ROn4Sg7PthZX7Y3YpuVwnCelnvJvOgla_MQjpNDBcgmnVyU-ChBBd3TykrRxVWNXjEm54XPippvvwuKEdc4BCa38ZFVNgvDuK-tY_JpycugPZ&s=Se05lh8eYLfibT94PqZ_ClelJL6oDTASPt4ZOTpOPUplCPNc-3m_unpw4DVvWDR7soYoAFflpnx-dSYQ7f0o0nxZdQy39PKj-fXoPPMfqe0bJULcZ6ICeiyMP59w5PHTab3mOYLbqlxUP9i83gRq3qiQ-Hxk85wWkQAvzWRUXdSDoOyp5KRu86tsOoQwMy9KsbXmCbx73HZu8oWHccerRDuUZfwbh7tVyn1WvSi8jP3gtPZO3EIB7tvN32p9K-hWMzDQfinlf0uXzFTYHiLL_JYxLs8zcYSCbWUMCfiYaveiLdqCjMoelyOpoOV6TexbRPt--SaJcXtpSVfVIvVyfQ&h=kFeVcy4tAvQlsb6GkdMuC9dx0577N_iBv1jR9wE5VN0 cache-control: - no-cache content-length: - - '857' + - '855' content-type: - application/json; charset=utf-8 date: - - Fri, 16 May 2025 02:43:21 GMT + - Mon, 23 Mar 2026 23:13:05 GMT expires: - '-1' pragma: @@ -1225,13 +1109,13 @@ interactions: x-content-type-options: - nosniff x-ms-operation-identifier: - - tenantId=54826b22-38d6-4fb2-bad9-b7b93a3e9c5a,objectId=d44a2991-98c6-47c3-b59b-2b30d72cfcc2/japaneast/734b5016-f888-4d6a-8d58-b8e8075143e3 + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=1de06a28-1a3a-4047-8877-0fb23647661b/westus2/65481551-dfcc-41b8-aa09-1d53bb669d01 x-ms-ratelimit-remaining-subscription-global-writes: - - '2999' + - '11999' x-ms-ratelimit-remaining-subscription-writes: - - '199' + - '799' x-msedge-ref: - - 'Ref A: 7F99782EA2FE433DB06580FD14ECBC7F Ref B: TYO201100114027 Ref C: 2025-05-16T02:43:21Z' + - 'Ref A: D22B88743E374A0586335871A6CD5123 Ref B: MWH011020806040 Ref C: 2026-03-23T23:13:05Z' status: code: 201 message: Created @@ -1249,18 +1133,17 @@ interactions: ParameterSetName: - -n -r --remove-cred-set User-Agent: - - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test1/operationStatuses/cacherules-9182c05a-1a97-403d-86cf-d88422a35a3d?api-version=2023-01-01-preview&t=638829602020263325&c=MIIHpTCCBo2gAwIBAgITOgWXBJzHWActAOyA9gAEBZcEnDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjUwNDE4MDkxNjUyWhcNMjUxMDE1MDkxNjUyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALJ4tFzYjQAGXlMN4RVSj_Zp98bnnigeY99sbhZrAOQOjxR_04cAp0TrBwLXaA2b6MkNp3EWrqmwj8LAHlmiUmx_C5YeMG8WQUVkZMbfJNmAjSKJvmH2VO_H9OVOiiWemCFWlBXZMT6O1LsK-KI4EQtlTwXEv4-zXiqUQqjqHZQX6IJGxxcuw3R6KS00hFc9B4Ve9K9uvRk3OzuC_2evEuKFQfmIkhFu9gMtFnEBgp0E5Srek5Sh6WRO2V6wjcdtrFJ2dMStIbypiaJysxjNaLwTxBjKAJiyxkrxbuS0IPj2v4oOwkFSl9khCWu-ivje49N19yGiq_5BL-QYySfUPF0CAwEAAaOCBJIwggSOMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFghfmRS4WsmTQCAWQCAQcwggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBQpIRfJ6SPCR16Dy9sN1AQtQKjWNDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwIwDAYKKwYBBAGCN3sEAjAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBACBpx57mqT5wt5VuFMhMv-QcXTs5QrWkz021CcXp44eWUSJBLP35O0JDRyA13V3zowD9Dkl6HKRosiwIhfUwb1VWxMZt1K97bfrlhekU_IFyRNImksBTl4Hg5mL7M4PQvDu_hNxb1NW9JnL8B4LEl-FVcKtOFC8R2wp_2vglSGujfVsEzQMXxCECc_j-T0saauGgdaItgRGQ-1JrKdhZ1FvHWU2eeab0zXatBPn7nyaNmU7DK2icP38PQp3g8yPPlpv1joUzz1GMBJXhtHRWCv93tVfT5q9DZQ-_S2H_1Y2raeucg8kUfGEvVuQ27w1bGi2QRDLtEtuNHgzpR3RB7os&s=cUSAL4xe1jgwiwib5jvqvGtAaiJWh-SDCkhq3hHZRJ_pxE2VS5ZH6fjQaUdvOjExuV5Dz9xVgTN9WFm3FsB1STgbEKDHZjZ3r0ypsm_7En84yMorMR23DODa_H6Yui0Vu9axb84xMgrmQmn0ID2VO-VzPSbMaCcq8BNE2xhwzAY9WmevPp0tHz3GfY_rAuF3EBa9SnafOw89mHabLSVeSx9E4XnwNVojNMfr3dPvxF-UN_uHE0bxvwGto-zBK6cGdxo5xEZ2PmDajOCUSv8VH46N6ujvx_E9LzS4nk3qc3qD0GFVCjXFeev59xE3hy3Stk-F9Su-eilTztjxtVrzBA&h=b3olwoJPA1HR1r8e3b9vE-GGDttmt3oZjWDXg1OHzks + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test1/operationStatuses/cacherules-8605378b-22a2-486b-ab82-e372bc48ab0d?api-version=2026-01-01-preview&t=639099043862495223&c=MIIHlDCCBnygAwIBAgIQbRZBCnyTTrdKyx3sn6-cIjANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBFVVMyIENBIDAxMB4XDTI2MDIyNDE4NDcwN1oXDTI2MDgyMDAwNDcwN1owQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDLYIfsKK3BxfjRY95DQ7nTiHuQIybDAR8CX9yInjq_0E3Mb9YwMAQGJklR1lZJqg9M7got1ThcwNEpPovodQrXAzXRPqJ0JyNpNf1UNLgRs-3_mYbXxvSrBdgdZL4WUq9XCQ9WaH2aM3MAuLy8FL835sRe_Zx46G3TsI9Grsv5U-8gTr440L6nsopLTJJzQCpxou4KEuTMiG2GpVzxExJwvUDuutVCxXnsUwksDnhFUbqcJ7mVhhK5If25oHTNYUQwYylqvq_5eVdfEXEzpbP3XfDdKxljTnSMHaniaYcYW3OmhIMmdnHNFiPA9LQ2DtYs_7T68xnPVpbVO0EZ2Em5AgMBAAGjggSSMIIEjjCBnQYDVR0gBIGVMIGSMAwGCisGAQQBgjd7AQEwZgYKKwYBBAGCN3sCAjBYMFYGCCsGAQUFBwICMEoeSAAzADMAZQAwADEAOQAyADEALQA0AGQANgA0AC0ANABmADgAYwAtAGEAMAA1ADUALQA1AGIAZABhAGYAZgBkADUAZQAzADMAZDAMBgorBgEEAYI3ewMCMAwGCisGAQQBgjd7BAIwDAYDVR0TAQH_BAIwADAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDgYDVR0PAQH_BAQDAgWgMB0GA1UdDgQWBBQixmODlrY3K7hS01rA8V_TZUhMsjAfBgNVHSMEGDAWgBT87D7bqnwfgh4FuKEG-UPnArMKuTCCAbIGA1UdHwSCAakwggGlMGmgZ6BlhmNodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvZWFzdHVzMi9jcmxzL2NjbWVlYXN0dXMycGtpL2NjbWVlYXN0dXMyaWNhMDEvNjUvY3VycmVudC5jcmwwa6BpoGeGZWh0dHA6Ly9zZWNvbmRhcnktY2RuLnBraS5jb3JlLndpbmRvd3MubmV0L2Vhc3R1czIvY3Jscy9jY21lZWFzdHVzMnBraS9jY21lZWFzdHVzMmljYTAxLzY1L2N1cnJlbnQuY3JsMFqgWKBWhlRodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vZWFzdHVzMi9jcmxzL2NjbWVlYXN0dXMycGtpL2NjbWVlYXN0dXMyaWNhMDEvNjUvY3VycmVudC5jcmwwb6BtoGuGaWh0dHA6Ly9jY21lZWFzdHVzMnBraS5lYXN0dXMyLnBraS5jb3JlLndpbmRvd3MubmV0L2NlcnRpZmljYXRlQXV0aG9yaXRpZXMvY2NtZWVhc3R1czJpY2EwMS82NS9jdXJyZW50LmNybDCCAbcGCCsGAQUFBwEBBIIBqTCCAaUwbAYIKwYBBQUHMAKGYGh0dHA6Ly9wcmltYXJ5LWNkbi5wa2kuY29yZS53aW5kb3dzLm5ldC9lYXN0dXMyL2NhY2VydHMvY2NtZWVhc3R1czJwa2kvY2NtZWVhc3R1czJpY2EwMS9jZXJ0LmNlcjBuBggrBgEFBQcwAoZiaHR0cDovL3NlY29uZGFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvZWFzdHVzMi9jYWNlcnRzL2NjbWVlYXN0dXMycGtpL2NjbWVlYXN0dXMyaWNhMDEvY2VydC5jZXIwXQYIKwYBBQUHMAKGUWh0dHA6Ly9jcmwubWljcm9zb2Z0LmNvbS9lYXN0dXMyL2NhY2VydHMvY2NtZWVhc3R1czJwa2kvY2NtZWVhc3R1czJpY2EwMS9jZXJ0LmNlcjBmBggrBgEFBQcwAoZaaHR0cDovL2NjbWVlYXN0dXMycGtpLmVhc3R1czIucGtpLmNvcmUud2luZG93cy5uZXQvY2VydGlmaWNhdGVBdXRob3JpdGllcy9jY21lZWFzdHVzMmljYTAxMA0GCSqGSIb3DQEBCwUAA4IBAQBKY8uIen-4v_aGTptgf_04u1F6978whzIp4ZiTbOSXPwNnweOy6hCQUcuaqDgVZEiozCZ3DTEQooEcQdtH6WhiCDn5FLdHIVfLyo35uSdRGa9igGbbQ22s_ZI2_Sp17bV5_a-akDuAb6xVSZB_RbHXoicbUykmyHQ2aRb7wLI-YJ4X_aS00yjgBXHLbbbD1PGhTMYVk-5Qy8AYGA2_CTJ0ZS5toZF1EKxkz6ka6D_ROn4Sg7PthZX7Y3YpuVwnCelnvJvOgla_MQjpNDBcgmnVyU-ChBBd3TykrRxVWNXjEm54XPippvvwuKEdc4BCa38ZFVNgvDuK-tY_JpycugPZ&s=Se05lh8eYLfibT94PqZ_ClelJL6oDTASPt4ZOTpOPUplCPNc-3m_unpw4DVvWDR7soYoAFflpnx-dSYQ7f0o0nxZdQy39PKj-fXoPPMfqe0bJULcZ6ICeiyMP59w5PHTab3mOYLbqlxUP9i83gRq3qiQ-Hxk85wWkQAvzWRUXdSDoOyp5KRu86tsOoQwMy9KsbXmCbx73HZu8oWHccerRDuUZfwbh7tVyn1WvSi8jP3gtPZO3EIB7tvN32p9K-hWMzDQfinlf0uXzFTYHiLL_JYxLs8zcYSCbWUMCfiYaveiLdqCjMoelyOpoOV6TexbRPt--SaJcXtpSVfVIvVyfQ&h=kFeVcy4tAvQlsb6GkdMuC9dx0577N_iBv1jR9wE5VN0 response: body: string: '{"status":"Succeeded"}' headers: api-supported-versions: - - 2023-01-01-preview, 2023-06-01-preview, 2023-07-01, 2023-08-01-preview, 2023-11-01-preview, - 2024-11-01-preview, 2025-03-01-preview, 2025-04-01, 2025-05-01-preview + - 2026-01-01-preview azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test1/operationStatuses/cacherules-9182c05a-1a97-403d-86cf-d88422a35a3d?api-version=2023-01-01-preview&t=638829602028075163&c=MIIHpTCCBo2gAwIBAgITOgWXBJzHWActAOyA9gAEBZcEnDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjUwNDE4MDkxNjUyWhcNMjUxMDE1MDkxNjUyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALJ4tFzYjQAGXlMN4RVSj_Zp98bnnigeY99sbhZrAOQOjxR_04cAp0TrBwLXaA2b6MkNp3EWrqmwj8LAHlmiUmx_C5YeMG8WQUVkZMbfJNmAjSKJvmH2VO_H9OVOiiWemCFWlBXZMT6O1LsK-KI4EQtlTwXEv4-zXiqUQqjqHZQX6IJGxxcuw3R6KS00hFc9B4Ve9K9uvRk3OzuC_2evEuKFQfmIkhFu9gMtFnEBgp0E5Srek5Sh6WRO2V6wjcdtrFJ2dMStIbypiaJysxjNaLwTxBjKAJiyxkrxbuS0IPj2v4oOwkFSl9khCWu-ivje49N19yGiq_5BL-QYySfUPF0CAwEAAaOCBJIwggSOMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFghfmRS4WsmTQCAWQCAQcwggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBQpIRfJ6SPCR16Dy9sN1AQtQKjWNDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwIwDAYKKwYBBAGCN3sEAjAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBACBpx57mqT5wt5VuFMhMv-QcXTs5QrWkz021CcXp44eWUSJBLP35O0JDRyA13V3zowD9Dkl6HKRosiwIhfUwb1VWxMZt1K97bfrlhekU_IFyRNImksBTl4Hg5mL7M4PQvDu_hNxb1NW9JnL8B4LEl-FVcKtOFC8R2wp_2vglSGujfVsEzQMXxCECc_j-T0saauGgdaItgRGQ-1JrKdhZ1FvHWU2eeab0zXatBPn7nyaNmU7DK2icP38PQp3g8yPPlpv1joUzz1GMBJXhtHRWCv93tVfT5q9DZQ-_S2H_1Y2raeucg8kUfGEvVuQ27w1bGi2QRDLtEtuNHgzpR3RB7os&s=iT0UUZasQK_Q-yENgJGauh-xt_g2pYB6wxFQkhTvnKymMR-bPyfWy314OQLCnJHEIrFJn0M6EtlYll_v5Q8Q_-g420bue-aBKGcYszwOuxdW2XYuI0WWhUOrk-CqaOldFbmt5c-nQu2Jsy88AipuMydenMmSxboUg1oNxfHAfPqMUInaoexf9yHSC_Xg2VjW7rPQmSAlc8VNSDVDMJBybVWe6GPRptsZL3eW5PgihKLfWFYZ5rvU-ib9LccY2xDtFN1p-g0wF27W3jc721CAO8G0Tmng2Qr0pG66KmW3yto2vEFUYfZLybf5XINZNx2kMBp0uw-gZ37BqvMmo2s9_Q&h=GJ-5C_Yky99u686-bY_Xm2MLqas46L89_fvAoEp9ICU + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test1/operationStatuses/cacherules-8605378b-22a2-486b-ab82-e372bc48ab0d?api-version=2026-01-01-preview&t=639099043866632176&c=MIIIJjCCBw6gAwIBAgIQXAg_KQfqNmXWsnKmcWm-CjANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBXQ1VTIENBIDAxMB4XDTI2MDMwMzE4NDAwNFoXDTI2MDgzMDAwNDAwNFowQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCq2QsnpddKa8kR8gt-vA9VEusmZorO2S-vbINESl_vgl_PJICxJntGEX47Fd1DDc76k_3GujB58pb9CVQcLZ3-ca4xBv6hEqbf7VGNJdlUmL6V31uaLBLUMfEySd5hdTIpu4K8C1BsXVfomETR-eBTaEKo7U6rad09i8wEBquSFVf5S7J71JehWC4rsigucyf3uMHNqTzZudQy7Dr4g3o1z8GDPMMNrN8NB6XUfnHR60daMf2EzZU2v746EHu58MN3kAveFfbqRrcWd5-tDS7K-u-_1JBNmgg_vgVE_HIXLJ-H3nSUSgujW4YOVJzkyLbU8xAJiSJ_NeLBYjJyJhCNAgMBAAGjggUkMIIFIDCBnQYDVR0gBIGVMIGSMAwGCisGAQQBgjd7AQEwZgYKKwYBBAGCN3sCAjBYMFYGCCsGAQUFBwICMEoeSAAzADMAZQAwADEAOQAyADEALQA0AGQANgA0AC0ANABmADgAYwAtAGEAMAA1ADUALQA1AGIAZABhAGYAZgBkADUAZQAzADMAZDAMBgorBgEEAYI3ewMCMAwGCisGAQQBgjd7BAIwDAYDVR0TAQH_BAIwADAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDgYDVR0PAQH_BAQDAgWgMB0GA1UdDgQWBBRvNYqFx4fDp-iV_6CV_JvtWzks-DAfBgNVHSMEGDAWgBQU0jfg9tZ9ft2NurplqwSUJeCWHTCCAfsGA1UdHwSCAfIwggHuMHugeaB3hnVodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwfaB7oHmGd2h0dHA6Ly9zZWNvbmRhcnktY2RuLnBraS5jb3JlLndpbmRvd3MubmV0L3dlc3RjZW50cmFsdXMvY3Jscy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxLzI1L2N1cnJlbnQuY3JsMGygaqBohmZodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwgYGgf6B9hntodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwggIABggrBgEFBQcBAQSCAfIwggHuMH4GCCsGAQUFBzAChnJodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jYWNlcnRzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvY2VydC5jZXIwgYAGCCsGAQUFBzAChnRodHRwOi8vc2Vjb25kYXJ5LWNkbi5wa2kuY29yZS53aW5kb3dzLm5ldC93ZXN0Y2VudHJhbHVzL2NhY2VydHMvY2NtZXdlc3RjZW50cmFsdXNwa2kvY2NtZXdlc3RjZW50cmFsdXNpY2EwMS9jZXJ0LmNlcjBvBggrBgEFBQcwAoZjaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3dlc3RjZW50cmFsdXMvY2FjZXJ0cy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxL2NlcnQuY2VyMHgGCCsGAQUFBzAChmxodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEwDQYJKoZIhvcNAQELBQADggEBAHyESoM-hJA8co5aYFKQj6Yb2naSt-_hW50RjbHBbcf7c32Ujn8L-srkiIyVxkEpzXn0sgWpC8m9Wmwi-IXcD8wG3oPqMrn5ZYvIwrFdrlRwKg23jUltqn23uy8oAzIxCBsBblPSNyWSbEL5Vi52YbLITPHu4uEC7Exy9jJvn6cttL4bste7Sfve85Dd-RbogDrr8HBad8-CN8sHHSyii8mKaK7rq75VE6arRrM28SQgrKJDPrv40C9I6Z5pK40CEUfpYyWTzS6FkLMf7SIjhz0Ilua9xqzb0IO32oVtuv4c-GmmjyJy8FRZzgEYbW_CUh19Gx-9L_Sd5ZzebW5exxE&s=OY-FZTyfEj3Qgf_7JDohgFDVZlxl4I6qh_qI3U0-z7-arTczVRKuhzxEWtlJqCaMcJ6WpN6TVw0Q0VizASLFnnp76DEWBLMnICFYDytpCe0kYrk4mtu8jABsnsA6aAFzRjlOkJXf9TvsLqwUJnFV3xdAbFj8RADHM9KP_o47lGV60X1QyhUjlNGWDD8vYtZicSx-w_GxtRlL7niDsxELI4spMaxijNEiVEimIdxGJPn6HgaPamJ1yrrgPBht4ym9IXuL0e-vm8t40SMx74AdipUdtAQ5esYfx6wiBG1cjgjvP9PIRT92P-z0reHy0RMyi_blGtA7Y9jyuj4n70KhXg&h=WD3C3Xe8Inko93lT5Zx5U-Wm4w_38SYqxGAQ6ROCWu8 cache-control: - no-cache content-length: @@ -1268,7 +1151,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 16 May 2025 02:43:22 GMT + - Mon, 23 Mar 2026 23:13:06 GMT expires: - '-1' pragma: @@ -1280,11 +1163,11 @@ interactions: x-content-type-options: - nosniff x-ms-operation-identifier: - - tenantId=54826b22-38d6-4fb2-bad9-b7b93a3e9c5a,objectId=d44a2991-98c6-47c3-b59b-2b30d72cfcc2/japaneast/30278dec-8d09-4e1d-b6f1-bfd2ad2383ea + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=1de06a28-1a3a-4047-8877-0fb23647661b/westus/afb5c24a-f6ca-4280-87e9-1b7fbaf34a60 x-ms-ratelimit-remaining-subscription-global-reads: - - '3749' + - '16499' x-msedge-ref: - - 'Ref A: 7A50C08F2BAC4F11B337A0E7BBA41EAA Ref B: TYO201100114027 Ref C: 2025-05-16T02:43:22Z' + - 'Ref A: EEDA5BE2BFB4453492D9DE1625E35168 Ref B: MWH011020808036 Ref C: 2026-03-23T23:13:06Z' status: code: 200 message: OK @@ -1302,24 +1185,23 @@ interactions: ParameterSetName: - -n -r --remove-cred-set User-Agent: - - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test1?api-version=2023-01-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test1?api-version=2026-01-01-preview response: body: - string: '{"type":"Microsoft.ContainerRegistry/registries/cacheRules","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test1","name":"test1","systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-05-16T02:43:21.541891+00:00","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-16T02:43:21.541891+00:00"},"properties":{"credentialSetResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1","sourceRepository":"mcr.microsoft.com/mcr/hello-world","targetRepository":"hello-world","creationDate":"2025-05-16T02:43:12.5128891+00:00","provisioningState":"Succeeded"}}' + string: '{"type":"Microsoft.ContainerRegistry/registries/cacheRules","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test1","name":"test1","systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-23T23:13:05.90577+00:00","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-23T23:13:05.90577+00:00"},"properties":{"credentialSetResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1","sourceRepository":"mcr.microsoft.com/mcr/hello-world","targetRepository":"hello-world","creationDate":"2026-03-23T23:13:03.3858295+00:00","provisioningState":"Succeeded"}}' headers: api-supported-versions: - - 2023-01-01-preview, 2023-06-01-preview, 2023-07-01, 2023-08-01-preview, 2023-11-01-preview, - 2024-11-01-preview, 2025-03-01-preview, 2025-04-01, 2025-05-01-preview + - 2026-01-01-preview cache-control: - no-cache content-length: - - '858' + - '856' content-type: - application/json; charset=utf-8 date: - - Fri, 16 May 2025 02:43:22 GMT + - Mon, 23 Mar 2026 23:13:06 GMT expires: - '-1' pragma: @@ -1331,11 +1213,11 @@ interactions: x-content-type-options: - nosniff x-ms-operation-identifier: - - tenantId=54826b22-38d6-4fb2-bad9-b7b93a3e9c5a,objectId=d44a2991-98c6-47c3-b59b-2b30d72cfcc2/japaneast/dfcd9529-7917-4f62-adc7-e2711c6a9a73 + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=1de06a28-1a3a-4047-8877-0fb23647661b/westus/49132a55-1b8f-4c70-9a29-fa4068cc6728 x-ms-ratelimit-remaining-subscription-global-reads: - - '3749' + - '16499' x-msedge-ref: - - 'Ref A: 43B8A20A05EF45CC927B04573D5E96E9 Ref B: TYO201100114027 Ref C: 2025-05-16T02:43:22Z' + - 'Ref A: A7208127B8B7492291E7EC9D9ED62D24 Ref B: MWH011020808023 Ref C: 2026-03-23T23:13:06Z' status: code: 200 message: OK @@ -1353,21 +1235,21 @@ interactions: ParameterSetName: - -n -r -y User-Agent: - - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resources?$filter=resourceType%20eq%20%27Microsoft.ContainerRegistry%2Fregistries%27&api-version=2024-11-01 response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002","name":"clireg000002","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-05-16T02:42:30.4558651Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-16T02:42:30.4558651Z"}}]}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvarga","name":"anvarga","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dev-anvarga/providers/Microsoft.ManagedIdentity/userAssignedIdentities/anvargaidentity":{"principalId":"bf7b10eb-1784-40fb-bc60-2bc2c780d6a4","clientId":"c8deb855-42ed-432b-99f5-dc9cbc6c8d02"}}},"tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-04-20T21:35:14.9732943Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-10-17T18:24:37.9722734Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvargadev","name":"anvargadev","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus3","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2024-10-16T00:02:46.5515473Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2024-10-16T00:02:46.5515473Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/anvarga-artifactcache/providers/Microsoft.ContainerRegistry/registries/anvargasd","name":"anvargasd","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"australiaeast","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-09-03T18:42:30.1306296Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-07T01:16:30.8836181Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvargacuseuap","name":"anvargacuseuap","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"centraluseuap","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-10-17T05:09:28.2847833Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-10-17T05:09:28.2847833Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvargatargetregistry","name":"anvargatargetregistry","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-11-14T21:32:22.1211214Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-11-14T21:32:22.1211214Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvargacuseuap2","name":"anvargacuseuap2","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"centraluseuap","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-01-16T23:59:03.139671Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-01-16T23:59:03.139671Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/anvarga-artifactcache/providers/Microsoft.ContainerRegistry/registries/anvargaupstreamfirewall","name":"anvargaupstreamfirewall","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-02T19:52:04.3843475Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-02T19:54:36.3753519Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/acranvargalogs","name":"acranvargalogs","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-11T22:00:56.7502595Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-11T22:00:56.7502595Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/abac-artifact-cache/providers/Microsoft.ContainerRegistry/registries/abacupstream","name":"abacupstream","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-16T22:05:31.24Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-16T22:05:31.24Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/abac-artifact-cache/providers/Microsoft.ContainerRegistry/registries/abacdownstream","name":"abacdownstream","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-16T22:06:06.547017Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-16T22:06:06.547017Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf002","name":"perf002","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:47.0749168Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:47.0749168Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf005","name":"perf005","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:36:04.5870512Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-18T14:51:49.3136858Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf000","name":"perf000","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:35.5817756Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:35.5817756Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf003","name":"perf003","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:52.6000756Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:52.6000756Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf001","name":"perf001","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:40.8123499Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:40.8123499Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf004","name":"perf004","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:58.8025388Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:58.8025388Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002","name":"clireg000002","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-23T23:12:43.689915Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-23T23:12:43.689915Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/anvarga-demo/providers/Microsoft.ContainerRegistry/registries/anvargadownstream","name":"anvargadownstream","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus2euap","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-01-28T23:23:41.5959636Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-01-28T23:29:01.5110085Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/anvarga-demo/providers/Microsoft.ContainerRegistry/registries/anvargaupstream","name":"anvargaupstream","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus2euap","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-01-28T23:24:03.8642396Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-01-28T23:24:03.8642396Z"}}]}' headers: cache-control: - no-cache content-length: - - '534' + - '10255' content-type: - application/json; charset=utf-8 date: - - Fri, 16 May 2025 02:43:23 GMT + - Mon, 23 Mar 2026 23:13:06 GMT expires: - '-1' pragma: @@ -1379,9 +1261,9 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-global-reads: - - '3749' + - '16499' x-msedge-ref: - - 'Ref A: C83968C855B54180B94928FEA5B0DCF6 Ref B: TYO201151005054 Ref C: 2025-05-16T02:43:23Z' + - 'Ref A: 2448CAA8596B4C5EA8AE9BDC540A6DF1 Ref B: MWH011020808052 Ref C: 2026-03-23T23:13:07Z' status: code: 200 message: OK @@ -1389,7 +1271,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -1401,26 +1283,25 @@ interactions: ParameterSetName: - -n -r -y User-Agent: - - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test1?api-version=2023-01-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test1?api-version=2026-01-01-preview response: body: string: '' headers: api-supported-versions: - - 2023-01-01-preview, 2023-06-01-preview, 2023-07-01, 2023-08-01-preview, 2023-11-01-preview, - 2024-11-01-preview, 2025-03-01-preview, 2025-04-01, 2025-05-01-preview + - 2026-01-01-preview cache-control: - no-cache content-length: - '0' date: - - Fri, 16 May 2025 02:43:24 GMT + - Mon, 23 Mar 2026 23:13:06 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerRegistry/locations/WESTUS/operationResults/cacherules-ace5413b-7477-4827-9be1-5e62936073c1?api-version=2023-01-01-preview&t=638829602054860097&c=MIIHpTCCBo2gAwIBAgITOgWXBJzHWActAOyA9gAEBZcEnDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjUwNDE4MDkxNjUyWhcNMjUxMDE1MDkxNjUyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALJ4tFzYjQAGXlMN4RVSj_Zp98bnnigeY99sbhZrAOQOjxR_04cAp0TrBwLXaA2b6MkNp3EWrqmwj8LAHlmiUmx_C5YeMG8WQUVkZMbfJNmAjSKJvmH2VO_H9OVOiiWemCFWlBXZMT6O1LsK-KI4EQtlTwXEv4-zXiqUQqjqHZQX6IJGxxcuw3R6KS00hFc9B4Ve9K9uvRk3OzuC_2evEuKFQfmIkhFu9gMtFnEBgp0E5Srek5Sh6WRO2V6wjcdtrFJ2dMStIbypiaJysxjNaLwTxBjKAJiyxkrxbuS0IPj2v4oOwkFSl9khCWu-ivje49N19yGiq_5BL-QYySfUPF0CAwEAAaOCBJIwggSOMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFghfmRS4WsmTQCAWQCAQcwggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBQpIRfJ6SPCR16Dy9sN1AQtQKjWNDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwIwDAYKKwYBBAGCN3sEAjAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBACBpx57mqT5wt5VuFMhMv-QcXTs5QrWkz021CcXp44eWUSJBLP35O0JDRyA13V3zowD9Dkl6HKRosiwIhfUwb1VWxMZt1K97bfrlhekU_IFyRNImksBTl4Hg5mL7M4PQvDu_hNxb1NW9JnL8B4LEl-FVcKtOFC8R2wp_2vglSGujfVsEzQMXxCECc_j-T0saauGgdaItgRGQ-1JrKdhZ1FvHWU2eeab0zXatBPn7nyaNmU7DK2icP38PQp3g8yPPlpv1joUzz1GMBJXhtHRWCv93tVfT5q9DZQ-_S2H_1Y2raeucg8kUfGEvVuQ27w1bGi2QRDLtEtuNHgzpR3RB7os&s=dqE-r_IvbxV4De1myx07mJyGupakp_MnCooQKrIZyVg9odgnEySDcGo_7WEkODUS1MQeKay7sJqwwNhcIuaWMuKzLvt7vDIkDT-n5DwW7HxKzKGSPszA4EF1_YPuEJdsdxZz4JjjBE2wGKfXVTgfFaUxAZol0wisbXJ_nmiQ64WxD1wksHuawazlbAxJu2MymHmYSK-Nh1H-2nSPvoZMbQ5Vsp4F_8M3s8KJtbxgbydsnknZ5NLngF9K6czl6LAhp_wO3YYf0c3VsLWaxD_wr270ChdMxuOoTdRLjrDQgTiFGlIZCp3A4eefO1ECma7xiqoI6TYSGEnxvgrFMs-zUQ&h=qOweiKs6yzACKIuNzqO_lsSrtmnAw1lPl6Okx2bzl1A + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerRegistry/locations/WESTUS/operationResults/cacherules-2957dcdb-10f8-4a0d-9b0d-4ef6a941e2a0?api-version=2026-01-01-preview&t=639099043878117072&c=MIIIJjCCBw6gAwIBAgIQXAg_KQfqNmXWsnKmcWm-CjANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBXQ1VTIENBIDAxMB4XDTI2MDMwMzE4NDAwNFoXDTI2MDgzMDAwNDAwNFowQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCq2QsnpddKa8kR8gt-vA9VEusmZorO2S-vbINESl_vgl_PJICxJntGEX47Fd1DDc76k_3GujB58pb9CVQcLZ3-ca4xBv6hEqbf7VGNJdlUmL6V31uaLBLUMfEySd5hdTIpu4K8C1BsXVfomETR-eBTaEKo7U6rad09i8wEBquSFVf5S7J71JehWC4rsigucyf3uMHNqTzZudQy7Dr4g3o1z8GDPMMNrN8NB6XUfnHR60daMf2EzZU2v746EHu58MN3kAveFfbqRrcWd5-tDS7K-u-_1JBNmgg_vgVE_HIXLJ-H3nSUSgujW4YOVJzkyLbU8xAJiSJ_NeLBYjJyJhCNAgMBAAGjggUkMIIFIDCBnQYDVR0gBIGVMIGSMAwGCisGAQQBgjd7AQEwZgYKKwYBBAGCN3sCAjBYMFYGCCsGAQUFBwICMEoeSAAzADMAZQAwADEAOQAyADEALQA0AGQANgA0AC0ANABmADgAYwAtAGEAMAA1ADUALQA1AGIAZABhAGYAZgBkADUAZQAzADMAZDAMBgorBgEEAYI3ewMCMAwGCisGAQQBgjd7BAIwDAYDVR0TAQH_BAIwADAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDgYDVR0PAQH_BAQDAgWgMB0GA1UdDgQWBBRvNYqFx4fDp-iV_6CV_JvtWzks-DAfBgNVHSMEGDAWgBQU0jfg9tZ9ft2NurplqwSUJeCWHTCCAfsGA1UdHwSCAfIwggHuMHugeaB3hnVodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwfaB7oHmGd2h0dHA6Ly9zZWNvbmRhcnktY2RuLnBraS5jb3JlLndpbmRvd3MubmV0L3dlc3RjZW50cmFsdXMvY3Jscy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxLzI1L2N1cnJlbnQuY3JsMGygaqBohmZodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwgYGgf6B9hntodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwggIABggrBgEFBQcBAQSCAfIwggHuMH4GCCsGAQUFBzAChnJodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jYWNlcnRzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvY2VydC5jZXIwgYAGCCsGAQUFBzAChnRodHRwOi8vc2Vjb25kYXJ5LWNkbi5wa2kuY29yZS53aW5kb3dzLm5ldC93ZXN0Y2VudHJhbHVzL2NhY2VydHMvY2NtZXdlc3RjZW50cmFsdXNwa2kvY2NtZXdlc3RjZW50cmFsdXNpY2EwMS9jZXJ0LmNlcjBvBggrBgEFBQcwAoZjaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3dlc3RjZW50cmFsdXMvY2FjZXJ0cy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxL2NlcnQuY2VyMHgGCCsGAQUFBzAChmxodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEwDQYJKoZIhvcNAQELBQADggEBAHyESoM-hJA8co5aYFKQj6Yb2naSt-_hW50RjbHBbcf7c32Ujn8L-srkiIyVxkEpzXn0sgWpC8m9Wmwi-IXcD8wG3oPqMrn5ZYvIwrFdrlRwKg23jUltqn23uy8oAzIxCBsBblPSNyWSbEL5Vi52YbLITPHu4uEC7Exy9jJvn6cttL4bste7Sfve85Dd-RbogDrr8HBad8-CN8sHHSyii8mKaK7rq75VE6arRrM28SQgrKJDPrv40C9I6Z5pK40CEUfpYyWTzS6FkLMf7SIjhz0Ilua9xqzb0IO32oVtuv4c-GmmjyJy8FRZzgEYbW_CUh19Gx-9L_Sd5ZzebW5exxE&s=T_poSi_2Q8nIy7PDihE3dVxzLLXlkddZIrCRXBqydxF0r5xWoTu5IwV_ILf6CMR6sulFWQ690cWEP6nR4k2aoBknfiRmuJKnDRPDRyEvwgLKg4s1t74MPpb56FOJbBl_8wX2YwsbK7X0Pkt-AIAZ6MKV1OTdv_GgUqdAWExD9ixdYl4W1lBF1H1grX1PFlqZHrTJwW5FL1Yc1RV2tckX1trCUq7r11g6ZobiAsoK3fcMk6DNat-D8Y-qXJK3Pycyq2vN09CFvnyDWMFW0XTvWHhOpJ8M0LIc9ueQqfsempuzqQ-E8eQ_JKKWv2BHntweXbyudCDhDiUUFnVHV_HrMg&h=UmvKR2YDqTv6qN9C-2pRC_v6TRJHtc6i7mgjepPJX6E pragma: - no-cache strict-transport-security: @@ -1430,13 +1311,13 @@ interactions: x-content-type-options: - nosniff x-ms-operation-identifier: - - tenantId=54826b22-38d6-4fb2-bad9-b7b93a3e9c5a,objectId=d44a2991-98c6-47c3-b59b-2b30d72cfcc2/japaneast/4efd8c4c-c2d4-49e1-b822-fb6b06e6645c + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=1de06a28-1a3a-4047-8877-0fb23647661b/westus/0bbf4e4d-b5b8-491d-9d16-796defd9f675 x-ms-ratelimit-remaining-subscription-deletes: - - '199' + - '799' x-ms-ratelimit-remaining-subscription-global-deletes: - - '2999' + - '11999' x-msedge-ref: - - 'Ref A: 28DDD7892F204697879CFB61CE5676E5 Ref B: TYO201100117029 Ref C: 2025-05-16T02:43:24Z' + - 'Ref A: 9B5AFD64286A480EBB540EEDAFEC7E61 Ref B: CO6AA3150220021 Ref C: 2026-03-23T23:13:07Z' status: code: 202 message: Accepted @@ -1454,9 +1335,9 @@ interactions: ParameterSetName: - -n -r -y User-Agent: - - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerRegistry/locations/WESTUS/operationResults/cacherules-ace5413b-7477-4827-9be1-5e62936073c1?api-version=2023-01-01-preview&t=638829602054860097&c=MIIHpTCCBo2gAwIBAgITOgWXBJzHWActAOyA9gAEBZcEnDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjUwNDE4MDkxNjUyWhcNMjUxMDE1MDkxNjUyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALJ4tFzYjQAGXlMN4RVSj_Zp98bnnigeY99sbhZrAOQOjxR_04cAp0TrBwLXaA2b6MkNp3EWrqmwj8LAHlmiUmx_C5YeMG8WQUVkZMbfJNmAjSKJvmH2VO_H9OVOiiWemCFWlBXZMT6O1LsK-KI4EQtlTwXEv4-zXiqUQqjqHZQX6IJGxxcuw3R6KS00hFc9B4Ve9K9uvRk3OzuC_2evEuKFQfmIkhFu9gMtFnEBgp0E5Srek5Sh6WRO2V6wjcdtrFJ2dMStIbypiaJysxjNaLwTxBjKAJiyxkrxbuS0IPj2v4oOwkFSl9khCWu-ivje49N19yGiq_5BL-QYySfUPF0CAwEAAaOCBJIwggSOMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFghfmRS4WsmTQCAWQCAQcwggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBQpIRfJ6SPCR16Dy9sN1AQtQKjWNDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwIwDAYKKwYBBAGCN3sEAjAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBACBpx57mqT5wt5VuFMhMv-QcXTs5QrWkz021CcXp44eWUSJBLP35O0JDRyA13V3zowD9Dkl6HKRosiwIhfUwb1VWxMZt1K97bfrlhekU_IFyRNImksBTl4Hg5mL7M4PQvDu_hNxb1NW9JnL8B4LEl-FVcKtOFC8R2wp_2vglSGujfVsEzQMXxCECc_j-T0saauGgdaItgRGQ-1JrKdhZ1FvHWU2eeab0zXatBPn7nyaNmU7DK2icP38PQp3g8yPPlpv1joUzz1GMBJXhtHRWCv93tVfT5q9DZQ-_S2H_1Y2raeucg8kUfGEvVuQ27w1bGi2QRDLtEtuNHgzpR3RB7os&s=dqE-r_IvbxV4De1myx07mJyGupakp_MnCooQKrIZyVg9odgnEySDcGo_7WEkODUS1MQeKay7sJqwwNhcIuaWMuKzLvt7vDIkDT-n5DwW7HxKzKGSPszA4EF1_YPuEJdsdxZz4JjjBE2wGKfXVTgfFaUxAZol0wisbXJ_nmiQ64WxD1wksHuawazlbAxJu2MymHmYSK-Nh1H-2nSPvoZMbQ5Vsp4F_8M3s8KJtbxgbydsnknZ5NLngF9K6czl6LAhp_wO3YYf0c3VsLWaxD_wr270ChdMxuOoTdRLjrDQgTiFGlIZCp3A4eefO1ECma7xiqoI6TYSGEnxvgrFMs-zUQ&h=qOweiKs6yzACKIuNzqO_lsSrtmnAw1lPl6Okx2bzl1A + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerRegistry/locations/WESTUS/operationResults/cacherules-2957dcdb-10f8-4a0d-9b0d-4ef6a941e2a0?api-version=2026-01-01-preview&t=639099043878117072&c=MIIIJjCCBw6gAwIBAgIQXAg_KQfqNmXWsnKmcWm-CjANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBXQ1VTIENBIDAxMB4XDTI2MDMwMzE4NDAwNFoXDTI2MDgzMDAwNDAwNFowQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCq2QsnpddKa8kR8gt-vA9VEusmZorO2S-vbINESl_vgl_PJICxJntGEX47Fd1DDc76k_3GujB58pb9CVQcLZ3-ca4xBv6hEqbf7VGNJdlUmL6V31uaLBLUMfEySd5hdTIpu4K8C1BsXVfomETR-eBTaEKo7U6rad09i8wEBquSFVf5S7J71JehWC4rsigucyf3uMHNqTzZudQy7Dr4g3o1z8GDPMMNrN8NB6XUfnHR60daMf2EzZU2v746EHu58MN3kAveFfbqRrcWd5-tDS7K-u-_1JBNmgg_vgVE_HIXLJ-H3nSUSgujW4YOVJzkyLbU8xAJiSJ_NeLBYjJyJhCNAgMBAAGjggUkMIIFIDCBnQYDVR0gBIGVMIGSMAwGCisGAQQBgjd7AQEwZgYKKwYBBAGCN3sCAjBYMFYGCCsGAQUFBwICMEoeSAAzADMAZQAwADEAOQAyADEALQA0AGQANgA0AC0ANABmADgAYwAtAGEAMAA1ADUALQA1AGIAZABhAGYAZgBkADUAZQAzADMAZDAMBgorBgEEAYI3ewMCMAwGCisGAQQBgjd7BAIwDAYDVR0TAQH_BAIwADAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDgYDVR0PAQH_BAQDAgWgMB0GA1UdDgQWBBRvNYqFx4fDp-iV_6CV_JvtWzks-DAfBgNVHSMEGDAWgBQU0jfg9tZ9ft2NurplqwSUJeCWHTCCAfsGA1UdHwSCAfIwggHuMHugeaB3hnVodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwfaB7oHmGd2h0dHA6Ly9zZWNvbmRhcnktY2RuLnBraS5jb3JlLndpbmRvd3MubmV0L3dlc3RjZW50cmFsdXMvY3Jscy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxLzI1L2N1cnJlbnQuY3JsMGygaqBohmZodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwgYGgf6B9hntodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwggIABggrBgEFBQcBAQSCAfIwggHuMH4GCCsGAQUFBzAChnJodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jYWNlcnRzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvY2VydC5jZXIwgYAGCCsGAQUFBzAChnRodHRwOi8vc2Vjb25kYXJ5LWNkbi5wa2kuY29yZS53aW5kb3dzLm5ldC93ZXN0Y2VudHJhbHVzL2NhY2VydHMvY2NtZXdlc3RjZW50cmFsdXNwa2kvY2NtZXdlc3RjZW50cmFsdXNpY2EwMS9jZXJ0LmNlcjBvBggrBgEFBQcwAoZjaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3dlc3RjZW50cmFsdXMvY2FjZXJ0cy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxL2NlcnQuY2VyMHgGCCsGAQUFBzAChmxodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEwDQYJKoZIhvcNAQELBQADggEBAHyESoM-hJA8co5aYFKQj6Yb2naSt-_hW50RjbHBbcf7c32Ujn8L-srkiIyVxkEpzXn0sgWpC8m9Wmwi-IXcD8wG3oPqMrn5ZYvIwrFdrlRwKg23jUltqn23uy8oAzIxCBsBblPSNyWSbEL5Vi52YbLITPHu4uEC7Exy9jJvn6cttL4bste7Sfve85Dd-RbogDrr8HBad8-CN8sHHSyii8mKaK7rq75VE6arRrM28SQgrKJDPrv40C9I6Z5pK40CEUfpYyWTzS6FkLMf7SIjhz0Ilua9xqzb0IO32oVtuv4c-GmmjyJy8FRZzgEYbW_CUh19Gx-9L_Sd5ZzebW5exxE&s=T_poSi_2Q8nIy7PDihE3dVxzLLXlkddZIrCRXBqydxF0r5xWoTu5IwV_ILf6CMR6sulFWQ690cWEP6nR4k2aoBknfiRmuJKnDRPDRyEvwgLKg4s1t74MPpb56FOJbBl_8wX2YwsbK7X0Pkt-AIAZ6MKV1OTdv_GgUqdAWExD9ixdYl4W1lBF1H1grX1PFlqZHrTJwW5FL1Yc1RV2tckX1trCUq7r11g6ZobiAsoK3fcMk6DNat-D8Y-qXJK3Pycyq2vN09CFvnyDWMFW0XTvWHhOpJ8M0LIc9ueQqfsempuzqQ-E8eQ_JKKWv2BHntweXbyudCDhDiUUFnVHV_HrMg&h=UmvKR2YDqTv6qN9C-2pRC_v6TRJHtc6i7mgjepPJX6E response: body: string: '' @@ -1466,11 +1347,11 @@ interactions: content-length: - '0' date: - - Fri, 16 May 2025 02:43:25 GMT + - Mon, 23 Mar 2026 23:13:07 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerRegistry/locations/WESTUS/operationResults/cacherules-ace5413b-7477-4827-9be1-5e62936073c1?api-version=2023-01-01-preview&t=638829602064985098&c=MIIHpTCCBo2gAwIBAgITOgWXBJzHWActAOyA9gAEBZcEnDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjUwNDE4MDkxNjUyWhcNMjUxMDE1MDkxNjUyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALJ4tFzYjQAGXlMN4RVSj_Zp98bnnigeY99sbhZrAOQOjxR_04cAp0TrBwLXaA2b6MkNp3EWrqmwj8LAHlmiUmx_C5YeMG8WQUVkZMbfJNmAjSKJvmH2VO_H9OVOiiWemCFWlBXZMT6O1LsK-KI4EQtlTwXEv4-zXiqUQqjqHZQX6IJGxxcuw3R6KS00hFc9B4Ve9K9uvRk3OzuC_2evEuKFQfmIkhFu9gMtFnEBgp0E5Srek5Sh6WRO2V6wjcdtrFJ2dMStIbypiaJysxjNaLwTxBjKAJiyxkrxbuS0IPj2v4oOwkFSl9khCWu-ivje49N19yGiq_5BL-QYySfUPF0CAwEAAaOCBJIwggSOMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFghfmRS4WsmTQCAWQCAQcwggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBQpIRfJ6SPCR16Dy9sN1AQtQKjWNDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwIwDAYKKwYBBAGCN3sEAjAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBACBpx57mqT5wt5VuFMhMv-QcXTs5QrWkz021CcXp44eWUSJBLP35O0JDRyA13V3zowD9Dkl6HKRosiwIhfUwb1VWxMZt1K97bfrlhekU_IFyRNImksBTl4Hg5mL7M4PQvDu_hNxb1NW9JnL8B4LEl-FVcKtOFC8R2wp_2vglSGujfVsEzQMXxCECc_j-T0saauGgdaItgRGQ-1JrKdhZ1FvHWU2eeab0zXatBPn7nyaNmU7DK2icP38PQp3g8yPPlpv1joUzz1GMBJXhtHRWCv93tVfT5q9DZQ-_S2H_1Y2raeucg8kUfGEvVuQ27w1bGi2QRDLtEtuNHgzpR3RB7os&s=ktulluqlwu1NQi8j0KrEPa9ihvCufnXgYkvQ9Vn4u0Qn8lHRAOw_CgdyHdDjRXvnV4hTqLRF0BG4EKYRsuK_Qu9tNrwhSjaSwW1YBxNiFesjHkwDrV-OumI0j_E2mt1WIldAZ5QkkqkMvApNzxc3XWTymYIM1p6x75-aJmn1_0VLWhY6tzM_1xPcBgO2h3df-Ldwq81PXsKrXwlu5kBNWzlxQx7IXAV-cE8t-OXByOndC4bhD1O5zi10W4Ppz5Tvq6WVG907V7wkQ3JqfbQJuNjiUIzcQtGBXeF_eLrkFMfK_bha2zE6yD9NFD-SsxwptC6td0wZq62GZsUAWNDvdg&h=_6t9QapBG6JVyXEkH664FKta6H63exC4XyLcd0bI_OQ + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerRegistry/locations/WESTUS/operationResults/cacherules-2957dcdb-10f8-4a0d-9b0d-4ef6a941e2a0?api-version=2026-01-01-preview&t=639099043882977305&c=MIIIJjCCBw6gAwIBAgIQXAg_KQfqNmXWsnKmcWm-CjANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBXQ1VTIENBIDAxMB4XDTI2MDMwMzE4NDAwNFoXDTI2MDgzMDAwNDAwNFowQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCq2QsnpddKa8kR8gt-vA9VEusmZorO2S-vbINESl_vgl_PJICxJntGEX47Fd1DDc76k_3GujB58pb9CVQcLZ3-ca4xBv6hEqbf7VGNJdlUmL6V31uaLBLUMfEySd5hdTIpu4K8C1BsXVfomETR-eBTaEKo7U6rad09i8wEBquSFVf5S7J71JehWC4rsigucyf3uMHNqTzZudQy7Dr4g3o1z8GDPMMNrN8NB6XUfnHR60daMf2EzZU2v746EHu58MN3kAveFfbqRrcWd5-tDS7K-u-_1JBNmgg_vgVE_HIXLJ-H3nSUSgujW4YOVJzkyLbU8xAJiSJ_NeLBYjJyJhCNAgMBAAGjggUkMIIFIDCBnQYDVR0gBIGVMIGSMAwGCisGAQQBgjd7AQEwZgYKKwYBBAGCN3sCAjBYMFYGCCsGAQUFBwICMEoeSAAzADMAZQAwADEAOQAyADEALQA0AGQANgA0AC0ANABmADgAYwAtAGEAMAA1ADUALQA1AGIAZABhAGYAZgBkADUAZQAzADMAZDAMBgorBgEEAYI3ewMCMAwGCisGAQQBgjd7BAIwDAYDVR0TAQH_BAIwADAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDgYDVR0PAQH_BAQDAgWgMB0GA1UdDgQWBBRvNYqFx4fDp-iV_6CV_JvtWzks-DAfBgNVHSMEGDAWgBQU0jfg9tZ9ft2NurplqwSUJeCWHTCCAfsGA1UdHwSCAfIwggHuMHugeaB3hnVodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwfaB7oHmGd2h0dHA6Ly9zZWNvbmRhcnktY2RuLnBraS5jb3JlLndpbmRvd3MubmV0L3dlc3RjZW50cmFsdXMvY3Jscy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxLzI1L2N1cnJlbnQuY3JsMGygaqBohmZodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwgYGgf6B9hntodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwggIABggrBgEFBQcBAQSCAfIwggHuMH4GCCsGAQUFBzAChnJodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jYWNlcnRzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvY2VydC5jZXIwgYAGCCsGAQUFBzAChnRodHRwOi8vc2Vjb25kYXJ5LWNkbi5wa2kuY29yZS53aW5kb3dzLm5ldC93ZXN0Y2VudHJhbHVzL2NhY2VydHMvY2NtZXdlc3RjZW50cmFsdXNwa2kvY2NtZXdlc3RjZW50cmFsdXNpY2EwMS9jZXJ0LmNlcjBvBggrBgEFBQcwAoZjaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3dlc3RjZW50cmFsdXMvY2FjZXJ0cy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxL2NlcnQuY2VyMHgGCCsGAQUFBzAChmxodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEwDQYJKoZIhvcNAQELBQADggEBAHyESoM-hJA8co5aYFKQj6Yb2naSt-_hW50RjbHBbcf7c32Ujn8L-srkiIyVxkEpzXn0sgWpC8m9Wmwi-IXcD8wG3oPqMrn5ZYvIwrFdrlRwKg23jUltqn23uy8oAzIxCBsBblPSNyWSbEL5Vi52YbLITPHu4uEC7Exy9jJvn6cttL4bste7Sfve85Dd-RbogDrr8HBad8-CN8sHHSyii8mKaK7rq75VE6arRrM28SQgrKJDPrv40C9I6Z5pK40CEUfpYyWTzS6FkLMf7SIjhz0Ilua9xqzb0IO32oVtuv4c-GmmjyJy8FRZzgEYbW_CUh19Gx-9L_Sd5ZzebW5exxE&s=A_MVW1uY0m9UAXsU_HIlLdfPO81Nim0j3Q8hDLMQlFNaLYP7yEy-ognyeZ_owkHPJxLtf5es5jSYU9IGCInPzUdOMe4m_Gcvx7403okaqtdPjebMnqFoQ4-AAk5X2-N3UImKDmVIMKTuXFfEo-8IMOBIaKVaXlC0z71juoyY6DgqEPHmqpUDmCGF73rWmlhXeo4Opabz7f0kRWyz-PPn44LVLREzV3lOAtYq9hJlab7vCPhCesHzMnN_hLJRQnjTGEoshVBmfNHjJqKRfV89EvChhcvVUGtgPRKj4q5hlFPOIg-PVi9jv6XS4ikFZL8JYeBKPZTOX5wjWy-QW-lPqA&h=USck8kbENtJQZQZVAkKSw_QkbyTLN-kiqURdrCzHqQI pragma: - no-cache strict-transport-security: @@ -1480,11 +1361,11 @@ interactions: x-content-type-options: - nosniff x-ms-operation-identifier: - - tenantId=54826b22-38d6-4fb2-bad9-b7b93a3e9c5a,objectId=d44a2991-98c6-47c3-b59b-2b30d72cfcc2/japaneast/b0e6ae40-ad52-4307-9789-66ed49dc2bfa + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=1de06a28-1a3a-4047-8877-0fb23647661b/westus/5e928dea-5965-4e11-b3ea-9b33d186032e x-ms-ratelimit-remaining-subscription-global-reads: - - '3749' + - '16499' x-msedge-ref: - - 'Ref A: F2E71A8B371945C3A21C1D185A4B9BBA Ref B: TYO201100117029 Ref C: 2025-05-16T02:43:26Z' + - 'Ref A: 9169BA966B414708B7EAB6150CA156C9 Ref B: MWH011020806040 Ref C: 2026-03-23T23:13:08Z' status: code: 202 message: Accepted @@ -1502,9 +1383,9 @@ interactions: ParameterSetName: - -n -r -y User-Agent: - - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerRegistry/locations/WESTUS/operationResults/cacherules-ace5413b-7477-4827-9be1-5e62936073c1?api-version=2023-01-01-preview&t=638829602064985098&c=MIIHpTCCBo2gAwIBAgITOgWXBJzHWActAOyA9gAEBZcEnDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjUwNDE4MDkxNjUyWhcNMjUxMDE1MDkxNjUyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALJ4tFzYjQAGXlMN4RVSj_Zp98bnnigeY99sbhZrAOQOjxR_04cAp0TrBwLXaA2b6MkNp3EWrqmwj8LAHlmiUmx_C5YeMG8WQUVkZMbfJNmAjSKJvmH2VO_H9OVOiiWemCFWlBXZMT6O1LsK-KI4EQtlTwXEv4-zXiqUQqjqHZQX6IJGxxcuw3R6KS00hFc9B4Ve9K9uvRk3OzuC_2evEuKFQfmIkhFu9gMtFnEBgp0E5Srek5Sh6WRO2V6wjcdtrFJ2dMStIbypiaJysxjNaLwTxBjKAJiyxkrxbuS0IPj2v4oOwkFSl9khCWu-ivje49N19yGiq_5BL-QYySfUPF0CAwEAAaOCBJIwggSOMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFghfmRS4WsmTQCAWQCAQcwggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBQpIRfJ6SPCR16Dy9sN1AQtQKjWNDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwIwDAYKKwYBBAGCN3sEAjAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBACBpx57mqT5wt5VuFMhMv-QcXTs5QrWkz021CcXp44eWUSJBLP35O0JDRyA13V3zowD9Dkl6HKRosiwIhfUwb1VWxMZt1K97bfrlhekU_IFyRNImksBTl4Hg5mL7M4PQvDu_hNxb1NW9JnL8B4LEl-FVcKtOFC8R2wp_2vglSGujfVsEzQMXxCECc_j-T0saauGgdaItgRGQ-1JrKdhZ1FvHWU2eeab0zXatBPn7nyaNmU7DK2icP38PQp3g8yPPlpv1joUzz1GMBJXhtHRWCv93tVfT5q9DZQ-_S2H_1Y2raeucg8kUfGEvVuQ27w1bGi2QRDLtEtuNHgzpR3RB7os&s=ktulluqlwu1NQi8j0KrEPa9ihvCufnXgYkvQ9Vn4u0Qn8lHRAOw_CgdyHdDjRXvnV4hTqLRF0BG4EKYRsuK_Qu9tNrwhSjaSwW1YBxNiFesjHkwDrV-OumI0j_E2mt1WIldAZ5QkkqkMvApNzxc3XWTymYIM1p6x75-aJmn1_0VLWhY6tzM_1xPcBgO2h3df-Ldwq81PXsKrXwlu5kBNWzlxQx7IXAV-cE8t-OXByOndC4bhD1O5zi10W4Ppz5Tvq6WVG907V7wkQ3JqfbQJuNjiUIzcQtGBXeF_eLrkFMfK_bha2zE6yD9NFD-SsxwptC6td0wZq62GZsUAWNDvdg&h=_6t9QapBG6JVyXEkH664FKta6H63exC4XyLcd0bI_OQ + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerRegistry/locations/WESTUS/operationResults/cacherules-2957dcdb-10f8-4a0d-9b0d-4ef6a941e2a0?api-version=2026-01-01-preview&t=639099043882977305&c=MIIIJjCCBw6gAwIBAgIQXAg_KQfqNmXWsnKmcWm-CjANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBXQ1VTIENBIDAxMB4XDTI2MDMwMzE4NDAwNFoXDTI2MDgzMDAwNDAwNFowQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCq2QsnpddKa8kR8gt-vA9VEusmZorO2S-vbINESl_vgl_PJICxJntGEX47Fd1DDc76k_3GujB58pb9CVQcLZ3-ca4xBv6hEqbf7VGNJdlUmL6V31uaLBLUMfEySd5hdTIpu4K8C1BsXVfomETR-eBTaEKo7U6rad09i8wEBquSFVf5S7J71JehWC4rsigucyf3uMHNqTzZudQy7Dr4g3o1z8GDPMMNrN8NB6XUfnHR60daMf2EzZU2v746EHu58MN3kAveFfbqRrcWd5-tDS7K-u-_1JBNmgg_vgVE_HIXLJ-H3nSUSgujW4YOVJzkyLbU8xAJiSJ_NeLBYjJyJhCNAgMBAAGjggUkMIIFIDCBnQYDVR0gBIGVMIGSMAwGCisGAQQBgjd7AQEwZgYKKwYBBAGCN3sCAjBYMFYGCCsGAQUFBwICMEoeSAAzADMAZQAwADEAOQAyADEALQA0AGQANgA0AC0ANABmADgAYwAtAGEAMAA1ADUALQA1AGIAZABhAGYAZgBkADUAZQAzADMAZDAMBgorBgEEAYI3ewMCMAwGCisGAQQBgjd7BAIwDAYDVR0TAQH_BAIwADAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDgYDVR0PAQH_BAQDAgWgMB0GA1UdDgQWBBRvNYqFx4fDp-iV_6CV_JvtWzks-DAfBgNVHSMEGDAWgBQU0jfg9tZ9ft2NurplqwSUJeCWHTCCAfsGA1UdHwSCAfIwggHuMHugeaB3hnVodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwfaB7oHmGd2h0dHA6Ly9zZWNvbmRhcnktY2RuLnBraS5jb3JlLndpbmRvd3MubmV0L3dlc3RjZW50cmFsdXMvY3Jscy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxLzI1L2N1cnJlbnQuY3JsMGygaqBohmZodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwgYGgf6B9hntodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwggIABggrBgEFBQcBAQSCAfIwggHuMH4GCCsGAQUFBzAChnJodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jYWNlcnRzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvY2VydC5jZXIwgYAGCCsGAQUFBzAChnRodHRwOi8vc2Vjb25kYXJ5LWNkbi5wa2kuY29yZS53aW5kb3dzLm5ldC93ZXN0Y2VudHJhbHVzL2NhY2VydHMvY2NtZXdlc3RjZW50cmFsdXNwa2kvY2NtZXdlc3RjZW50cmFsdXNpY2EwMS9jZXJ0LmNlcjBvBggrBgEFBQcwAoZjaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3dlc3RjZW50cmFsdXMvY2FjZXJ0cy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxL2NlcnQuY2VyMHgGCCsGAQUFBzAChmxodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEwDQYJKoZIhvcNAQELBQADggEBAHyESoM-hJA8co5aYFKQj6Yb2naSt-_hW50RjbHBbcf7c32Ujn8L-srkiIyVxkEpzXn0sgWpC8m9Wmwi-IXcD8wG3oPqMrn5ZYvIwrFdrlRwKg23jUltqn23uy8oAzIxCBsBblPSNyWSbEL5Vi52YbLITPHu4uEC7Exy9jJvn6cttL4bste7Sfve85Dd-RbogDrr8HBad8-CN8sHHSyii8mKaK7rq75VE6arRrM28SQgrKJDPrv40C9I6Z5pK40CEUfpYyWTzS6FkLMf7SIjhz0Ilua9xqzb0IO32oVtuv4c-GmmjyJy8FRZzgEYbW_CUh19Gx-9L_Sd5ZzebW5exxE&s=A_MVW1uY0m9UAXsU_HIlLdfPO81Nim0j3Q8hDLMQlFNaLYP7yEy-ognyeZ_owkHPJxLtf5es5jSYU9IGCInPzUdOMe4m_Gcvx7403okaqtdPjebMnqFoQ4-AAk5X2-N3UImKDmVIMKTuXFfEo-8IMOBIaKVaXlC0z71juoyY6DgqEPHmqpUDmCGF73rWmlhXeo4Opabz7f0kRWyz-PPn44LVLREzV3lOAtYq9hJlab7vCPhCesHzMnN_hLJRQnjTGEoshVBmfNHjJqKRfV89EvChhcvVUGtgPRKj4q5hlFPOIg-PVi9jv6XS4ikFZL8JYeBKPZTOX5wjWy-QW-lPqA&h=USck8kbENtJQZQZVAkKSw_QkbyTLN-kiqURdrCzHqQI response: body: string: '' @@ -1514,7 +1395,7 @@ interactions: content-length: - '0' date: - - Fri, 16 May 2025 02:43:36 GMT + - Mon, 23 Mar 2026 23:13:18 GMT expires: - '-1' pragma: @@ -1526,11 +1407,11 @@ interactions: x-content-type-options: - nosniff x-ms-operation-identifier: - - tenantId=54826b22-38d6-4fb2-bad9-b7b93a3e9c5a,objectId=d44a2991-98c6-47c3-b59b-2b30d72cfcc2/japaneast/73530ea9-ea8b-40a4-b3d0-0f4d6009fa9e + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=1de06a28-1a3a-4047-8877-0fb23647661b/westus2/d070a95c-3e75-424c-8014-a7a99ad8bacb x-ms-ratelimit-remaining-subscription-global-reads: - - '3749' + - '16499' x-msedge-ref: - - 'Ref A: 465990690EB344FBB52B5A4A37B4EEC8 Ref B: TYO201100117029 Ref C: 2025-05-16T02:43:37Z' + - 'Ref A: 84A0BDEED5954A82A46D083559610847 Ref B: MWH011020808054 Ref C: 2026-03-23T23:13:18Z' status: code: 200 message: OK @@ -1548,21 +1429,21 @@ interactions: ParameterSetName: - -n -r -y User-Agent: - - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resources?$filter=resourceType%20eq%20%27Microsoft.ContainerRegistry%2Fregistries%27&api-version=2024-11-01 response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002","name":"clireg000002","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-05-16T02:42:30.4558651Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-05-16T02:42:30.4558651Z"}}]}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvarga","name":"anvarga","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dev-anvarga/providers/Microsoft.ManagedIdentity/userAssignedIdentities/anvargaidentity":{"principalId":"bf7b10eb-1784-40fb-bc60-2bc2c780d6a4","clientId":"c8deb855-42ed-432b-99f5-dc9cbc6c8d02"}}},"tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-04-20T21:35:14.9732943Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-10-17T18:24:37.9722734Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvargadev","name":"anvargadev","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus3","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2024-10-16T00:02:46.5515473Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2024-10-16T00:02:46.5515473Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/anvarga-artifactcache/providers/Microsoft.ContainerRegistry/registries/anvargasd","name":"anvargasd","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"australiaeast","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-09-03T18:42:30.1306296Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-07T01:16:30.8836181Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvargacuseuap","name":"anvargacuseuap","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"centraluseuap","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-10-17T05:09:28.2847833Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-10-17T05:09:28.2847833Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvargatargetregistry","name":"anvargatargetregistry","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-11-14T21:32:22.1211214Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-11-14T21:32:22.1211214Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvargacuseuap2","name":"anvargacuseuap2","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"centraluseuap","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-01-16T23:59:03.139671Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-01-16T23:59:03.139671Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/anvarga-artifactcache/providers/Microsoft.ContainerRegistry/registries/anvargaupstreamfirewall","name":"anvargaupstreamfirewall","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-02T19:52:04.3843475Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-02T19:54:36.3753519Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/acranvargalogs","name":"acranvargalogs","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-11T22:00:56.7502595Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-11T22:00:56.7502595Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/abac-artifact-cache/providers/Microsoft.ContainerRegistry/registries/abacupstream","name":"abacupstream","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-16T22:05:31.24Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-16T22:05:31.24Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/abac-artifact-cache/providers/Microsoft.ContainerRegistry/registries/abacdownstream","name":"abacdownstream","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-16T22:06:06.547017Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-16T22:06:06.547017Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf002","name":"perf002","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:47.0749168Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:47.0749168Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf005","name":"perf005","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:36:04.5870512Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-18T14:51:49.3136858Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf000","name":"perf000","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:35.5817756Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:35.5817756Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf003","name":"perf003","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:52.6000756Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:52.6000756Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf001","name":"perf001","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:40.8123499Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:40.8123499Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf004","name":"perf004","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:58.8025388Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:58.8025388Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002","name":"clireg000002","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-23T23:12:43.689915Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-23T23:12:43.689915Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/anvarga-demo/providers/Microsoft.ContainerRegistry/registries/anvargadownstream","name":"anvargadownstream","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus2euap","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-01-28T23:23:41.5959636Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-01-28T23:29:01.5110085Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/anvarga-demo/providers/Microsoft.ContainerRegistry/registries/anvargaupstream","name":"anvargaupstream","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus2euap","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-01-28T23:24:03.8642396Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-01-28T23:24:03.8642396Z"}}]}' headers: cache-control: - no-cache content-length: - - '534' + - '10255' content-type: - application/json; charset=utf-8 date: - - Fri, 16 May 2025 02:43:38 GMT + - Mon, 23 Mar 2026 23:13:18 GMT expires: - '-1' pragma: @@ -1574,9 +1455,9 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-global-reads: - - '3749' + - '16499' x-msedge-ref: - - 'Ref A: E9232836CF184B518DC68ED7A40F43B0 Ref B: TYO201100113053 Ref C: 2025-05-16T02:43:38Z' + - 'Ref A: 574FE56944BE41F989A16A5F64E45175 Ref B: CO6AA3150218019 Ref C: 2026-03-23T23:13:19Z' status: code: 200 message: OK @@ -1584,7 +1465,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -1596,9 +1477,9 @@ interactions: ParameterSetName: - -n -r -y User-Agent: - - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1?api-version=2023-01-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/credentialSets/test1?api-version=2026-01-01-preview response: body: string: '' @@ -1606,17 +1487,17 @@ interactions: api-supported-versions: - 2023-01-01-preview, 2023-06-01-preview, 2023-07-01, 2023-08-01-preview, 2023-11-01-preview, 2024-01-01-preview, 2024-11-01-preview, 2025-03-01-preview, 2025-04-01, 2025-05-01-preview, - 2025-09-01-preview + 2025-06-01-preview, 2025-09-01-preview, 2025-11-01, 2025-12-01-preview, 2026-01-01-preview cache-control: - no-cache content-length: - '0' date: - - Fri, 16 May 2025 02:43:39 GMT + - Mon, 23 Mar 2026 23:13:19 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerRegistry/locations/WESTUS/operationResults/credentialsets-bb046498-5a69-4a86-ba8b-719a847d5ce1?api-version=2023-01-01-preview&t=638829602199566950&c=MIIHpTCCBo2gAwIBAgITOgWXBJzHWActAOyA9gAEBZcEnDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjUwNDE4MDkxNjUyWhcNMjUxMDE1MDkxNjUyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALJ4tFzYjQAGXlMN4RVSj_Zp98bnnigeY99sbhZrAOQOjxR_04cAp0TrBwLXaA2b6MkNp3EWrqmwj8LAHlmiUmx_C5YeMG8WQUVkZMbfJNmAjSKJvmH2VO_H9OVOiiWemCFWlBXZMT6O1LsK-KI4EQtlTwXEv4-zXiqUQqjqHZQX6IJGxxcuw3R6KS00hFc9B4Ve9K9uvRk3OzuC_2evEuKFQfmIkhFu9gMtFnEBgp0E5Srek5Sh6WRO2V6wjcdtrFJ2dMStIbypiaJysxjNaLwTxBjKAJiyxkrxbuS0IPj2v4oOwkFSl9khCWu-ivje49N19yGiq_5BL-QYySfUPF0CAwEAAaOCBJIwggSOMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFghfmRS4WsmTQCAWQCAQcwggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBQpIRfJ6SPCR16Dy9sN1AQtQKjWNDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwIwDAYKKwYBBAGCN3sEAjAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBACBpx57mqT5wt5VuFMhMv-QcXTs5QrWkz021CcXp44eWUSJBLP35O0JDRyA13V3zowD9Dkl6HKRosiwIhfUwb1VWxMZt1K97bfrlhekU_IFyRNImksBTl4Hg5mL7M4PQvDu_hNxb1NW9JnL8B4LEl-FVcKtOFC8R2wp_2vglSGujfVsEzQMXxCECc_j-T0saauGgdaItgRGQ-1JrKdhZ1FvHWU2eeab0zXatBPn7nyaNmU7DK2icP38PQp3g8yPPlpv1joUzz1GMBJXhtHRWCv93tVfT5q9DZQ-_S2H_1Y2raeucg8kUfGEvVuQ27w1bGi2QRDLtEtuNHgzpR3RB7os&s=GX0cax3sJb1Vbb2eEq7LbQUlWtoRtYWzSTcl-ojjx8VaMKD22F4RsU7ttn6NyJvDAQXSyL_sZYXDqx1yk-TSr8WPog62pCL_NbYa6-uiBEqPiMpwTsI_mjBPkfSB66GAfpAc0urjWx_I6kBbtmf_-FMOjRvcUwxoLkXChSku-mA0q_VJ0dIBmpJ2hWAN2QTFKG2npJIn9UiSgQFdYD1bBE1TPxPxJxPh376XTK_CAHvFjw7HFy_0UUxZZQx8DM1CJg9xX6NXtXi4MYTaqFrdBKqcBaWrEWQoXuqWZNWWj7_lr4b6_FcwKNyGlTfhm3oXp-1r2GsxyIJBfdSGI_zzRw&h=Slfzt1PMg9gUHeX59JxODVi41Q1Md-b1ywySNyHKyj0 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerRegistry/locations/WESTUS/operationResults/credentialsets-9bd0b258-a741-4f18-a74e-ed633eb0a7c8?api-version=2026-01-01-preview&t=639099043995962904&c=MIIIJjCCBw6gAwIBAgIQXAg_KQfqNmXWsnKmcWm-CjANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBXQ1VTIENBIDAxMB4XDTI2MDMwMzE4NDAwNFoXDTI2MDgzMDAwNDAwNFowQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCq2QsnpddKa8kR8gt-vA9VEusmZorO2S-vbINESl_vgl_PJICxJntGEX47Fd1DDc76k_3GujB58pb9CVQcLZ3-ca4xBv6hEqbf7VGNJdlUmL6V31uaLBLUMfEySd5hdTIpu4K8C1BsXVfomETR-eBTaEKo7U6rad09i8wEBquSFVf5S7J71JehWC4rsigucyf3uMHNqTzZudQy7Dr4g3o1z8GDPMMNrN8NB6XUfnHR60daMf2EzZU2v746EHu58MN3kAveFfbqRrcWd5-tDS7K-u-_1JBNmgg_vgVE_HIXLJ-H3nSUSgujW4YOVJzkyLbU8xAJiSJ_NeLBYjJyJhCNAgMBAAGjggUkMIIFIDCBnQYDVR0gBIGVMIGSMAwGCisGAQQBgjd7AQEwZgYKKwYBBAGCN3sCAjBYMFYGCCsGAQUFBwICMEoeSAAzADMAZQAwADEAOQAyADEALQA0AGQANgA0AC0ANABmADgAYwAtAGEAMAA1ADUALQA1AGIAZABhAGYAZgBkADUAZQAzADMAZDAMBgorBgEEAYI3ewMCMAwGCisGAQQBgjd7BAIwDAYDVR0TAQH_BAIwADAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDgYDVR0PAQH_BAQDAgWgMB0GA1UdDgQWBBRvNYqFx4fDp-iV_6CV_JvtWzks-DAfBgNVHSMEGDAWgBQU0jfg9tZ9ft2NurplqwSUJeCWHTCCAfsGA1UdHwSCAfIwggHuMHugeaB3hnVodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwfaB7oHmGd2h0dHA6Ly9zZWNvbmRhcnktY2RuLnBraS5jb3JlLndpbmRvd3MubmV0L3dlc3RjZW50cmFsdXMvY3Jscy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxLzI1L2N1cnJlbnQuY3JsMGygaqBohmZodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwgYGgf6B9hntodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwggIABggrBgEFBQcBAQSCAfIwggHuMH4GCCsGAQUFBzAChnJodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jYWNlcnRzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvY2VydC5jZXIwgYAGCCsGAQUFBzAChnRodHRwOi8vc2Vjb25kYXJ5LWNkbi5wa2kuY29yZS53aW5kb3dzLm5ldC93ZXN0Y2VudHJhbHVzL2NhY2VydHMvY2NtZXdlc3RjZW50cmFsdXNwa2kvY2NtZXdlc3RjZW50cmFsdXNpY2EwMS9jZXJ0LmNlcjBvBggrBgEFBQcwAoZjaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3dlc3RjZW50cmFsdXMvY2FjZXJ0cy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxL2NlcnQuY2VyMHgGCCsGAQUFBzAChmxodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEwDQYJKoZIhvcNAQELBQADggEBAHyESoM-hJA8co5aYFKQj6Yb2naSt-_hW50RjbHBbcf7c32Ujn8L-srkiIyVxkEpzXn0sgWpC8m9Wmwi-IXcD8wG3oPqMrn5ZYvIwrFdrlRwKg23jUltqn23uy8oAzIxCBsBblPSNyWSbEL5Vi52YbLITPHu4uEC7Exy9jJvn6cttL4bste7Sfve85Dd-RbogDrr8HBad8-CN8sHHSyii8mKaK7rq75VE6arRrM28SQgrKJDPrv40C9I6Z5pK40CEUfpYyWTzS6FkLMf7SIjhz0Ilua9xqzb0IO32oVtuv4c-GmmjyJy8FRZzgEYbW_CUh19Gx-9L_Sd5ZzebW5exxE&s=lCnu_9i8m714iUfLrRU7CLC4vhVeRImMzl_1xXO-6f5i8jU_55qKo21Uq9OHQoO0kUS7oxfqEA7fqTegjCaSa5JwAxp_pv48g-M_RSjif7MdOsN2kqHWH4JhZOQKFemWxSDRgeKRBe1s6ZHB3dOilJbTu8nBDtiZIjTvD4nCBiQmP3SIzTThILlPcjMILz2huf2DplGXCD67J_RVe4YcC3N4YY5Rpg6b3EN0m682iiE88AP8m4dfSOgG6xVM88MRhj6ogcBMmnA86uMxyOWKDPATFdmZ2--V2coSReOy71hYopTnKy8puJZqK1ONRheYCzLWrnTGZgt3yIIrqdOuwQ&h=ueUbGdVaaFbxDOgCIYtPrjDE3mQsU2sYDhDAn80qJbA pragma: - no-cache strict-transport-security: @@ -1626,13 +1507,13 @@ interactions: x-content-type-options: - nosniff x-ms-operation-identifier: - - tenantId=54826b22-38d6-4fb2-bad9-b7b93a3e9c5a,objectId=d44a2991-98c6-47c3-b59b-2b30d72cfcc2/japaneast/8dbbfc6d-2392-4ef1-84af-c4ae629e29a0 + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=1de06a28-1a3a-4047-8877-0fb23647661b/westus/1f08fabf-80ae-4d89-a52b-06b894784920 x-ms-ratelimit-remaining-subscription-deletes: - - '199' + - '799' x-ms-ratelimit-remaining-subscription-global-deletes: - - '2999' + - '11999' x-msedge-ref: - - 'Ref A: 163E01CAD00442788EDFE8532E5A7351 Ref B: TYO201151003054 Ref C: 2025-05-16T02:43:39Z' + - 'Ref A: 88271D52180A45779F90C0366032C911 Ref B: CO6AA3150220039 Ref C: 2026-03-23T23:13:19Z' status: code: 202 message: Accepted @@ -1650,9 +1531,9 @@ interactions: ParameterSetName: - -n -r -y User-Agent: - - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerRegistry/locations/WESTUS/operationResults/credentialsets-bb046498-5a69-4a86-ba8b-719a847d5ce1?api-version=2023-01-01-preview&t=638829602199566950&c=MIIHpTCCBo2gAwIBAgITOgWXBJzHWActAOyA9gAEBZcEnDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjUwNDE4MDkxNjUyWhcNMjUxMDE1MDkxNjUyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALJ4tFzYjQAGXlMN4RVSj_Zp98bnnigeY99sbhZrAOQOjxR_04cAp0TrBwLXaA2b6MkNp3EWrqmwj8LAHlmiUmx_C5YeMG8WQUVkZMbfJNmAjSKJvmH2VO_H9OVOiiWemCFWlBXZMT6O1LsK-KI4EQtlTwXEv4-zXiqUQqjqHZQX6IJGxxcuw3R6KS00hFc9B4Ve9K9uvRk3OzuC_2evEuKFQfmIkhFu9gMtFnEBgp0E5Srek5Sh6WRO2V6wjcdtrFJ2dMStIbypiaJysxjNaLwTxBjKAJiyxkrxbuS0IPj2v4oOwkFSl9khCWu-ivje49N19yGiq_5BL-QYySfUPF0CAwEAAaOCBJIwggSOMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFghfmRS4WsmTQCAWQCAQcwggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBQpIRfJ6SPCR16Dy9sN1AQtQKjWNDAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwIwDAYKKwYBBAGCN3sEAjAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBACBpx57mqT5wt5VuFMhMv-QcXTs5QrWkz021CcXp44eWUSJBLP35O0JDRyA13V3zowD9Dkl6HKRosiwIhfUwb1VWxMZt1K97bfrlhekU_IFyRNImksBTl4Hg5mL7M4PQvDu_hNxb1NW9JnL8B4LEl-FVcKtOFC8R2wp_2vglSGujfVsEzQMXxCECc_j-T0saauGgdaItgRGQ-1JrKdhZ1FvHWU2eeab0zXatBPn7nyaNmU7DK2icP38PQp3g8yPPlpv1joUzz1GMBJXhtHRWCv93tVfT5q9DZQ-_S2H_1Y2raeucg8kUfGEvVuQ27w1bGi2QRDLtEtuNHgzpR3RB7os&s=GX0cax3sJb1Vbb2eEq7LbQUlWtoRtYWzSTcl-ojjx8VaMKD22F4RsU7ttn6NyJvDAQXSyL_sZYXDqx1yk-TSr8WPog62pCL_NbYa6-uiBEqPiMpwTsI_mjBPkfSB66GAfpAc0urjWx_I6kBbtmf_-FMOjRvcUwxoLkXChSku-mA0q_VJ0dIBmpJ2hWAN2QTFKG2npJIn9UiSgQFdYD1bBE1TPxPxJxPh376XTK_CAHvFjw7HFy_0UUxZZQx8DM1CJg9xX6NXtXi4MYTaqFrdBKqcBaWrEWQoXuqWZNWWj7_lr4b6_FcwKNyGlTfhm3oXp-1r2GsxyIJBfdSGI_zzRw&h=Slfzt1PMg9gUHeX59JxODVi41Q1Md-b1ywySNyHKyj0 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerRegistry/locations/WESTUS/operationResults/credentialsets-9bd0b258-a741-4f18-a74e-ed633eb0a7c8?api-version=2026-01-01-preview&t=639099043995962904&c=MIIIJjCCBw6gAwIBAgIQXAg_KQfqNmXWsnKmcWm-CjANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBXQ1VTIENBIDAxMB4XDTI2MDMwMzE4NDAwNFoXDTI2MDgzMDAwNDAwNFowQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCq2QsnpddKa8kR8gt-vA9VEusmZorO2S-vbINESl_vgl_PJICxJntGEX47Fd1DDc76k_3GujB58pb9CVQcLZ3-ca4xBv6hEqbf7VGNJdlUmL6V31uaLBLUMfEySd5hdTIpu4K8C1BsXVfomETR-eBTaEKo7U6rad09i8wEBquSFVf5S7J71JehWC4rsigucyf3uMHNqTzZudQy7Dr4g3o1z8GDPMMNrN8NB6XUfnHR60daMf2EzZU2v746EHu58MN3kAveFfbqRrcWd5-tDS7K-u-_1JBNmgg_vgVE_HIXLJ-H3nSUSgujW4YOVJzkyLbU8xAJiSJ_NeLBYjJyJhCNAgMBAAGjggUkMIIFIDCBnQYDVR0gBIGVMIGSMAwGCisGAQQBgjd7AQEwZgYKKwYBBAGCN3sCAjBYMFYGCCsGAQUFBwICMEoeSAAzADMAZQAwADEAOQAyADEALQA0AGQANgA0AC0ANABmADgAYwAtAGEAMAA1ADUALQA1AGIAZABhAGYAZgBkADUAZQAzADMAZDAMBgorBgEEAYI3ewMCMAwGCisGAQQBgjd7BAIwDAYDVR0TAQH_BAIwADAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDgYDVR0PAQH_BAQDAgWgMB0GA1UdDgQWBBRvNYqFx4fDp-iV_6CV_JvtWzks-DAfBgNVHSMEGDAWgBQU0jfg9tZ9ft2NurplqwSUJeCWHTCCAfsGA1UdHwSCAfIwggHuMHugeaB3hnVodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwfaB7oHmGd2h0dHA6Ly9zZWNvbmRhcnktY2RuLnBraS5jb3JlLndpbmRvd3MubmV0L3dlc3RjZW50cmFsdXMvY3Jscy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxLzI1L2N1cnJlbnQuY3JsMGygaqBohmZodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwgYGgf6B9hntodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwggIABggrBgEFBQcBAQSCAfIwggHuMH4GCCsGAQUFBzAChnJodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jYWNlcnRzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvY2VydC5jZXIwgYAGCCsGAQUFBzAChnRodHRwOi8vc2Vjb25kYXJ5LWNkbi5wa2kuY29yZS53aW5kb3dzLm5ldC93ZXN0Y2VudHJhbHVzL2NhY2VydHMvY2NtZXdlc3RjZW50cmFsdXNwa2kvY2NtZXdlc3RjZW50cmFsdXNpY2EwMS9jZXJ0LmNlcjBvBggrBgEFBQcwAoZjaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3dlc3RjZW50cmFsdXMvY2FjZXJ0cy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxL2NlcnQuY2VyMHgGCCsGAQUFBzAChmxodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEwDQYJKoZIhvcNAQELBQADggEBAHyESoM-hJA8co5aYFKQj6Yb2naSt-_hW50RjbHBbcf7c32Ujn8L-srkiIyVxkEpzXn0sgWpC8m9Wmwi-IXcD8wG3oPqMrn5ZYvIwrFdrlRwKg23jUltqn23uy8oAzIxCBsBblPSNyWSbEL5Vi52YbLITPHu4uEC7Exy9jJvn6cttL4bste7Sfve85Dd-RbogDrr8HBad8-CN8sHHSyii8mKaK7rq75VE6arRrM28SQgrKJDPrv40C9I6Z5pK40CEUfpYyWTzS6FkLMf7SIjhz0Ilua9xqzb0IO32oVtuv4c-GmmjyJy8FRZzgEYbW_CUh19Gx-9L_Sd5ZzebW5exxE&s=lCnu_9i8m714iUfLrRU7CLC4vhVeRImMzl_1xXO-6f5i8jU_55qKo21Uq9OHQoO0kUS7oxfqEA7fqTegjCaSa5JwAxp_pv48g-M_RSjif7MdOsN2kqHWH4JhZOQKFemWxSDRgeKRBe1s6ZHB3dOilJbTu8nBDtiZIjTvD4nCBiQmP3SIzTThILlPcjMILz2huf2DplGXCD67J_RVe4YcC3N4YY5Rpg6b3EN0m682iiE88AP8m4dfSOgG6xVM88MRhj6ogcBMmnA86uMxyOWKDPATFdmZ2--V2coSReOy71hYopTnKy8puJZqK1ONRheYCzLWrnTGZgt3yIIrqdOuwQ&h=ueUbGdVaaFbxDOgCIYtPrjDE3mQsU2sYDhDAn80qJbA response: body: string: '' @@ -1662,7 +1543,7 @@ interactions: content-length: - '0' date: - - Fri, 16 May 2025 02:43:40 GMT + - Mon, 23 Mar 2026 23:13:20 GMT expires: - '-1' pragma: @@ -1674,11 +1555,11 @@ interactions: x-content-type-options: - nosniff x-ms-operation-identifier: - - tenantId=54826b22-38d6-4fb2-bad9-b7b93a3e9c5a,objectId=d44a2991-98c6-47c3-b59b-2b30d72cfcc2/japaneast/b0474d59-7a68-445b-b28c-3a2fa02ec9ae + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=1de06a28-1a3a-4047-8877-0fb23647661b/westus/fe702fa2-0c70-47ca-bc80-8b8df9ebef1f x-ms-ratelimit-remaining-subscription-global-reads: - - '3749' + - '16499' x-msedge-ref: - - 'Ref A: 331BE25864654E3DB4D9614E57C89BF0 Ref B: TYO201151003054 Ref C: 2025-05-16T02:43:40Z' + - 'Ref A: 7E81047E815641DE801EA4C8DE46C2C3 Ref B: CO6AA3150217021 Ref C: 2026-03-23T23:13:20Z' status: code: 200 message: OK @@ -1698,23 +1579,27 @@ interactions: ParameterSetName: - -n -g -y User-Agent: - - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002?api-version=2025-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002?api-version=2026-01-01-preview response: body: - string: '' + string: '{"sku":{"name":"Standard","tier":"Standard"},"type":"Microsoft.ContainerRegistry/registries","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002","name":"clireg000002","location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-23T23:12:43.689915+00:00","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-23T23:12:43.689915+00:00"},"properties":{"loginServer":"clireg000002.azurecr.io","creationDate":"2026-03-23T23:12:43.689915Z","provisioningState":"Deleting","adminUserEnabled":false,"policies":{"quarantinePolicy":{"status":"disabled"},"trustPolicy":{"type":"Notary","status":"disabled"},"retentionPolicy":{"days":7,"lastUpdatedTime":"2026-03-23T23:12:55.2909443+00:00","status":"disabled"},"exportPolicy":{"status":"enabled"},"azureADAuthenticationAsArmPolicy":{"status":"enabled"},"softDeletePolicy":{"retentionDays":7,"lastUpdatedTime":"2026-03-23T23:12:55.2909943+00:00","status":"disabled"}},"encryption":{"status":"disabled"},"dataEndpointEnabled":false,"regionalEndpoints":"Disabled","dataEndpointHostNames":[],"regionalEndpointHostNames":[],"endpointProtocol":"IPv4","privateEndpointConnections":[],"publicNetworkAccess":"Enabled","networkRuleBypassOptions":"AzureServices","networkRuleBypassAllowedForTasks":false,"zoneRedundancy":"Disabled","anonymousPullEnabled":false,"metadataSearch":"Disabled","roleAssignmentMode":"LegacyRegistryPermissions","autoGeneratedDomainNameLabelScope":"Unsecure"}}' headers: api-supported-versions: - - 2025-03-01-preview + - 2026-01-01-preview cache-control: - no-cache content-length: - - '0' + - '1607' + content-type: + - application/json; charset=utf-8 date: - - Fri, 16 May 2025 02:43:47 GMT + - Mon, 23 Mar 2026 23:13:21 GMT expires: - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerRegistry/locations/westus/operationResults/registries-e264b567-270d-11f1-8b8f-002248bf0ab3?api-version=2026-01-01-preview&t=639099044017664181&c=MIIIJjCCBw6gAwIBAgIQXAg_KQfqNmXWsnKmcWm-CjANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBXQ1VTIENBIDAxMB4XDTI2MDMwMzE4NDAwNFoXDTI2MDgzMDAwNDAwNFowQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCq2QsnpddKa8kR8gt-vA9VEusmZorO2S-vbINESl_vgl_PJICxJntGEX47Fd1DDc76k_3GujB58pb9CVQcLZ3-ca4xBv6hEqbf7VGNJdlUmL6V31uaLBLUMfEySd5hdTIpu4K8C1BsXVfomETR-eBTaEKo7U6rad09i8wEBquSFVf5S7J71JehWC4rsigucyf3uMHNqTzZudQy7Dr4g3o1z8GDPMMNrN8NB6XUfnHR60daMf2EzZU2v746EHu58MN3kAveFfbqRrcWd5-tDS7K-u-_1JBNmgg_vgVE_HIXLJ-H3nSUSgujW4YOVJzkyLbU8xAJiSJ_NeLBYjJyJhCNAgMBAAGjggUkMIIFIDCBnQYDVR0gBIGVMIGSMAwGCisGAQQBgjd7AQEwZgYKKwYBBAGCN3sCAjBYMFYGCCsGAQUFBwICMEoeSAAzADMAZQAwADEAOQAyADEALQA0AGQANgA0AC0ANABmADgAYwAtAGEAMAA1ADUALQA1AGIAZABhAGYAZgBkADUAZQAzADMAZDAMBgorBgEEAYI3ewMCMAwGCisGAQQBgjd7BAIwDAYDVR0TAQH_BAIwADAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDgYDVR0PAQH_BAQDAgWgMB0GA1UdDgQWBBRvNYqFx4fDp-iV_6CV_JvtWzks-DAfBgNVHSMEGDAWgBQU0jfg9tZ9ft2NurplqwSUJeCWHTCCAfsGA1UdHwSCAfIwggHuMHugeaB3hnVodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwfaB7oHmGd2h0dHA6Ly9zZWNvbmRhcnktY2RuLnBraS5jb3JlLndpbmRvd3MubmV0L3dlc3RjZW50cmFsdXMvY3Jscy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxLzI1L2N1cnJlbnQuY3JsMGygaqBohmZodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwgYGgf6B9hntodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwggIABggrBgEFBQcBAQSCAfIwggHuMH4GCCsGAQUFBzAChnJodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jYWNlcnRzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvY2VydC5jZXIwgYAGCCsGAQUFBzAChnRodHRwOi8vc2Vjb25kYXJ5LWNkbi5wa2kuY29yZS53aW5kb3dzLm5ldC93ZXN0Y2VudHJhbHVzL2NhY2VydHMvY2NtZXdlc3RjZW50cmFsdXNwa2kvY2NtZXdlc3RjZW50cmFsdXNpY2EwMS9jZXJ0LmNlcjBvBggrBgEFBQcwAoZjaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3dlc3RjZW50cmFsdXMvY2FjZXJ0cy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxL2NlcnQuY2VyMHgGCCsGAQUFBzAChmxodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEwDQYJKoZIhvcNAQELBQADggEBAHyESoM-hJA8co5aYFKQj6Yb2naSt-_hW50RjbHBbcf7c32Ujn8L-srkiIyVxkEpzXn0sgWpC8m9Wmwi-IXcD8wG3oPqMrn5ZYvIwrFdrlRwKg23jUltqn23uy8oAzIxCBsBblPSNyWSbEL5Vi52YbLITPHu4uEC7Exy9jJvn6cttL4bste7Sfve85Dd-RbogDrr8HBad8-CN8sHHSyii8mKaK7rq75VE6arRrM28SQgrKJDPrv40C9I6Z5pK40CEUfpYyWTzS6FkLMf7SIjhz0Ilua9xqzb0IO32oVtuv4c-GmmjyJy8FRZzgEYbW_CUh19Gx-9L_Sd5ZzebW5exxE&s=UUaDWpU2n918g_SNMJPIfw-gt9Nlr8lfb-X8-zCPjtK6T4O0qJfoB6JdRc5QcsJOsg9f0Wvw9pe-XLAqkAKdy-K7s9GBChrfZddyS2k5hNct8FydichS84zCmXb5HPfZb1rtZ-NWmq2IOGNCG7yBAVriy0pvIgP9dygTRC41AzbMEaULvW6lRP2sw0Rh-RO8sJY8Y6bI51urwINIUgOz35JtWQZxG8syfXhOMC0GdggxM5tt0ivc8XO0790w1X-WGubi4EmqirU_Y08AIDOR97bFbBOxlPcfOpbC0aepof9UiK90r2xeJQ_0lMfafb_CA5UoAjV0SrDOY-789DkYoA&h=v8yUK2KywcwWPDeu1MkETmZWbxDy5UBk4Tbi1V8JBMg pragma: - no-cache strict-transport-security: @@ -1724,13 +1609,107 @@ interactions: x-content-type-options: - nosniff x-ms-operation-identifier: - - tenantId=54826b22-38d6-4fb2-bad9-b7b93a3e9c5a,objectId=d44a2991-98c6-47c3-b59b-2b30d72cfcc2/japaneast/28264c57-0b63-49c7-9483-479f806e8128 + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=1de06a28-1a3a-4047-8877-0fb23647661b/westus/84005a8a-5191-4bbd-bee5-166b5bed8a5c x-ms-ratelimit-remaining-subscription-deletes: - - '199' + - '799' x-ms-ratelimit-remaining-subscription-global-deletes: - - '2999' + - '11999' + x-msedge-ref: + - 'Ref A: D0B2311658FC4CC89DBCCC26564617F1 Ref B: MWH011020807034 Ref C: 2026-03-23T23:13:21Z' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - acr delete + Connection: + - keep-alive + ParameterSetName: + - -n -g -y + User-Agent: + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerRegistry/locations/westus/operationResults/registries-e264b567-270d-11f1-8b8f-002248bf0ab3?api-version=2026-01-01-preview&t=639099044017664181&c=MIIIJjCCBw6gAwIBAgIQXAg_KQfqNmXWsnKmcWm-CjANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBXQ1VTIENBIDAxMB4XDTI2MDMwMzE4NDAwNFoXDTI2MDgzMDAwNDAwNFowQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCq2QsnpddKa8kR8gt-vA9VEusmZorO2S-vbINESl_vgl_PJICxJntGEX47Fd1DDc76k_3GujB58pb9CVQcLZ3-ca4xBv6hEqbf7VGNJdlUmL6V31uaLBLUMfEySd5hdTIpu4K8C1BsXVfomETR-eBTaEKo7U6rad09i8wEBquSFVf5S7J71JehWC4rsigucyf3uMHNqTzZudQy7Dr4g3o1z8GDPMMNrN8NB6XUfnHR60daMf2EzZU2v746EHu58MN3kAveFfbqRrcWd5-tDS7K-u-_1JBNmgg_vgVE_HIXLJ-H3nSUSgujW4YOVJzkyLbU8xAJiSJ_NeLBYjJyJhCNAgMBAAGjggUkMIIFIDCBnQYDVR0gBIGVMIGSMAwGCisGAQQBgjd7AQEwZgYKKwYBBAGCN3sCAjBYMFYGCCsGAQUFBwICMEoeSAAzADMAZQAwADEAOQAyADEALQA0AGQANgA0AC0ANABmADgAYwAtAGEAMAA1ADUALQA1AGIAZABhAGYAZgBkADUAZQAzADMAZDAMBgorBgEEAYI3ewMCMAwGCisGAQQBgjd7BAIwDAYDVR0TAQH_BAIwADAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDgYDVR0PAQH_BAQDAgWgMB0GA1UdDgQWBBRvNYqFx4fDp-iV_6CV_JvtWzks-DAfBgNVHSMEGDAWgBQU0jfg9tZ9ft2NurplqwSUJeCWHTCCAfsGA1UdHwSCAfIwggHuMHugeaB3hnVodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwfaB7oHmGd2h0dHA6Ly9zZWNvbmRhcnktY2RuLnBraS5jb3JlLndpbmRvd3MubmV0L3dlc3RjZW50cmFsdXMvY3Jscy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxLzI1L2N1cnJlbnQuY3JsMGygaqBohmZodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwgYGgf6B9hntodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwggIABggrBgEFBQcBAQSCAfIwggHuMH4GCCsGAQUFBzAChnJodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jYWNlcnRzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvY2VydC5jZXIwgYAGCCsGAQUFBzAChnRodHRwOi8vc2Vjb25kYXJ5LWNkbi5wa2kuY29yZS53aW5kb3dzLm5ldC93ZXN0Y2VudHJhbHVzL2NhY2VydHMvY2NtZXdlc3RjZW50cmFsdXNwa2kvY2NtZXdlc3RjZW50cmFsdXNpY2EwMS9jZXJ0LmNlcjBvBggrBgEFBQcwAoZjaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3dlc3RjZW50cmFsdXMvY2FjZXJ0cy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxL2NlcnQuY2VyMHgGCCsGAQUFBzAChmxodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEwDQYJKoZIhvcNAQELBQADggEBAHyESoM-hJA8co5aYFKQj6Yb2naSt-_hW50RjbHBbcf7c32Ujn8L-srkiIyVxkEpzXn0sgWpC8m9Wmwi-IXcD8wG3oPqMrn5ZYvIwrFdrlRwKg23jUltqn23uy8oAzIxCBsBblPSNyWSbEL5Vi52YbLITPHu4uEC7Exy9jJvn6cttL4bste7Sfve85Dd-RbogDrr8HBad8-CN8sHHSyii8mKaK7rq75VE6arRrM28SQgrKJDPrv40C9I6Z5pK40CEUfpYyWTzS6FkLMf7SIjhz0Ilua9xqzb0IO32oVtuv4c-GmmjyJy8FRZzgEYbW_CUh19Gx-9L_Sd5ZzebW5exxE&s=UUaDWpU2n918g_SNMJPIfw-gt9Nlr8lfb-X8-zCPjtK6T4O0qJfoB6JdRc5QcsJOsg9f0Wvw9pe-XLAqkAKdy-K7s9GBChrfZddyS2k5hNct8FydichS84zCmXb5HPfZb1rtZ-NWmq2IOGNCG7yBAVriy0pvIgP9dygTRC41AzbMEaULvW6lRP2sw0Rh-RO8sJY8Y6bI51urwINIUgOz35JtWQZxG8syfXhOMC0GdggxM5tt0ivc8XO0790w1X-WGubi4EmqirU_Y08AIDOR97bFbBOxlPcfOpbC0aepof9UiK90r2xeJQ_0lMfafb_CA5UoAjV0SrDOY-789DkYoA&h=v8yUK2KywcwWPDeu1MkETmZWbxDy5UBk4Tbi1V8JBMg + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Mon, 23 Mar 2026 23:13:21 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerRegistry/locations/westus/operationResults/registries-e264b567-270d-11f1-8b8f-002248bf0ab3?api-version=2026-01-01-preview&t=639099044021130673&c=MIIHlDCCBnygAwIBAgIQbRZBCnyTTrdKyx3sn6-cIjANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBFVVMyIENBIDAxMB4XDTI2MDIyNDE4NDcwN1oXDTI2MDgyMDAwNDcwN1owQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDLYIfsKK3BxfjRY95DQ7nTiHuQIybDAR8CX9yInjq_0E3Mb9YwMAQGJklR1lZJqg9M7got1ThcwNEpPovodQrXAzXRPqJ0JyNpNf1UNLgRs-3_mYbXxvSrBdgdZL4WUq9XCQ9WaH2aM3MAuLy8FL835sRe_Zx46G3TsI9Grsv5U-8gTr440L6nsopLTJJzQCpxou4KEuTMiG2GpVzxExJwvUDuutVCxXnsUwksDnhFUbqcJ7mVhhK5If25oHTNYUQwYylqvq_5eVdfEXEzpbP3XfDdKxljTnSMHaniaYcYW3OmhIMmdnHNFiPA9LQ2DtYs_7T68xnPVpbVO0EZ2Em5AgMBAAGjggSSMIIEjjCBnQYDVR0gBIGVMIGSMAwGCisGAQQBgjd7AQEwZgYKKwYBBAGCN3sCAjBYMFYGCCsGAQUFBwICMEoeSAAzADMAZQAwADEAOQAyADEALQA0AGQANgA0AC0ANABmADgAYwAtAGEAMAA1ADUALQA1AGIAZABhAGYAZgBkADUAZQAzADMAZDAMBgorBgEEAYI3ewMCMAwGCisGAQQBgjd7BAIwDAYDVR0TAQH_BAIwADAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDgYDVR0PAQH_BAQDAgWgMB0GA1UdDgQWBBQixmODlrY3K7hS01rA8V_TZUhMsjAfBgNVHSMEGDAWgBT87D7bqnwfgh4FuKEG-UPnArMKuTCCAbIGA1UdHwSCAakwggGlMGmgZ6BlhmNodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvZWFzdHVzMi9jcmxzL2NjbWVlYXN0dXMycGtpL2NjbWVlYXN0dXMyaWNhMDEvNjUvY3VycmVudC5jcmwwa6BpoGeGZWh0dHA6Ly9zZWNvbmRhcnktY2RuLnBraS5jb3JlLndpbmRvd3MubmV0L2Vhc3R1czIvY3Jscy9jY21lZWFzdHVzMnBraS9jY21lZWFzdHVzMmljYTAxLzY1L2N1cnJlbnQuY3JsMFqgWKBWhlRodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vZWFzdHVzMi9jcmxzL2NjbWVlYXN0dXMycGtpL2NjbWVlYXN0dXMyaWNhMDEvNjUvY3VycmVudC5jcmwwb6BtoGuGaWh0dHA6Ly9jY21lZWFzdHVzMnBraS5lYXN0dXMyLnBraS5jb3JlLndpbmRvd3MubmV0L2NlcnRpZmljYXRlQXV0aG9yaXRpZXMvY2NtZWVhc3R1czJpY2EwMS82NS9jdXJyZW50LmNybDCCAbcGCCsGAQUFBwEBBIIBqTCCAaUwbAYIKwYBBQUHMAKGYGh0dHA6Ly9wcmltYXJ5LWNkbi5wa2kuY29yZS53aW5kb3dzLm5ldC9lYXN0dXMyL2NhY2VydHMvY2NtZWVhc3R1czJwa2kvY2NtZWVhc3R1czJpY2EwMS9jZXJ0LmNlcjBuBggrBgEFBQcwAoZiaHR0cDovL3NlY29uZGFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvZWFzdHVzMi9jYWNlcnRzL2NjbWVlYXN0dXMycGtpL2NjbWVlYXN0dXMyaWNhMDEvY2VydC5jZXIwXQYIKwYBBQUHMAKGUWh0dHA6Ly9jcmwubWljcm9zb2Z0LmNvbS9lYXN0dXMyL2NhY2VydHMvY2NtZWVhc3R1czJwa2kvY2NtZWVhc3R1czJpY2EwMS9jZXJ0LmNlcjBmBggrBgEFBQcwAoZaaHR0cDovL2NjbWVlYXN0dXMycGtpLmVhc3R1czIucGtpLmNvcmUud2luZG93cy5uZXQvY2VydGlmaWNhdGVBdXRob3JpdGllcy9jY21lZWFzdHVzMmljYTAxMA0GCSqGSIb3DQEBCwUAA4IBAQBKY8uIen-4v_aGTptgf_04u1F6978whzIp4ZiTbOSXPwNnweOy6hCQUcuaqDgVZEiozCZ3DTEQooEcQdtH6WhiCDn5FLdHIVfLyo35uSdRGa9igGbbQ22s_ZI2_Sp17bV5_a-akDuAb6xVSZB_RbHXoicbUykmyHQ2aRb7wLI-YJ4X_aS00yjgBXHLbbbD1PGhTMYVk-5Qy8AYGA2_CTJ0ZS5toZF1EKxkz6ka6D_ROn4Sg7PthZX7Y3YpuVwnCelnvJvOgla_MQjpNDBcgmnVyU-ChBBd3TykrRxVWNXjEm54XPippvvwuKEdc4BCa38ZFVNgvDuK-tY_JpycugPZ&s=e-SrmbSPG5BNIn9v0gqgwdQAkuJPBpwoY6UcorhytA8tRU3FGQ3BdGqUs06oaLPyOmO6_hlfkkwo7dpH0M15z2O17H2L5p9HWmT9zv7P9vKD8RuFRjDQ3wnmHQ9nG6qygtIbiQLhFlMntC8mfDpr4138KqGDq-lqm-zBfW8D8CDyKcCZXtbZsyynqZ5rVYPpPWh-NxyvsBxg0wmgedB1upxQyZtnqNYJX7W1tz6n_LbpY8fic52_YpHChj51gWio8JhL9jZNeAsV3j-BZfgkg-qzsapapovKKrlwu0nVOtxvAEwi-E8m-rTBOkwVV9N7YTm9Ff4eYeL-n45J8eKLPA&h=SObAdI2SGjeaFZjoNsmR5oR-labGayQvcunYfPZal1M + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=1de06a28-1a3a-4047-8877-0fb23647661b/westus2/c99cddd3-c7cc-4d53-b492-a03fdee37a06 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: CC4AA19F91BE479C9717779109A1A1CB Ref B: CO6AA3150220047 Ref C: 2026-03-23T23:13:21Z' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - acr delete + Connection: + - keep-alive + ParameterSetName: + - -n -g -y + User-Agent: + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerRegistry/locations/westus/operationResults/registries-e264b567-270d-11f1-8b8f-002248bf0ab3?api-version=2026-01-01-preview&t=639099044021130673&c=MIIHlDCCBnygAwIBAgIQbRZBCnyTTrdKyx3sn6-cIjANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBFVVMyIENBIDAxMB4XDTI2MDIyNDE4NDcwN1oXDTI2MDgyMDAwNDcwN1owQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDLYIfsKK3BxfjRY95DQ7nTiHuQIybDAR8CX9yInjq_0E3Mb9YwMAQGJklR1lZJqg9M7got1ThcwNEpPovodQrXAzXRPqJ0JyNpNf1UNLgRs-3_mYbXxvSrBdgdZL4WUq9XCQ9WaH2aM3MAuLy8FL835sRe_Zx46G3TsI9Grsv5U-8gTr440L6nsopLTJJzQCpxou4KEuTMiG2GpVzxExJwvUDuutVCxXnsUwksDnhFUbqcJ7mVhhK5If25oHTNYUQwYylqvq_5eVdfEXEzpbP3XfDdKxljTnSMHaniaYcYW3OmhIMmdnHNFiPA9LQ2DtYs_7T68xnPVpbVO0EZ2Em5AgMBAAGjggSSMIIEjjCBnQYDVR0gBIGVMIGSMAwGCisGAQQBgjd7AQEwZgYKKwYBBAGCN3sCAjBYMFYGCCsGAQUFBwICMEoeSAAzADMAZQAwADEAOQAyADEALQA0AGQANgA0AC0ANABmADgAYwAtAGEAMAA1ADUALQA1AGIAZABhAGYAZgBkADUAZQAzADMAZDAMBgorBgEEAYI3ewMCMAwGCisGAQQBgjd7BAIwDAYDVR0TAQH_BAIwADAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDgYDVR0PAQH_BAQDAgWgMB0GA1UdDgQWBBQixmODlrY3K7hS01rA8V_TZUhMsjAfBgNVHSMEGDAWgBT87D7bqnwfgh4FuKEG-UPnArMKuTCCAbIGA1UdHwSCAakwggGlMGmgZ6BlhmNodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvZWFzdHVzMi9jcmxzL2NjbWVlYXN0dXMycGtpL2NjbWVlYXN0dXMyaWNhMDEvNjUvY3VycmVudC5jcmwwa6BpoGeGZWh0dHA6Ly9zZWNvbmRhcnktY2RuLnBraS5jb3JlLndpbmRvd3MubmV0L2Vhc3R1czIvY3Jscy9jY21lZWFzdHVzMnBraS9jY21lZWFzdHVzMmljYTAxLzY1L2N1cnJlbnQuY3JsMFqgWKBWhlRodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vZWFzdHVzMi9jcmxzL2NjbWVlYXN0dXMycGtpL2NjbWVlYXN0dXMyaWNhMDEvNjUvY3VycmVudC5jcmwwb6BtoGuGaWh0dHA6Ly9jY21lZWFzdHVzMnBraS5lYXN0dXMyLnBraS5jb3JlLndpbmRvd3MubmV0L2NlcnRpZmljYXRlQXV0aG9yaXRpZXMvY2NtZWVhc3R1czJpY2EwMS82NS9jdXJyZW50LmNybDCCAbcGCCsGAQUFBwEBBIIBqTCCAaUwbAYIKwYBBQUHMAKGYGh0dHA6Ly9wcmltYXJ5LWNkbi5wa2kuY29yZS53aW5kb3dzLm5ldC9lYXN0dXMyL2NhY2VydHMvY2NtZWVhc3R1czJwa2kvY2NtZWVhc3R1czJpY2EwMS9jZXJ0LmNlcjBuBggrBgEFBQcwAoZiaHR0cDovL3NlY29uZGFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvZWFzdHVzMi9jYWNlcnRzL2NjbWVlYXN0dXMycGtpL2NjbWVlYXN0dXMyaWNhMDEvY2VydC5jZXIwXQYIKwYBBQUHMAKGUWh0dHA6Ly9jcmwubWljcm9zb2Z0LmNvbS9lYXN0dXMyL2NhY2VydHMvY2NtZWVhc3R1czJwa2kvY2NtZWVhc3R1czJpY2EwMS9jZXJ0LmNlcjBmBggrBgEFBQcwAoZaaHR0cDovL2NjbWVlYXN0dXMycGtpLmVhc3R1czIucGtpLmNvcmUud2luZG93cy5uZXQvY2VydGlmaWNhdGVBdXRob3JpdGllcy9jY21lZWFzdHVzMmljYTAxMA0GCSqGSIb3DQEBCwUAA4IBAQBKY8uIen-4v_aGTptgf_04u1F6978whzIp4ZiTbOSXPwNnweOy6hCQUcuaqDgVZEiozCZ3DTEQooEcQdtH6WhiCDn5FLdHIVfLyo35uSdRGa9igGbbQ22s_ZI2_Sp17bV5_a-akDuAb6xVSZB_RbHXoicbUykmyHQ2aRb7wLI-YJ4X_aS00yjgBXHLbbbD1PGhTMYVk-5Qy8AYGA2_CTJ0ZS5toZF1EKxkz6ka6D_ROn4Sg7PthZX7Y3YpuVwnCelnvJvOgla_MQjpNDBcgmnVyU-ChBBd3TykrRxVWNXjEm54XPippvvwuKEdc4BCa38ZFVNgvDuK-tY_JpycugPZ&s=e-SrmbSPG5BNIn9v0gqgwdQAkuJPBpwoY6UcorhytA8tRU3FGQ3BdGqUs06oaLPyOmO6_hlfkkwo7dpH0M15z2O17H2L5p9HWmT9zv7P9vKD8RuFRjDQ3wnmHQ9nG6qygtIbiQLhFlMntC8mfDpr4138KqGDq-lqm-zBfW8D8CDyKcCZXtbZsyynqZ5rVYPpPWh-NxyvsBxg0wmgedB1upxQyZtnqNYJX7W1tz6n_LbpY8fic52_YpHChj51gWio8JhL9jZNeAsV3j-BZfgkg-qzsapapovKKrlwu0nVOtxvAEwi-E8m-rTBOkwVV9N7YTm9Ff4eYeL-n45J8eKLPA&h=SObAdI2SGjeaFZjoNsmR5oR-labGayQvcunYfPZal1M + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Mon, 23 Mar 2026 23:13:32 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=1de06a28-1a3a-4047-8877-0fb23647661b/westus/6cc9230d-ddc5-4d50-8e37-cfd200103f39 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' x-msedge-ref: - - 'Ref A: 80B63FBE80154A6380F197D252D5AC9E Ref B: TYO201151005040 Ref C: 2025-05-16T02:43:42Z' + - 'Ref A: F3F3200762CF4D708DD47A87325006AB Ref B: CO6AA3150217017 Ref C: 2026-03-23T23:13:32Z' status: code: 200 message: OK diff --git a/src/azure-cli/azure/cli/command_modules/acr/tests/latest/recordings/test_acr_cache_managed_identity.yaml b/src/azure-cli/azure/cli/command_modules/acr/tests/latest/recordings/test_acr_cache_managed_identity.yaml new file mode 100644 index 00000000000..51a4159a624 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/acr/tests/latest/recordings/test_acr_cache_managed_identity.yaml @@ -0,0 +1,1126 @@ +interactions: +- request: + body: '{"location": "westus", "sku": {"name": "Standard"}, "properties": {"adminUserEnabled": + false}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - acr create + Connection: + - keep-alive + Content-Length: + - '94' + Content-Type: + - application/json + ParameterSetName: + - -n -g -l --sku + User-Agent: + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002?api-version=2026-01-01-preview + response: + body: + string: '{"sku":{"name":"Standard","tier":"Standard"},"type":"Microsoft.ContainerRegistry/registries","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002","name":"clireg000002","location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-23T23:13:35.6778083+00:00","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-23T23:13:35.6778083+00:00"},"properties":{"loginServer":"clireg000002.azurecr.io","creationDate":"2026-03-23T23:13:35.6778083Z","provisioningState":"Succeeded","adminUserEnabled":false,"policies":{"quarantinePolicy":{"status":"disabled"},"trustPolicy":{"type":"Notary","status":"disabled"},"retentionPolicy":{"days":7,"lastUpdatedTime":"2026-03-23T23:13:44.6009944+00:00","status":"disabled"},"exportPolicy":{"status":"enabled"},"azureADAuthenticationAsArmPolicy":{"status":"enabled"},"softDeletePolicy":{"retentionDays":7,"lastUpdatedTime":"2026-03-23T23:13:44.6010352+00:00","status":"disabled"}},"encryption":{"status":"disabled"},"dataEndpointEnabled":false,"regionalEndpoints":"Disabled","dataEndpointHostNames":[],"regionalEndpointHostNames":[],"endpointProtocol":"IPv4","privateEndpointConnections":[],"publicNetworkAccess":"Enabled","networkRuleBypassOptions":"AzureServices","networkRuleBypassAllowedForTasks":false,"zoneRedundancy":"Disabled","anonymousPullEnabled":false,"metadataSearch":"Disabled","roleAssignmentMode":"LegacyRegistryPermissions","autoGeneratedDomainNameLabelScope":"Unsecure"}}' + headers: + api-supported-versions: + - 2026-01-01-preview + cache-control: + - no-cache + content-length: + - '1611' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 23 Mar 2026 23:13:44 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=1de06a28-1a3a-4047-8877-0fb23647661b/westus2/4dc4f944-892c-4b99-910a-d92b2b4b4ba0 + x-ms-ratelimit-remaining-subscription-global-writes: + - '12000' + x-ms-ratelimit-remaining-subscription-writes: + - '800' + x-msedge-ref: + - 'Ref A: F2A67BFF66474B19ABE1EB0FF34E4C0D Ref B: CO6AA3150219053 Ref C: 2026-03-23T23:13:35Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - identity create + Connection: + - keep-alive + ParameterSetName: + - --name -g + User-Agent: + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2024-11-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","test":"test_acr_cache_managed_identity","date":"2026-03-23T23:13:33Z","module":"acr"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '366' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 23 Mar 2026 23:13:44 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 6D340668072A413D9BBA6E484F18AD7C Ref B: CO6AA3150217011 Ref C: 2026-03-23T23:13:44Z' + status: + code: 200 + message: OK +- request: + body: '{"location": "westus"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - identity create + Connection: + - keep-alive + Content-Length: + - '22' + Content-Type: + - application/json + ParameterSetName: + - --name -g + User-Agent: + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cache-identity000003?api-version=2024-11-30 + response: + body: + string: '{"location":"westus","tags":{},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cache-identity000003","name":"cache-identity000003","type":"Microsoft.ManagedIdentity/userAssignedIdentities","properties":{"isolationScope":"None","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","principalId":"c7a8933f-05a3-4f12-8e9d-d65e7310b705","clientId":"9d7a98d3-1b7c-4d10-9b07-5ef6750990bb"}}' + headers: + cache-control: + - no-cache + content-length: + - '482' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 23 Mar 2026 23:13:46 GMT + expires: + - '-1' + location: + - /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cache-identity000003 + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=1de06a28-1a3a-4047-8877-0fb23647661b/westus/4362ea36-6491-4036-b519-81c783344e9c + x-ms-ratelimit-remaining-subscription-global-writes: + - '11999' + x-ms-ratelimit-remaining-subscription-writes: + - '799' + x-msedge-ref: + - 'Ref A: 9BD17622C4D04753912AA9243F6726B0 Ref B: CO6AA3150217035 Ref C: 2026-03-23T23:13:45Z' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - identity create + Connection: + - keep-alive + ParameterSetName: + - --name -g + User-Agent: + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2024-11-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","test":"test_acr_cache_managed_identity","date":"2026-03-23T23:13:33Z","module":"acr"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '366' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 23 Mar 2026 23:13:46 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 68B75776D3EA4B6ABCFF9A347BAB7465 Ref B: MWH011020807042 Ref C: 2026-03-23T23:13:46Z' + status: + code: 200 + message: OK +- request: + body: '{"location": "westus"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - identity create + Connection: + - keep-alive + Content-Length: + - '22' + Content-Type: + - application/json + ParameterSetName: + - --name -g + User-Agent: + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cache-identity2000004?api-version=2024-11-30 + response: + body: + string: '{"location":"westus","tags":{},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cache-identity2000004","name":"cache-identity2000004","type":"Microsoft.ManagedIdentity/userAssignedIdentities","properties":{"isolationScope":"None","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","principalId":"26c8ddd2-787d-4fa9-b4c5-01900f0fd13d","clientId":"7d678ebc-7b99-4782-a697-4b006ef75f07"}}' + headers: + cache-control: + - no-cache + content-length: + - '484' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 23 Mar 2026 23:13:47 GMT + expires: + - '-1' + location: + - /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cache-identity2000004 + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=1de06a28-1a3a-4047-8877-0fb23647661b/westus/baa6fc4a-ffd4-4de4-b18f-23fb91ceb706 + x-ms-ratelimit-remaining-subscription-global-writes: + - '11999' + x-ms-ratelimit-remaining-subscription-writes: + - '799' + x-msedge-ref: + - 'Ref A: 28673E5271F5491C8615FD1982DFB530 Ref B: MWH011020807034 Ref C: 2026-03-23T23:13:47Z' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - acr cache create + Connection: + - keep-alive + ParameterSetName: + - -n -r -s -t --identity + User-Agent: + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resources?$filter=resourceType%20eq%20%27Microsoft.ContainerRegistry%2Fregistries%27&api-version=2024-11-01 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvarga","name":"anvarga","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dev-anvarga/providers/Microsoft.ManagedIdentity/userAssignedIdentities/anvargaidentity":{"principalId":"bf7b10eb-1784-40fb-bc60-2bc2c780d6a4","clientId":"c8deb855-42ed-432b-99f5-dc9cbc6c8d02"}}},"tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-04-20T21:35:14.9732943Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-10-17T18:24:37.9722734Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvargadev","name":"anvargadev","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus3","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2024-10-16T00:02:46.5515473Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2024-10-16T00:02:46.5515473Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/anvarga-artifactcache/providers/Microsoft.ContainerRegistry/registries/anvargasd","name":"anvargasd","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"australiaeast","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-09-03T18:42:30.1306296Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-07T01:16:30.8836181Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvargacuseuap","name":"anvargacuseuap","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"centraluseuap","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-10-17T05:09:28.2847833Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-10-17T05:09:28.2847833Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvargatargetregistry","name":"anvargatargetregistry","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-11-14T21:32:22.1211214Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-11-14T21:32:22.1211214Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvargacuseuap2","name":"anvargacuseuap2","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"centraluseuap","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-01-16T23:59:03.139671Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-01-16T23:59:03.139671Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/anvarga-artifactcache/providers/Microsoft.ContainerRegistry/registries/anvargaupstreamfirewall","name":"anvargaupstreamfirewall","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-02T19:52:04.3843475Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-02T19:54:36.3753519Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/acranvargalogs","name":"acranvargalogs","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-11T22:00:56.7502595Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-11T22:00:56.7502595Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/abac-artifact-cache/providers/Microsoft.ContainerRegistry/registries/abacupstream","name":"abacupstream","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-16T22:05:31.24Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-16T22:05:31.24Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/abac-artifact-cache/providers/Microsoft.ContainerRegistry/registries/abacdownstream","name":"abacdownstream","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-16T22:06:06.547017Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-16T22:06:06.547017Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf002","name":"perf002","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:47.0749168Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:47.0749168Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf005","name":"perf005","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:36:04.5870512Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-18T14:51:49.3136858Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf000","name":"perf000","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:35.5817756Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:35.5817756Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf003","name":"perf003","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:52.6000756Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:52.6000756Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf001","name":"perf001","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:40.8123499Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:40.8123499Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf004","name":"perf004","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:58.8025388Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:58.8025388Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002","name":"clireg000002","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-23T23:13:35.6778083Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-23T23:13:35.6778083Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/anvarga-demo/providers/Microsoft.ContainerRegistry/registries/anvargadownstream","name":"anvargadownstream","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus2euap","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-01-28T23:23:41.5959636Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-01-28T23:29:01.5110085Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/anvarga-demo/providers/Microsoft.ContainerRegistry/registries/anvargaupstream","name":"anvargaupstream","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus2euap","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-01-28T23:24:03.8642396Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-01-28T23:24:03.8642396Z"}}]}' + headers: + cache-control: + - no-cache + content-length: + - '10257' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 23 Mar 2026 23:13:48 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: DEE44B40315940D4924840F2B6AA4974 Ref B: CO6AA3150217017 Ref C: 2026-03-23T23:13:48Z' + status: + code: 200 + message: OK +- request: + body: '{"properties": {"sourceRepository": "upstreamregistry.azurecr.io/hello-world", + "targetRepository": "hello-world-mi", "credentialSetResourceId": null}, "identity": + {"type": "UserAssigned", "userAssignedIdentities": {"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cache-identity000003": + {}}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - acr cache create + Connection: + - keep-alive + Content-Length: + - '387' + Content-Type: + - application/json + ParameterSetName: + - -n -r -s -t --identity + User-Agent: + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test-mi?api-version=2026-01-01-preview + response: + body: + string: '{"type":"Microsoft.ContainerRegistry/registries/cacheRules","identity":{"type":"userAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cache-identity000003":{"principalId":"c7a8933f-05a3-4f12-8e9d-d65e7310b705","clientId":"9d7a98d3-1b7c-4d10-9b07-5ef6750990bb"}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test-mi","name":"test-mi","systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-23T23:13:49.2823561+00:00","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-23T23:13:49.2823561+00:00"},"properties":{"sourceRepository":"upstreamregistry.azurecr.io/hello-world","targetRepository":"hello-world-mi","creationDate":"2026-03-23T23:13:49.7990725+00:00","provisioningState":"Creating"}}' + headers: + api-supported-versions: + - 2026-01-01-preview + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test-mi/operationStatuses/cacherules-c448aefa-3bdd-49fc-bb0a-f2d92732b320?api-version=2026-01-01-preview&t=639099044298604916&c=MIIIJjCCBw6gAwIBAgIQXAg_KQfqNmXWsnKmcWm-CjANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBXQ1VTIENBIDAxMB4XDTI2MDMwMzE4NDAwNFoXDTI2MDgzMDAwNDAwNFowQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCq2QsnpddKa8kR8gt-vA9VEusmZorO2S-vbINESl_vgl_PJICxJntGEX47Fd1DDc76k_3GujB58pb9CVQcLZ3-ca4xBv6hEqbf7VGNJdlUmL6V31uaLBLUMfEySd5hdTIpu4K8C1BsXVfomETR-eBTaEKo7U6rad09i8wEBquSFVf5S7J71JehWC4rsigucyf3uMHNqTzZudQy7Dr4g3o1z8GDPMMNrN8NB6XUfnHR60daMf2EzZU2v746EHu58MN3kAveFfbqRrcWd5-tDS7K-u-_1JBNmgg_vgVE_HIXLJ-H3nSUSgujW4YOVJzkyLbU8xAJiSJ_NeLBYjJyJhCNAgMBAAGjggUkMIIFIDCBnQYDVR0gBIGVMIGSMAwGCisGAQQBgjd7AQEwZgYKKwYBBAGCN3sCAjBYMFYGCCsGAQUFBwICMEoeSAAzADMAZQAwADEAOQAyADEALQA0AGQANgA0AC0ANABmADgAYwAtAGEAMAA1ADUALQA1AGIAZABhAGYAZgBkADUAZQAzADMAZDAMBgorBgEEAYI3ewMCMAwGCisGAQQBgjd7BAIwDAYDVR0TAQH_BAIwADAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDgYDVR0PAQH_BAQDAgWgMB0GA1UdDgQWBBRvNYqFx4fDp-iV_6CV_JvtWzks-DAfBgNVHSMEGDAWgBQU0jfg9tZ9ft2NurplqwSUJeCWHTCCAfsGA1UdHwSCAfIwggHuMHugeaB3hnVodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwfaB7oHmGd2h0dHA6Ly9zZWNvbmRhcnktY2RuLnBraS5jb3JlLndpbmRvd3MubmV0L3dlc3RjZW50cmFsdXMvY3Jscy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxLzI1L2N1cnJlbnQuY3JsMGygaqBohmZodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwgYGgf6B9hntodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwggIABggrBgEFBQcBAQSCAfIwggHuMH4GCCsGAQUFBzAChnJodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jYWNlcnRzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvY2VydC5jZXIwgYAGCCsGAQUFBzAChnRodHRwOi8vc2Vjb25kYXJ5LWNkbi5wa2kuY29yZS53aW5kb3dzLm5ldC93ZXN0Y2VudHJhbHVzL2NhY2VydHMvY2NtZXdlc3RjZW50cmFsdXNwa2kvY2NtZXdlc3RjZW50cmFsdXNpY2EwMS9jZXJ0LmNlcjBvBggrBgEFBQcwAoZjaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3dlc3RjZW50cmFsdXMvY2FjZXJ0cy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxL2NlcnQuY2VyMHgGCCsGAQUFBzAChmxodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEwDQYJKoZIhvcNAQELBQADggEBAHyESoM-hJA8co5aYFKQj6Yb2naSt-_hW50RjbHBbcf7c32Ujn8L-srkiIyVxkEpzXn0sgWpC8m9Wmwi-IXcD8wG3oPqMrn5ZYvIwrFdrlRwKg23jUltqn23uy8oAzIxCBsBblPSNyWSbEL5Vi52YbLITPHu4uEC7Exy9jJvn6cttL4bste7Sfve85Dd-RbogDrr8HBad8-CN8sHHSyii8mKaK7rq75VE6arRrM28SQgrKJDPrv40C9I6Z5pK40CEUfpYyWTzS6FkLMf7SIjhz0Ilua9xqzb0IO32oVtuv4c-GmmjyJy8FRZzgEYbW_CUh19Gx-9L_Sd5ZzebW5exxE&s=XpxJPTzM2V4MpBLN3xV-MiSM7gKML40nbtKpV4zWPmqKPZKJ3aYMKLhgGVBtSHjWzLra6uOXIV1W2rZxMFYiqs7POwntxgp1-VDmf4KxCsUShOroPFI1AjAtPChOEuw6jQ6IlfxTrTOBTafw8OI9s0s-r7rxgQCUIVIzaLLa487bjuDIRsxl3zWvZ2k9Sy7gRXAsscgdITct4G4IlPTf4t0_DTVc9MAuBItiE-m56y3I95cbMhEzLJyslW1a4csSiRvjGj4flPtEE1vGiSbCRpkdAyY_38JhFCi2pFwSZ6Fn9CCW8nX91E_NhOO22-qNec4HYQmRZ5wgPNuGWwOzuA&h=OGL_BALgIhk6h5va7ON2vYbS1Oy2mZEfc8AsSV1lpjM + cache-control: + - no-cache + content-length: + - '1010' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 23 Mar 2026 23:13:49 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=1de06a28-1a3a-4047-8877-0fb23647661b/westus/d9af3c88-035f-4f82-b2f7-0b5bd99a1a7f + x-ms-ratelimit-remaining-subscription-global-writes: + - '11999' + x-ms-ratelimit-remaining-subscription-writes: + - '799' + x-msedge-ref: + - 'Ref A: D1D36B8C4CF843DC9B97EA849237E658 Ref B: MWH011020807025 Ref C: 2026-03-23T23:13:49Z' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - acr cache create + Connection: + - keep-alive + ParameterSetName: + - -n -r -s -t --identity + User-Agent: + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test-mi/operationStatuses/cacherules-c448aefa-3bdd-49fc-bb0a-f2d92732b320?api-version=2026-01-01-preview&t=639099044298604916&c=MIIIJjCCBw6gAwIBAgIQXAg_KQfqNmXWsnKmcWm-CjANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBXQ1VTIENBIDAxMB4XDTI2MDMwMzE4NDAwNFoXDTI2MDgzMDAwNDAwNFowQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCq2QsnpddKa8kR8gt-vA9VEusmZorO2S-vbINESl_vgl_PJICxJntGEX47Fd1DDc76k_3GujB58pb9CVQcLZ3-ca4xBv6hEqbf7VGNJdlUmL6V31uaLBLUMfEySd5hdTIpu4K8C1BsXVfomETR-eBTaEKo7U6rad09i8wEBquSFVf5S7J71JehWC4rsigucyf3uMHNqTzZudQy7Dr4g3o1z8GDPMMNrN8NB6XUfnHR60daMf2EzZU2v746EHu58MN3kAveFfbqRrcWd5-tDS7K-u-_1JBNmgg_vgVE_HIXLJ-H3nSUSgujW4YOVJzkyLbU8xAJiSJ_NeLBYjJyJhCNAgMBAAGjggUkMIIFIDCBnQYDVR0gBIGVMIGSMAwGCisGAQQBgjd7AQEwZgYKKwYBBAGCN3sCAjBYMFYGCCsGAQUFBwICMEoeSAAzADMAZQAwADEAOQAyADEALQA0AGQANgA0AC0ANABmADgAYwAtAGEAMAA1ADUALQA1AGIAZABhAGYAZgBkADUAZQAzADMAZDAMBgorBgEEAYI3ewMCMAwGCisGAQQBgjd7BAIwDAYDVR0TAQH_BAIwADAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDgYDVR0PAQH_BAQDAgWgMB0GA1UdDgQWBBRvNYqFx4fDp-iV_6CV_JvtWzks-DAfBgNVHSMEGDAWgBQU0jfg9tZ9ft2NurplqwSUJeCWHTCCAfsGA1UdHwSCAfIwggHuMHugeaB3hnVodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwfaB7oHmGd2h0dHA6Ly9zZWNvbmRhcnktY2RuLnBraS5jb3JlLndpbmRvd3MubmV0L3dlc3RjZW50cmFsdXMvY3Jscy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxLzI1L2N1cnJlbnQuY3JsMGygaqBohmZodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwgYGgf6B9hntodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwggIABggrBgEFBQcBAQSCAfIwggHuMH4GCCsGAQUFBzAChnJodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jYWNlcnRzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvY2VydC5jZXIwgYAGCCsGAQUFBzAChnRodHRwOi8vc2Vjb25kYXJ5LWNkbi5wa2kuY29yZS53aW5kb3dzLm5ldC93ZXN0Y2VudHJhbHVzL2NhY2VydHMvY2NtZXdlc3RjZW50cmFsdXNwa2kvY2NtZXdlc3RjZW50cmFsdXNpY2EwMS9jZXJ0LmNlcjBvBggrBgEFBQcwAoZjaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3dlc3RjZW50cmFsdXMvY2FjZXJ0cy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxL2NlcnQuY2VyMHgGCCsGAQUFBzAChmxodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEwDQYJKoZIhvcNAQELBQADggEBAHyESoM-hJA8co5aYFKQj6Yb2naSt-_hW50RjbHBbcf7c32Ujn8L-srkiIyVxkEpzXn0sgWpC8m9Wmwi-IXcD8wG3oPqMrn5ZYvIwrFdrlRwKg23jUltqn23uy8oAzIxCBsBblPSNyWSbEL5Vi52YbLITPHu4uEC7Exy9jJvn6cttL4bste7Sfve85Dd-RbogDrr8HBad8-CN8sHHSyii8mKaK7rq75VE6arRrM28SQgrKJDPrv40C9I6Z5pK40CEUfpYyWTzS6FkLMf7SIjhz0Ilua9xqzb0IO32oVtuv4c-GmmjyJy8FRZzgEYbW_CUh19Gx-9L_Sd5ZzebW5exxE&s=XpxJPTzM2V4MpBLN3xV-MiSM7gKML40nbtKpV4zWPmqKPZKJ3aYMKLhgGVBtSHjWzLra6uOXIV1W2rZxMFYiqs7POwntxgp1-VDmf4KxCsUShOroPFI1AjAtPChOEuw6jQ6IlfxTrTOBTafw8OI9s0s-r7rxgQCUIVIzaLLa487bjuDIRsxl3zWvZ2k9Sy7gRXAsscgdITct4G4IlPTf4t0_DTVc9MAuBItiE-m56y3I95cbMhEzLJyslW1a4csSiRvjGj4flPtEE1vGiSbCRpkdAyY_38JhFCi2pFwSZ6Fn9CCW8nX91E_NhOO22-qNec4HYQmRZ5wgPNuGWwOzuA&h=OGL_BALgIhk6h5va7ON2vYbS1Oy2mZEfc8AsSV1lpjM + response: + body: + string: '{"status":"Creating"}' + headers: + api-supported-versions: + - 2026-01-01-preview + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test-mi/operationStatuses/cacherules-c448aefa-3bdd-49fc-bb0a-f2d92732b320?api-version=2026-01-01-preview&t=639099044302404818&c=MIIIJjCCBw6gAwIBAgIQXAg_KQfqNmXWsnKmcWm-CjANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBXQ1VTIENBIDAxMB4XDTI2MDMwMzE4NDAwNFoXDTI2MDgzMDAwNDAwNFowQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCq2QsnpddKa8kR8gt-vA9VEusmZorO2S-vbINESl_vgl_PJICxJntGEX47Fd1DDc76k_3GujB58pb9CVQcLZ3-ca4xBv6hEqbf7VGNJdlUmL6V31uaLBLUMfEySd5hdTIpu4K8C1BsXVfomETR-eBTaEKo7U6rad09i8wEBquSFVf5S7J71JehWC4rsigucyf3uMHNqTzZudQy7Dr4g3o1z8GDPMMNrN8NB6XUfnHR60daMf2EzZU2v746EHu58MN3kAveFfbqRrcWd5-tDS7K-u-_1JBNmgg_vgVE_HIXLJ-H3nSUSgujW4YOVJzkyLbU8xAJiSJ_NeLBYjJyJhCNAgMBAAGjggUkMIIFIDCBnQYDVR0gBIGVMIGSMAwGCisGAQQBgjd7AQEwZgYKKwYBBAGCN3sCAjBYMFYGCCsGAQUFBwICMEoeSAAzADMAZQAwADEAOQAyADEALQA0AGQANgA0AC0ANABmADgAYwAtAGEAMAA1ADUALQA1AGIAZABhAGYAZgBkADUAZQAzADMAZDAMBgorBgEEAYI3ewMCMAwGCisGAQQBgjd7BAIwDAYDVR0TAQH_BAIwADAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDgYDVR0PAQH_BAQDAgWgMB0GA1UdDgQWBBRvNYqFx4fDp-iV_6CV_JvtWzks-DAfBgNVHSMEGDAWgBQU0jfg9tZ9ft2NurplqwSUJeCWHTCCAfsGA1UdHwSCAfIwggHuMHugeaB3hnVodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwfaB7oHmGd2h0dHA6Ly9zZWNvbmRhcnktY2RuLnBraS5jb3JlLndpbmRvd3MubmV0L3dlc3RjZW50cmFsdXMvY3Jscy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxLzI1L2N1cnJlbnQuY3JsMGygaqBohmZodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwgYGgf6B9hntodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwggIABggrBgEFBQcBAQSCAfIwggHuMH4GCCsGAQUFBzAChnJodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jYWNlcnRzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvY2VydC5jZXIwgYAGCCsGAQUFBzAChnRodHRwOi8vc2Vjb25kYXJ5LWNkbi5wa2kuY29yZS53aW5kb3dzLm5ldC93ZXN0Y2VudHJhbHVzL2NhY2VydHMvY2NtZXdlc3RjZW50cmFsdXNwa2kvY2NtZXdlc3RjZW50cmFsdXNpY2EwMS9jZXJ0LmNlcjBvBggrBgEFBQcwAoZjaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3dlc3RjZW50cmFsdXMvY2FjZXJ0cy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxL2NlcnQuY2VyMHgGCCsGAQUFBzAChmxodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEwDQYJKoZIhvcNAQELBQADggEBAHyESoM-hJA8co5aYFKQj6Yb2naSt-_hW50RjbHBbcf7c32Ujn8L-srkiIyVxkEpzXn0sgWpC8m9Wmwi-IXcD8wG3oPqMrn5ZYvIwrFdrlRwKg23jUltqn23uy8oAzIxCBsBblPSNyWSbEL5Vi52YbLITPHu4uEC7Exy9jJvn6cttL4bste7Sfve85Dd-RbogDrr8HBad8-CN8sHHSyii8mKaK7rq75VE6arRrM28SQgrKJDPrv40C9I6Z5pK40CEUfpYyWTzS6FkLMf7SIjhz0Ilua9xqzb0IO32oVtuv4c-GmmjyJy8FRZzgEYbW_CUh19Gx-9L_Sd5ZzebW5exxE&s=mXEoRMtypba23_NZ_4oIgjS3_ag03gPwI7jLZhjeyGyCUnTBh50bBduav08hp1AfusONAEC4rLrNxiTyUYNdnGLZy0H0fE2C3OG7fIhg0DE9eSRfC1kkf-9hXZNDPDGPSqN1fBHF-w8ap8LchTnXk637jTnRvQYGf_1UYt9etC59vatKPc7rAMVQuSLEvZ5OE4waUG4pLUh6G4hNKSYrnn7C2dNIe5bBZVQyJ9PBUB08z4awu16bdgGIO6aKLwHSLPQx7FWXC3OgjCo_vaMmr3uEcDXT8iNx03kM3hWe-Eq5ARlGmk5_Ppnic-JxKO36eTTdxPdFEUt5L9L2s0lwzQ&h=lC-Pn2lTnuANKuaq6oxEpc0djFa0J7h21Wkr54NCDVc + cache-control: + - no-cache + content-length: + - '21' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 23 Mar 2026 23:13:50 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=1de06a28-1a3a-4047-8877-0fb23647661b/westus/ce21176f-1f73-488f-8bb9-612fb4afb01b + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 513F4331C931416CB9128FA2E16651A6 Ref B: CO6AA3150217045 Ref C: 2026-03-23T23:13:50Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - acr cache create + Connection: + - keep-alive + ParameterSetName: + - -n -r -s -t --identity + User-Agent: + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test-mi/operationStatuses/cacherules-c448aefa-3bdd-49fc-bb0a-f2d92732b320?api-version=2026-01-01-preview&t=639099044298604916&c=MIIIJjCCBw6gAwIBAgIQXAg_KQfqNmXWsnKmcWm-CjANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBXQ1VTIENBIDAxMB4XDTI2MDMwMzE4NDAwNFoXDTI2MDgzMDAwNDAwNFowQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCq2QsnpddKa8kR8gt-vA9VEusmZorO2S-vbINESl_vgl_PJICxJntGEX47Fd1DDc76k_3GujB58pb9CVQcLZ3-ca4xBv6hEqbf7VGNJdlUmL6V31uaLBLUMfEySd5hdTIpu4K8C1BsXVfomETR-eBTaEKo7U6rad09i8wEBquSFVf5S7J71JehWC4rsigucyf3uMHNqTzZudQy7Dr4g3o1z8GDPMMNrN8NB6XUfnHR60daMf2EzZU2v746EHu58MN3kAveFfbqRrcWd5-tDS7K-u-_1JBNmgg_vgVE_HIXLJ-H3nSUSgujW4YOVJzkyLbU8xAJiSJ_NeLBYjJyJhCNAgMBAAGjggUkMIIFIDCBnQYDVR0gBIGVMIGSMAwGCisGAQQBgjd7AQEwZgYKKwYBBAGCN3sCAjBYMFYGCCsGAQUFBwICMEoeSAAzADMAZQAwADEAOQAyADEALQA0AGQANgA0AC0ANABmADgAYwAtAGEAMAA1ADUALQA1AGIAZABhAGYAZgBkADUAZQAzADMAZDAMBgorBgEEAYI3ewMCMAwGCisGAQQBgjd7BAIwDAYDVR0TAQH_BAIwADAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDgYDVR0PAQH_BAQDAgWgMB0GA1UdDgQWBBRvNYqFx4fDp-iV_6CV_JvtWzks-DAfBgNVHSMEGDAWgBQU0jfg9tZ9ft2NurplqwSUJeCWHTCCAfsGA1UdHwSCAfIwggHuMHugeaB3hnVodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwfaB7oHmGd2h0dHA6Ly9zZWNvbmRhcnktY2RuLnBraS5jb3JlLndpbmRvd3MubmV0L3dlc3RjZW50cmFsdXMvY3Jscy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxLzI1L2N1cnJlbnQuY3JsMGygaqBohmZodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwgYGgf6B9hntodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwggIABggrBgEFBQcBAQSCAfIwggHuMH4GCCsGAQUFBzAChnJodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jYWNlcnRzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvY2VydC5jZXIwgYAGCCsGAQUFBzAChnRodHRwOi8vc2Vjb25kYXJ5LWNkbi5wa2kuY29yZS53aW5kb3dzLm5ldC93ZXN0Y2VudHJhbHVzL2NhY2VydHMvY2NtZXdlc3RjZW50cmFsdXNwa2kvY2NtZXdlc3RjZW50cmFsdXNpY2EwMS9jZXJ0LmNlcjBvBggrBgEFBQcwAoZjaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3dlc3RjZW50cmFsdXMvY2FjZXJ0cy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxL2NlcnQuY2VyMHgGCCsGAQUFBzAChmxodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEwDQYJKoZIhvcNAQELBQADggEBAHyESoM-hJA8co5aYFKQj6Yb2naSt-_hW50RjbHBbcf7c32Ujn8L-srkiIyVxkEpzXn0sgWpC8m9Wmwi-IXcD8wG3oPqMrn5ZYvIwrFdrlRwKg23jUltqn23uy8oAzIxCBsBblPSNyWSbEL5Vi52YbLITPHu4uEC7Exy9jJvn6cttL4bste7Sfve85Dd-RbogDrr8HBad8-CN8sHHSyii8mKaK7rq75VE6arRrM28SQgrKJDPrv40C9I6Z5pK40CEUfpYyWTzS6FkLMf7SIjhz0Ilua9xqzb0IO32oVtuv4c-GmmjyJy8FRZzgEYbW_CUh19Gx-9L_Sd5ZzebW5exxE&s=XpxJPTzM2V4MpBLN3xV-MiSM7gKML40nbtKpV4zWPmqKPZKJ3aYMKLhgGVBtSHjWzLra6uOXIV1W2rZxMFYiqs7POwntxgp1-VDmf4KxCsUShOroPFI1AjAtPChOEuw6jQ6IlfxTrTOBTafw8OI9s0s-r7rxgQCUIVIzaLLa487bjuDIRsxl3zWvZ2k9Sy7gRXAsscgdITct4G4IlPTf4t0_DTVc9MAuBItiE-m56y3I95cbMhEzLJyslW1a4csSiRvjGj4flPtEE1vGiSbCRpkdAyY_38JhFCi2pFwSZ6Fn9CCW8nX91E_NhOO22-qNec4HYQmRZ5wgPNuGWwOzuA&h=OGL_BALgIhk6h5va7ON2vYbS1Oy2mZEfc8AsSV1lpjM + response: + body: + string: '{"status":"Succeeded"}' + headers: + api-supported-versions: + - 2026-01-01-preview + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test-mi/operationStatuses/cacherules-c448aefa-3bdd-49fc-bb0a-f2d92732b320?api-version=2026-01-01-preview&t=639099044407598415&c=MIIIJjCCBw6gAwIBAgIQXAg_KQfqNmXWsnKmcWm-CjANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBXQ1VTIENBIDAxMB4XDTI2MDMwMzE4NDAwNFoXDTI2MDgzMDAwNDAwNFowQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCq2QsnpddKa8kR8gt-vA9VEusmZorO2S-vbINESl_vgl_PJICxJntGEX47Fd1DDc76k_3GujB58pb9CVQcLZ3-ca4xBv6hEqbf7VGNJdlUmL6V31uaLBLUMfEySd5hdTIpu4K8C1BsXVfomETR-eBTaEKo7U6rad09i8wEBquSFVf5S7J71JehWC4rsigucyf3uMHNqTzZudQy7Dr4g3o1z8GDPMMNrN8NB6XUfnHR60daMf2EzZU2v746EHu58MN3kAveFfbqRrcWd5-tDS7K-u-_1JBNmgg_vgVE_HIXLJ-H3nSUSgujW4YOVJzkyLbU8xAJiSJ_NeLBYjJyJhCNAgMBAAGjggUkMIIFIDCBnQYDVR0gBIGVMIGSMAwGCisGAQQBgjd7AQEwZgYKKwYBBAGCN3sCAjBYMFYGCCsGAQUFBwICMEoeSAAzADMAZQAwADEAOQAyADEALQA0AGQANgA0AC0ANABmADgAYwAtAGEAMAA1ADUALQA1AGIAZABhAGYAZgBkADUAZQAzADMAZDAMBgorBgEEAYI3ewMCMAwGCisGAQQBgjd7BAIwDAYDVR0TAQH_BAIwADAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDgYDVR0PAQH_BAQDAgWgMB0GA1UdDgQWBBRvNYqFx4fDp-iV_6CV_JvtWzks-DAfBgNVHSMEGDAWgBQU0jfg9tZ9ft2NurplqwSUJeCWHTCCAfsGA1UdHwSCAfIwggHuMHugeaB3hnVodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwfaB7oHmGd2h0dHA6Ly9zZWNvbmRhcnktY2RuLnBraS5jb3JlLndpbmRvd3MubmV0L3dlc3RjZW50cmFsdXMvY3Jscy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxLzI1L2N1cnJlbnQuY3JsMGygaqBohmZodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwgYGgf6B9hntodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwggIABggrBgEFBQcBAQSCAfIwggHuMH4GCCsGAQUFBzAChnJodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jYWNlcnRzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvY2VydC5jZXIwgYAGCCsGAQUFBzAChnRodHRwOi8vc2Vjb25kYXJ5LWNkbi5wa2kuY29yZS53aW5kb3dzLm5ldC93ZXN0Y2VudHJhbHVzL2NhY2VydHMvY2NtZXdlc3RjZW50cmFsdXNwa2kvY2NtZXdlc3RjZW50cmFsdXNpY2EwMS9jZXJ0LmNlcjBvBggrBgEFBQcwAoZjaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3dlc3RjZW50cmFsdXMvY2FjZXJ0cy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxL2NlcnQuY2VyMHgGCCsGAQUFBzAChmxodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEwDQYJKoZIhvcNAQELBQADggEBAHyESoM-hJA8co5aYFKQj6Yb2naSt-_hW50RjbHBbcf7c32Ujn8L-srkiIyVxkEpzXn0sgWpC8m9Wmwi-IXcD8wG3oPqMrn5ZYvIwrFdrlRwKg23jUltqn23uy8oAzIxCBsBblPSNyWSbEL5Vi52YbLITPHu4uEC7Exy9jJvn6cttL4bste7Sfve85Dd-RbogDrr8HBad8-CN8sHHSyii8mKaK7rq75VE6arRrM28SQgrKJDPrv40C9I6Z5pK40CEUfpYyWTzS6FkLMf7SIjhz0Ilua9xqzb0IO32oVtuv4c-GmmjyJy8FRZzgEYbW_CUh19Gx-9L_Sd5ZzebW5exxE&s=PZh7lDPhXxNTC_NrTLd2soSJTI89CFbaC7Ox3aS6K_mbJfco97kdeIhx4kq20red-JGYvioQEF2pzyc9jzQpsU6CbKx72nYSZfMFgkshBrOnAl2i4aHJd3wsVNH-0IksOxyphlJHTaIf9TcAjdJxjyN8kYkrE_EKNzO8UF1xl3K8M8WGySNj9zXSn4sq_BpJki8wCynnBhySq3KXzXcroIKZDeYwxTF_yv5WAgzF1DHnusKsCudj5Q2y7cJzXZdh9pk2IdrtT1NlgLsbkzemtRZ7ckic2ViJL6HXPPWpGI7a8HDK6r66FJr_WfPiWouPHvkugBoJVb6VdcXQzpG5_A&h=fJKil-fQ5PTgFCnXeJpp7YvZeOxSWpawKidtNpsYP0g + cache-control: + - no-cache + content-length: + - '22' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 23 Mar 2026 23:14:00 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=1de06a28-1a3a-4047-8877-0fb23647661b/westus/957d4901-b76f-4054-b007-7ccfa1d77c97 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: F544A4A5D8974A648540665ADC22DA8D Ref B: CO6AA3150217051 Ref C: 2026-03-23T23:14:00Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - acr cache create + Connection: + - keep-alive + ParameterSetName: + - -n -r -s -t --identity + User-Agent: + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test-mi?api-version=2026-01-01-preview + response: + body: + string: '{"type":"Microsoft.ContainerRegistry/registries/cacheRules","identity":{"type":"userAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cache-identity000003":{"principalId":"c7a8933f-05a3-4f12-8e9d-d65e7310b705","clientId":"9d7a98d3-1b7c-4d10-9b07-5ef6750990bb"}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test-mi","name":"test-mi","systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-23T23:13:49.2823561+00:00","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-23T23:13:49.2823561+00:00"},"properties":{"sourceRepository":"upstreamregistry.azurecr.io/hello-world","targetRepository":"hello-world-mi","creationDate":"2026-03-23T23:13:49.7990725+00:00","provisioningState":"Succeeded"}}' + headers: + api-supported-versions: + - 2026-01-01-preview + cache-control: + - no-cache + content-length: + - '1011' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 23 Mar 2026 23:14:00 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=1de06a28-1a3a-4047-8877-0fb23647661b/westus/f3f00af2-61f6-44e2-a241-1341affcb81e + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 9E22EB42FE704B78A5B73414BFFC90D0 Ref B: MWH011020807031 Ref C: 2026-03-23T23:14:00Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - acr cache show + Connection: + - keep-alive + ParameterSetName: + - -n -r -g + User-Agent: + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test-mi?api-version=2026-01-01-preview + response: + body: + string: '{"type":"Microsoft.ContainerRegistry/registries/cacheRules","identity":{"type":"userAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cache-identity000003":{"principalId":"c7a8933f-05a3-4f12-8e9d-d65e7310b705","clientId":"9d7a98d3-1b7c-4d10-9b07-5ef6750990bb"}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test-mi","name":"test-mi","systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-23T23:13:49.2823561+00:00","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-23T23:13:49.2823561+00:00"},"properties":{"sourceRepository":"upstreamregistry.azurecr.io/hello-world","targetRepository":"hello-world-mi","creationDate":"2026-03-23T23:13:49.7990725+00:00","provisioningState":"Succeeded"}}' + headers: + api-supported-versions: + - 2026-01-01-preview + cache-control: + - no-cache + content-length: + - '1011' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 23 Mar 2026 23:14:01 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=1de06a28-1a3a-4047-8877-0fb23647661b/westus/38510fbd-c721-484c-b507-67bc654b3c20 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: E35C4B75FFB048EC80EF1C7007A8992E Ref B: CO6AA3150220035 Ref C: 2026-03-23T23:14:01Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - acr cache update + Connection: + - keep-alive + ParameterSetName: + - -n -r --identity + User-Agent: + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resources?$filter=resourceType%20eq%20%27Microsoft.ContainerRegistry%2Fregistries%27&api-version=2024-11-01 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvarga","name":"anvarga","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dev-anvarga/providers/Microsoft.ManagedIdentity/userAssignedIdentities/anvargaidentity":{"principalId":"bf7b10eb-1784-40fb-bc60-2bc2c780d6a4","clientId":"c8deb855-42ed-432b-99f5-dc9cbc6c8d02"}}},"tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-04-20T21:35:14.9732943Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-10-17T18:24:37.9722734Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvargadev","name":"anvargadev","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus3","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2024-10-16T00:02:46.5515473Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2024-10-16T00:02:46.5515473Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/anvarga-artifactcache/providers/Microsoft.ContainerRegistry/registries/anvargasd","name":"anvargasd","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"australiaeast","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-09-03T18:42:30.1306296Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-07T01:16:30.8836181Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvargacuseuap","name":"anvargacuseuap","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"centraluseuap","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-10-17T05:09:28.2847833Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-10-17T05:09:28.2847833Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvargatargetregistry","name":"anvargatargetregistry","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-11-14T21:32:22.1211214Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-11-14T21:32:22.1211214Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvargacuseuap2","name":"anvargacuseuap2","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"centraluseuap","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-01-16T23:59:03.139671Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-01-16T23:59:03.139671Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/anvarga-artifactcache/providers/Microsoft.ContainerRegistry/registries/anvargaupstreamfirewall","name":"anvargaupstreamfirewall","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-02T19:52:04.3843475Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-02T19:54:36.3753519Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/acranvargalogs","name":"acranvargalogs","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-11T22:00:56.7502595Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-11T22:00:56.7502595Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/abac-artifact-cache/providers/Microsoft.ContainerRegistry/registries/abacupstream","name":"abacupstream","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-16T22:05:31.24Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-16T22:05:31.24Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/abac-artifact-cache/providers/Microsoft.ContainerRegistry/registries/abacdownstream","name":"abacdownstream","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-16T22:06:06.547017Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-16T22:06:06.547017Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf002","name":"perf002","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:47.0749168Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:47.0749168Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf005","name":"perf005","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:36:04.5870512Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-18T14:51:49.3136858Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf000","name":"perf000","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:35.5817756Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:35.5817756Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf003","name":"perf003","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:52.6000756Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:52.6000756Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf001","name":"perf001","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:40.8123499Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:40.8123499Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf004","name":"perf004","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:58.8025388Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:58.8025388Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002","name":"clireg000002","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-23T23:13:35.6778083Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-23T23:13:35.6778083Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/anvarga-demo/providers/Microsoft.ContainerRegistry/registries/anvargadownstream","name":"anvargadownstream","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus2euap","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-01-28T23:23:41.5959636Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-01-28T23:29:01.5110085Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/anvarga-demo/providers/Microsoft.ContainerRegistry/registries/anvargaupstream","name":"anvargaupstream","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus2euap","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-01-28T23:24:03.8642396Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-01-28T23:24:03.8642396Z"}}]}' + headers: + cache-control: + - no-cache + content-length: + - '10257' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 23 Mar 2026 23:14:01 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 45342D20DFE64C3EBE76ED8C9F25D9D6 Ref B: MWH011020808034 Ref C: 2026-03-23T23:14:01Z' + status: + code: 200 + message: OK +- request: + body: '{"properties": {}, "identity": {"type": "UserAssigned", "userAssignedIdentities": + {"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cache-identity2000004": + {}}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - acr cache update + Connection: + - keep-alive + Content-Length: + - '256' + Content-Type: + - application/json + ParameterSetName: + - -n -r --identity + User-Agent: + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test-mi?api-version=2026-01-01-preview + response: + body: + string: '{"type":"Microsoft.ContainerRegistry/registries/cacheRules","identity":{"type":"userAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cache-identity2000004":{"principalId":"26c8ddd2-787d-4fa9-b4c5-01900f0fd13d","clientId":"7d678ebc-7b99-4782-a697-4b006ef75f07"}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test-mi","name":"test-mi","systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-23T23:14:02.3899348+00:00","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-23T23:14:02.3899348+00:00"},"properties":{"sourceRepository":"upstreamregistry.azurecr.io/hello-world","targetRepository":"hello-world-mi","creationDate":"2026-03-23T23:13:49.7990725+00:00","provisioningState":"Updating"}}' + headers: + api-supported-versions: + - 2026-01-01-preview + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test-mi/operationStatuses/cacherules-301c8da3-ad20-41c9-925f-195194862ea1?api-version=2026-01-01-preview&t=639099044429524645&c=MIIIJjCCBw6gAwIBAgIQXAg_KQfqNmXWsnKmcWm-CjANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBXQ1VTIENBIDAxMB4XDTI2MDMwMzE4NDAwNFoXDTI2MDgzMDAwNDAwNFowQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCq2QsnpddKa8kR8gt-vA9VEusmZorO2S-vbINESl_vgl_PJICxJntGEX47Fd1DDc76k_3GujB58pb9CVQcLZ3-ca4xBv6hEqbf7VGNJdlUmL6V31uaLBLUMfEySd5hdTIpu4K8C1BsXVfomETR-eBTaEKo7U6rad09i8wEBquSFVf5S7J71JehWC4rsigucyf3uMHNqTzZudQy7Dr4g3o1z8GDPMMNrN8NB6XUfnHR60daMf2EzZU2v746EHu58MN3kAveFfbqRrcWd5-tDS7K-u-_1JBNmgg_vgVE_HIXLJ-H3nSUSgujW4YOVJzkyLbU8xAJiSJ_NeLBYjJyJhCNAgMBAAGjggUkMIIFIDCBnQYDVR0gBIGVMIGSMAwGCisGAQQBgjd7AQEwZgYKKwYBBAGCN3sCAjBYMFYGCCsGAQUFBwICMEoeSAAzADMAZQAwADEAOQAyADEALQA0AGQANgA0AC0ANABmADgAYwAtAGEAMAA1ADUALQA1AGIAZABhAGYAZgBkADUAZQAzADMAZDAMBgorBgEEAYI3ewMCMAwGCisGAQQBgjd7BAIwDAYDVR0TAQH_BAIwADAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDgYDVR0PAQH_BAQDAgWgMB0GA1UdDgQWBBRvNYqFx4fDp-iV_6CV_JvtWzks-DAfBgNVHSMEGDAWgBQU0jfg9tZ9ft2NurplqwSUJeCWHTCCAfsGA1UdHwSCAfIwggHuMHugeaB3hnVodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwfaB7oHmGd2h0dHA6Ly9zZWNvbmRhcnktY2RuLnBraS5jb3JlLndpbmRvd3MubmV0L3dlc3RjZW50cmFsdXMvY3Jscy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxLzI1L2N1cnJlbnQuY3JsMGygaqBohmZodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwgYGgf6B9hntodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwggIABggrBgEFBQcBAQSCAfIwggHuMH4GCCsGAQUFBzAChnJodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jYWNlcnRzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvY2VydC5jZXIwgYAGCCsGAQUFBzAChnRodHRwOi8vc2Vjb25kYXJ5LWNkbi5wa2kuY29yZS53aW5kb3dzLm5ldC93ZXN0Y2VudHJhbHVzL2NhY2VydHMvY2NtZXdlc3RjZW50cmFsdXNwa2kvY2NtZXdlc3RjZW50cmFsdXNpY2EwMS9jZXJ0LmNlcjBvBggrBgEFBQcwAoZjaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3dlc3RjZW50cmFsdXMvY2FjZXJ0cy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxL2NlcnQuY2VyMHgGCCsGAQUFBzAChmxodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEwDQYJKoZIhvcNAQELBQADggEBAHyESoM-hJA8co5aYFKQj6Yb2naSt-_hW50RjbHBbcf7c32Ujn8L-srkiIyVxkEpzXn0sgWpC8m9Wmwi-IXcD8wG3oPqMrn5ZYvIwrFdrlRwKg23jUltqn23uy8oAzIxCBsBblPSNyWSbEL5Vi52YbLITPHu4uEC7Exy9jJvn6cttL4bste7Sfve85Dd-RbogDrr8HBad8-CN8sHHSyii8mKaK7rq75VE6arRrM28SQgrKJDPrv40C9I6Z5pK40CEUfpYyWTzS6FkLMf7SIjhz0Ilua9xqzb0IO32oVtuv4c-GmmjyJy8FRZzgEYbW_CUh19Gx-9L_Sd5ZzebW5exxE&s=VznQCfEWTcRGkRlv_QUjY0ikPpd2MddCmSNvKa9MOB_N7d8xgfEBIQXa3-axvqlBm7-zjMTAv728JSKihx1M8KPFAxMrJCG-RbZiMnZlwVynu_UyUAOu9REXrkZm_nAhTJ8ZNyynWGCS848hlUvVE1GK4WRBNFv2WDCGuVkTghm-fhA08almf_4xGsxTPFJBwovrriN8La57wovNhSl2Vr0ySh5oQv06icu9WtR8-u6mXkf83ADLMyu8eEtLvFqcVXY7M0ILtCot-fk8pvUMnBTLBiHJdOZgDKsufL298Qho3X1hf-dU34piDI5k5dd70zBKlCloM62ZFz3-lN7DFg&h=VLDKs68RQws_V-Bb_YDuYJRTSK3uTnMCaX0RooyB8fo + cache-control: + - no-cache + content-length: + - '1011' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 23 Mar 2026 23:14:02 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=1de06a28-1a3a-4047-8877-0fb23647661b/westus/0faada9a-1a13-4e38-9df4-a77cbe877bc9 + x-ms-ratelimit-remaining-subscription-global-writes: + - '11999' + x-ms-ratelimit-remaining-subscription-writes: + - '799' + x-msedge-ref: + - 'Ref A: F221E9F7B31941EBA47386DEA39E3B0C Ref B: CO6AA3150217039 Ref C: 2026-03-23T23:14:02Z' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - acr cache update + Connection: + - keep-alive + ParameterSetName: + - -n -r --identity + User-Agent: + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test-mi/operationStatuses/cacherules-301c8da3-ad20-41c9-925f-195194862ea1?api-version=2026-01-01-preview&t=639099044429524645&c=MIIIJjCCBw6gAwIBAgIQXAg_KQfqNmXWsnKmcWm-CjANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBXQ1VTIENBIDAxMB4XDTI2MDMwMzE4NDAwNFoXDTI2MDgzMDAwNDAwNFowQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCq2QsnpddKa8kR8gt-vA9VEusmZorO2S-vbINESl_vgl_PJICxJntGEX47Fd1DDc76k_3GujB58pb9CVQcLZ3-ca4xBv6hEqbf7VGNJdlUmL6V31uaLBLUMfEySd5hdTIpu4K8C1BsXVfomETR-eBTaEKo7U6rad09i8wEBquSFVf5S7J71JehWC4rsigucyf3uMHNqTzZudQy7Dr4g3o1z8GDPMMNrN8NB6XUfnHR60daMf2EzZU2v746EHu58MN3kAveFfbqRrcWd5-tDS7K-u-_1JBNmgg_vgVE_HIXLJ-H3nSUSgujW4YOVJzkyLbU8xAJiSJ_NeLBYjJyJhCNAgMBAAGjggUkMIIFIDCBnQYDVR0gBIGVMIGSMAwGCisGAQQBgjd7AQEwZgYKKwYBBAGCN3sCAjBYMFYGCCsGAQUFBwICMEoeSAAzADMAZQAwADEAOQAyADEALQA0AGQANgA0AC0ANABmADgAYwAtAGEAMAA1ADUALQA1AGIAZABhAGYAZgBkADUAZQAzADMAZDAMBgorBgEEAYI3ewMCMAwGCisGAQQBgjd7BAIwDAYDVR0TAQH_BAIwADAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDgYDVR0PAQH_BAQDAgWgMB0GA1UdDgQWBBRvNYqFx4fDp-iV_6CV_JvtWzks-DAfBgNVHSMEGDAWgBQU0jfg9tZ9ft2NurplqwSUJeCWHTCCAfsGA1UdHwSCAfIwggHuMHugeaB3hnVodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwfaB7oHmGd2h0dHA6Ly9zZWNvbmRhcnktY2RuLnBraS5jb3JlLndpbmRvd3MubmV0L3dlc3RjZW50cmFsdXMvY3Jscy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxLzI1L2N1cnJlbnQuY3JsMGygaqBohmZodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwgYGgf6B9hntodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwggIABggrBgEFBQcBAQSCAfIwggHuMH4GCCsGAQUFBzAChnJodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jYWNlcnRzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvY2VydC5jZXIwgYAGCCsGAQUFBzAChnRodHRwOi8vc2Vjb25kYXJ5LWNkbi5wa2kuY29yZS53aW5kb3dzLm5ldC93ZXN0Y2VudHJhbHVzL2NhY2VydHMvY2NtZXdlc3RjZW50cmFsdXNwa2kvY2NtZXdlc3RjZW50cmFsdXNpY2EwMS9jZXJ0LmNlcjBvBggrBgEFBQcwAoZjaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3dlc3RjZW50cmFsdXMvY2FjZXJ0cy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxL2NlcnQuY2VyMHgGCCsGAQUFBzAChmxodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEwDQYJKoZIhvcNAQELBQADggEBAHyESoM-hJA8co5aYFKQj6Yb2naSt-_hW50RjbHBbcf7c32Ujn8L-srkiIyVxkEpzXn0sgWpC8m9Wmwi-IXcD8wG3oPqMrn5ZYvIwrFdrlRwKg23jUltqn23uy8oAzIxCBsBblPSNyWSbEL5Vi52YbLITPHu4uEC7Exy9jJvn6cttL4bste7Sfve85Dd-RbogDrr8HBad8-CN8sHHSyii8mKaK7rq75VE6arRrM28SQgrKJDPrv40C9I6Z5pK40CEUfpYyWTzS6FkLMf7SIjhz0Ilua9xqzb0IO32oVtuv4c-GmmjyJy8FRZzgEYbW_CUh19Gx-9L_Sd5ZzebW5exxE&s=VznQCfEWTcRGkRlv_QUjY0ikPpd2MddCmSNvKa9MOB_N7d8xgfEBIQXa3-axvqlBm7-zjMTAv728JSKihx1M8KPFAxMrJCG-RbZiMnZlwVynu_UyUAOu9REXrkZm_nAhTJ8ZNyynWGCS848hlUvVE1GK4WRBNFv2WDCGuVkTghm-fhA08almf_4xGsxTPFJBwovrriN8La57wovNhSl2Vr0ySh5oQv06icu9WtR8-u6mXkf83ADLMyu8eEtLvFqcVXY7M0ILtCot-fk8pvUMnBTLBiHJdOZgDKsufL298Qho3X1hf-dU34piDI5k5dd70zBKlCloM62ZFz3-lN7DFg&h=VLDKs68RQws_V-Bb_YDuYJRTSK3uTnMCaX0RooyB8fo + response: + body: + string: '{"status":"Succeeded"}' + headers: + api-supported-versions: + - 2026-01-01-preview + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test-mi/operationStatuses/cacherules-301c8da3-ad20-41c9-925f-195194862ea1?api-version=2026-01-01-preview&t=639099044452254109&c=MIIIJjCCBw6gAwIBAgIQXAg_KQfqNmXWsnKmcWm-CjANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBXQ1VTIENBIDAxMB4XDTI2MDMwMzE4NDAwNFoXDTI2MDgzMDAwNDAwNFowQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCq2QsnpddKa8kR8gt-vA9VEusmZorO2S-vbINESl_vgl_PJICxJntGEX47Fd1DDc76k_3GujB58pb9CVQcLZ3-ca4xBv6hEqbf7VGNJdlUmL6V31uaLBLUMfEySd5hdTIpu4K8C1BsXVfomETR-eBTaEKo7U6rad09i8wEBquSFVf5S7J71JehWC4rsigucyf3uMHNqTzZudQy7Dr4g3o1z8GDPMMNrN8NB6XUfnHR60daMf2EzZU2v746EHu58MN3kAveFfbqRrcWd5-tDS7K-u-_1JBNmgg_vgVE_HIXLJ-H3nSUSgujW4YOVJzkyLbU8xAJiSJ_NeLBYjJyJhCNAgMBAAGjggUkMIIFIDCBnQYDVR0gBIGVMIGSMAwGCisGAQQBgjd7AQEwZgYKKwYBBAGCN3sCAjBYMFYGCCsGAQUFBwICMEoeSAAzADMAZQAwADEAOQAyADEALQA0AGQANgA0AC0ANABmADgAYwAtAGEAMAA1ADUALQA1AGIAZABhAGYAZgBkADUAZQAzADMAZDAMBgorBgEEAYI3ewMCMAwGCisGAQQBgjd7BAIwDAYDVR0TAQH_BAIwADAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDgYDVR0PAQH_BAQDAgWgMB0GA1UdDgQWBBRvNYqFx4fDp-iV_6CV_JvtWzks-DAfBgNVHSMEGDAWgBQU0jfg9tZ9ft2NurplqwSUJeCWHTCCAfsGA1UdHwSCAfIwggHuMHugeaB3hnVodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwfaB7oHmGd2h0dHA6Ly9zZWNvbmRhcnktY2RuLnBraS5jb3JlLndpbmRvd3MubmV0L3dlc3RjZW50cmFsdXMvY3Jscy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxLzI1L2N1cnJlbnQuY3JsMGygaqBohmZodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwgYGgf6B9hntodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwggIABggrBgEFBQcBAQSCAfIwggHuMH4GCCsGAQUFBzAChnJodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jYWNlcnRzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvY2VydC5jZXIwgYAGCCsGAQUFBzAChnRodHRwOi8vc2Vjb25kYXJ5LWNkbi5wa2kuY29yZS53aW5kb3dzLm5ldC93ZXN0Y2VudHJhbHVzL2NhY2VydHMvY2NtZXdlc3RjZW50cmFsdXNwa2kvY2NtZXdlc3RjZW50cmFsdXNpY2EwMS9jZXJ0LmNlcjBvBggrBgEFBQcwAoZjaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3dlc3RjZW50cmFsdXMvY2FjZXJ0cy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxL2NlcnQuY2VyMHgGCCsGAQUFBzAChmxodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEwDQYJKoZIhvcNAQELBQADggEBAHyESoM-hJA8co5aYFKQj6Yb2naSt-_hW50RjbHBbcf7c32Ujn8L-srkiIyVxkEpzXn0sgWpC8m9Wmwi-IXcD8wG3oPqMrn5ZYvIwrFdrlRwKg23jUltqn23uy8oAzIxCBsBblPSNyWSbEL5Vi52YbLITPHu4uEC7Exy9jJvn6cttL4bste7Sfve85Dd-RbogDrr8HBad8-CN8sHHSyii8mKaK7rq75VE6arRrM28SQgrKJDPrv40C9I6Z5pK40CEUfpYyWTzS6FkLMf7SIjhz0Ilua9xqzb0IO32oVtuv4c-GmmjyJy8FRZzgEYbW_CUh19Gx-9L_Sd5ZzebW5exxE&s=WhDRfBWdJCHgRraMIdLihLUMrpNXJg0EU5lcAC8NY57lMs298ufYXck4ERSJpyu-HM6Rjl3_n2VVfwlsZANPuLppX0hJZibq6thE0nuCZlgKwDP1i6lfuzkzDRhrUOSdVnh5Odix09AO-1U-Qxw5i_1TawnDK_W4928Bz-Nl6sB3GQPlfoA5jCC5-dQbIqeN1BRhduzuyAFBhnz3cMwNLHuV9DUNr-TC9P38u63_LkjeN6uhyMwvrxv7MG0sCFgCh0FwKSktryRBUZAMPAniOIwBe2tQuixHb2IXAiMjlD6FqdTiksX7xjEp7x6Y1yv90FOxKKFK8NVNQ2r2rrp6WA&h=g89Q7maqVohpJ2-MKukA7z0oeKdpOW1U66mveRli26g + cache-control: + - no-cache + content-length: + - '22' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 23 Mar 2026 23:14:05 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=1de06a28-1a3a-4047-8877-0fb23647661b/westus/eee60fbd-6aeb-4b64-82e1-b7ac22b46ea2 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: B8C8805C3C7A4B0CB6C78D389780181A Ref B: CO6AA3150220051 Ref C: 2026-03-23T23:14:05Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - acr cache update + Connection: + - keep-alive + ParameterSetName: + - -n -r --identity + User-Agent: + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test-mi?api-version=2026-01-01-preview + response: + body: + string: '{"type":"Microsoft.ContainerRegistry/registries/cacheRules","identity":{"type":"userAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cache-identity2000004":{"principalId":"26c8ddd2-787d-4fa9-b4c5-01900f0fd13d","clientId":"7d678ebc-7b99-4782-a697-4b006ef75f07"}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test-mi","name":"test-mi","systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-23T23:14:02.3899348+00:00","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-23T23:14:02.3899348+00:00"},"properties":{"sourceRepository":"upstreamregistry.azurecr.io/hello-world","targetRepository":"hello-world-mi","creationDate":"2026-03-23T23:13:49.7990725+00:00","provisioningState":"Succeeded"}}' + headers: + api-supported-versions: + - 2026-01-01-preview + cache-control: + - no-cache + content-length: + - '1012' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 23 Mar 2026 23:14:04 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=1de06a28-1a3a-4047-8877-0fb23647661b/westus/113bee7e-609c-441a-8737-c65e54a4cbd4 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 15092993D2B84E27969166F0DCA6A2C8 Ref B: MWH011020806031 Ref C: 2026-03-23T23:14:05Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - acr cache delete + Connection: + - keep-alive + ParameterSetName: + - -n -r -y + User-Agent: + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resources?$filter=resourceType%20eq%20%27Microsoft.ContainerRegistry%2Fregistries%27&api-version=2024-11-01 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvarga","name":"anvarga","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dev-anvarga/providers/Microsoft.ManagedIdentity/userAssignedIdentities/anvargaidentity":{"principalId":"bf7b10eb-1784-40fb-bc60-2bc2c780d6a4","clientId":"c8deb855-42ed-432b-99f5-dc9cbc6c8d02"}}},"tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-04-20T21:35:14.9732943Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-10-17T18:24:37.9722734Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvargadev","name":"anvargadev","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"westus3","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2024-10-16T00:02:46.5515473Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2024-10-16T00:02:46.5515473Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/anvarga-artifactcache/providers/Microsoft.ContainerRegistry/registries/anvargasd","name":"anvargasd","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"australiaeast","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-09-03T18:42:30.1306296Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-07T01:16:30.8836181Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvargacuseuap","name":"anvargacuseuap","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"centraluseuap","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-10-17T05:09:28.2847833Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-10-17T05:09:28.2847833Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvargatargetregistry","name":"anvargatargetregistry","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2025-11-14T21:32:22.1211214Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2025-11-14T21:32:22.1211214Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/anvargacuseuap2","name":"anvargacuseuap2","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"centraluseuap","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-01-16T23:59:03.139671Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-01-16T23:59:03.139671Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/anvarga-artifactcache/providers/Microsoft.ContainerRegistry/registries/anvargaupstreamfirewall","name":"anvargaupstreamfirewall","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-02T19:52:04.3843475Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-02T19:54:36.3753519Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dev-anvarga/providers/Microsoft.ContainerRegistry/registries/acranvargalogs","name":"acranvargalogs","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-11T22:00:56.7502595Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-11T22:00:56.7502595Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/abac-artifact-cache/providers/Microsoft.ContainerRegistry/registries/abacupstream","name":"abacupstream","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-16T22:05:31.24Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-16T22:05:31.24Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/abac-artifact-cache/providers/Microsoft.ContainerRegistry/registries/abacdownstream","name":"abacdownstream","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-16T22:06:06.547017Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-16T22:06:06.547017Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf002","name":"perf002","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:47.0749168Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:47.0749168Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf005","name":"perf005","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:36:04.5870512Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-18T14:51:49.3136858Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf000","name":"perf000","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:35.5817756Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:35.5817756Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf003","name":"perf003","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:52.6000756Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:52.6000756Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf001","name":"perf001","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:40.8123499Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:40.8123499Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/performance/providers/Microsoft.ContainerRegistry/registries/perf004","name":"perf004","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"southcentralus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2021-03-15T23:35:58.8025388Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2021-03-15T23:35:58.8025388Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002","name":"clireg000002","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Standard","tier":"Standard"},"location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-23T23:13:35.6778083Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-23T23:13:35.6778083Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/anvarga-demo/providers/Microsoft.ContainerRegistry/registries/anvargadownstream","name":"anvargadownstream","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus2euap","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-01-28T23:23:41.5959636Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-01-28T23:29:01.5110085Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/anvarga-demo/providers/Microsoft.ContainerRegistry/registries/anvargaupstream","name":"anvargaupstream","type":"Microsoft.ContainerRegistry/registries","sku":{"name":"Premium","tier":"Premium"},"location":"eastus2euap","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-01-28T23:24:03.8642396Z","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-01-28T23:24:03.8642396Z"}}]}' + headers: + cache-control: + - no-cache + content-length: + - '10257' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 23 Mar 2026 23:14:05 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: DD2DD8F12D0344BA9F23791388961EC4 Ref B: MWH011020806025 Ref C: 2026-03-23T23:14:05Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - acr cache delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -n -r -y + User-Agent: + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/cacheRules/test-mi?api-version=2026-01-01-preview + response: + body: + string: '' + headers: + api-supported-versions: + - 2026-01-01-preview + cache-control: + - no-cache + content-length: + - '0' + date: + - Mon, 23 Mar 2026 23:14:05 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerRegistry/locations/WESTUS/operationResults/cacherules-c8bbce07-c677-4d60-af43-8751db5b2fcd?api-version=2026-01-01-preview&t=639099044462488292&c=MIIIJjCCBw6gAwIBAgIQXAg_KQfqNmXWsnKmcWm-CjANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBXQ1VTIENBIDAxMB4XDTI2MDMwMzE4NDAwNFoXDTI2MDgzMDAwNDAwNFowQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCq2QsnpddKa8kR8gt-vA9VEusmZorO2S-vbINESl_vgl_PJICxJntGEX47Fd1DDc76k_3GujB58pb9CVQcLZ3-ca4xBv6hEqbf7VGNJdlUmL6V31uaLBLUMfEySd5hdTIpu4K8C1BsXVfomETR-eBTaEKo7U6rad09i8wEBquSFVf5S7J71JehWC4rsigucyf3uMHNqTzZudQy7Dr4g3o1z8GDPMMNrN8NB6XUfnHR60daMf2EzZU2v746EHu58MN3kAveFfbqRrcWd5-tDS7K-u-_1JBNmgg_vgVE_HIXLJ-H3nSUSgujW4YOVJzkyLbU8xAJiSJ_NeLBYjJyJhCNAgMBAAGjggUkMIIFIDCBnQYDVR0gBIGVMIGSMAwGCisGAQQBgjd7AQEwZgYKKwYBBAGCN3sCAjBYMFYGCCsGAQUFBwICMEoeSAAzADMAZQAwADEAOQAyADEALQA0AGQANgA0AC0ANABmADgAYwAtAGEAMAA1ADUALQA1AGIAZABhAGYAZgBkADUAZQAzADMAZDAMBgorBgEEAYI3ewMCMAwGCisGAQQBgjd7BAIwDAYDVR0TAQH_BAIwADAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDgYDVR0PAQH_BAQDAgWgMB0GA1UdDgQWBBRvNYqFx4fDp-iV_6CV_JvtWzks-DAfBgNVHSMEGDAWgBQU0jfg9tZ9ft2NurplqwSUJeCWHTCCAfsGA1UdHwSCAfIwggHuMHugeaB3hnVodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwfaB7oHmGd2h0dHA6Ly9zZWNvbmRhcnktY2RuLnBraS5jb3JlLndpbmRvd3MubmV0L3dlc3RjZW50cmFsdXMvY3Jscy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxLzI1L2N1cnJlbnQuY3JsMGygaqBohmZodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwgYGgf6B9hntodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwggIABggrBgEFBQcBAQSCAfIwggHuMH4GCCsGAQUFBzAChnJodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jYWNlcnRzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvY2VydC5jZXIwgYAGCCsGAQUFBzAChnRodHRwOi8vc2Vjb25kYXJ5LWNkbi5wa2kuY29yZS53aW5kb3dzLm5ldC93ZXN0Y2VudHJhbHVzL2NhY2VydHMvY2NtZXdlc3RjZW50cmFsdXNwa2kvY2NtZXdlc3RjZW50cmFsdXNpY2EwMS9jZXJ0LmNlcjBvBggrBgEFBQcwAoZjaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3dlc3RjZW50cmFsdXMvY2FjZXJ0cy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxL2NlcnQuY2VyMHgGCCsGAQUFBzAChmxodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEwDQYJKoZIhvcNAQELBQADggEBAHyESoM-hJA8co5aYFKQj6Yb2naSt-_hW50RjbHBbcf7c32Ujn8L-srkiIyVxkEpzXn0sgWpC8m9Wmwi-IXcD8wG3oPqMrn5ZYvIwrFdrlRwKg23jUltqn23uy8oAzIxCBsBblPSNyWSbEL5Vi52YbLITPHu4uEC7Exy9jJvn6cttL4bste7Sfve85Dd-RbogDrr8HBad8-CN8sHHSyii8mKaK7rq75VE6arRrM28SQgrKJDPrv40C9I6Z5pK40CEUfpYyWTzS6FkLMf7SIjhz0Ilua9xqzb0IO32oVtuv4c-GmmjyJy8FRZzgEYbW_CUh19Gx-9L_Sd5ZzebW5exxE&s=LFCESG-KkUB5nPqMQzdBXoO8KEadqxYhSmKXuUrYEenRLoPbs5i0mVRAtAhKZDXOJOxaiCtvsdNaz9pA99LySxuau6AwFmkxsSTMHpZFqL3wdpyG2reyQa49vtPMbInoqBmA-nd7WFiXf04CFI0DJWajZgiLm5P8ucflJEMgemv_jjQvdy8_9curlyBd7JOuwVp8-zp3hz7Wg9uz83VLRqSqxJG1Al1aMW2tdvUxgRL24GA35ASGI7xPEghE4UxGHLIEEsWqQHQHJwX_8nYGtvDJ6NEzOBkoLpn53UMMFdIOoIVmrqWo8oTgdxOpVTShgznekfZByDNljzey-tGkPA&h=XNrzBkvtXhHpLbeN4uldWTwENPFkUC_L6M-6WRbwKsc + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=1de06a28-1a3a-4047-8877-0fb23647661b/westus/bf3825df-5839-4f40-a649-dea8c028a958 + x-ms-ratelimit-remaining-subscription-deletes: + - '799' + x-ms-ratelimit-remaining-subscription-global-deletes: + - '11999' + x-msedge-ref: + - 'Ref A: 9D68934286C04BB4833D298E75541D36 Ref B: MWH011020808052 Ref C: 2026-03-23T23:14:05Z' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - acr cache delete + Connection: + - keep-alive + ParameterSetName: + - -n -r -y + User-Agent: + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerRegistry/locations/WESTUS/operationResults/cacherules-c8bbce07-c677-4d60-af43-8751db5b2fcd?api-version=2026-01-01-preview&t=639099044462488292&c=MIIIJjCCBw6gAwIBAgIQXAg_KQfqNmXWsnKmcWm-CjANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBXQ1VTIENBIDAxMB4XDTI2MDMwMzE4NDAwNFoXDTI2MDgzMDAwNDAwNFowQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCq2QsnpddKa8kR8gt-vA9VEusmZorO2S-vbINESl_vgl_PJICxJntGEX47Fd1DDc76k_3GujB58pb9CVQcLZ3-ca4xBv6hEqbf7VGNJdlUmL6V31uaLBLUMfEySd5hdTIpu4K8C1BsXVfomETR-eBTaEKo7U6rad09i8wEBquSFVf5S7J71JehWC4rsigucyf3uMHNqTzZudQy7Dr4g3o1z8GDPMMNrN8NB6XUfnHR60daMf2EzZU2v746EHu58MN3kAveFfbqRrcWd5-tDS7K-u-_1JBNmgg_vgVE_HIXLJ-H3nSUSgujW4YOVJzkyLbU8xAJiSJ_NeLBYjJyJhCNAgMBAAGjggUkMIIFIDCBnQYDVR0gBIGVMIGSMAwGCisGAQQBgjd7AQEwZgYKKwYBBAGCN3sCAjBYMFYGCCsGAQUFBwICMEoeSAAzADMAZQAwADEAOQAyADEALQA0AGQANgA0AC0ANABmADgAYwAtAGEAMAA1ADUALQA1AGIAZABhAGYAZgBkADUAZQAzADMAZDAMBgorBgEEAYI3ewMCMAwGCisGAQQBgjd7BAIwDAYDVR0TAQH_BAIwADAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDgYDVR0PAQH_BAQDAgWgMB0GA1UdDgQWBBRvNYqFx4fDp-iV_6CV_JvtWzks-DAfBgNVHSMEGDAWgBQU0jfg9tZ9ft2NurplqwSUJeCWHTCCAfsGA1UdHwSCAfIwggHuMHugeaB3hnVodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwfaB7oHmGd2h0dHA6Ly9zZWNvbmRhcnktY2RuLnBraS5jb3JlLndpbmRvd3MubmV0L3dlc3RjZW50cmFsdXMvY3Jscy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxLzI1L2N1cnJlbnQuY3JsMGygaqBohmZodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwgYGgf6B9hntodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwggIABggrBgEFBQcBAQSCAfIwggHuMH4GCCsGAQUFBzAChnJodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jYWNlcnRzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvY2VydC5jZXIwgYAGCCsGAQUFBzAChnRodHRwOi8vc2Vjb25kYXJ5LWNkbi5wa2kuY29yZS53aW5kb3dzLm5ldC93ZXN0Y2VudHJhbHVzL2NhY2VydHMvY2NtZXdlc3RjZW50cmFsdXNwa2kvY2NtZXdlc3RjZW50cmFsdXNpY2EwMS9jZXJ0LmNlcjBvBggrBgEFBQcwAoZjaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3dlc3RjZW50cmFsdXMvY2FjZXJ0cy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxL2NlcnQuY2VyMHgGCCsGAQUFBzAChmxodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEwDQYJKoZIhvcNAQELBQADggEBAHyESoM-hJA8co5aYFKQj6Yb2naSt-_hW50RjbHBbcf7c32Ujn8L-srkiIyVxkEpzXn0sgWpC8m9Wmwi-IXcD8wG3oPqMrn5ZYvIwrFdrlRwKg23jUltqn23uy8oAzIxCBsBblPSNyWSbEL5Vi52YbLITPHu4uEC7Exy9jJvn6cttL4bste7Sfve85Dd-RbogDrr8HBad8-CN8sHHSyii8mKaK7rq75VE6arRrM28SQgrKJDPrv40C9I6Z5pK40CEUfpYyWTzS6FkLMf7SIjhz0Ilua9xqzb0IO32oVtuv4c-GmmjyJy8FRZzgEYbW_CUh19Gx-9L_Sd5ZzebW5exxE&s=LFCESG-KkUB5nPqMQzdBXoO8KEadqxYhSmKXuUrYEenRLoPbs5i0mVRAtAhKZDXOJOxaiCtvsdNaz9pA99LySxuau6AwFmkxsSTMHpZFqL3wdpyG2reyQa49vtPMbInoqBmA-nd7WFiXf04CFI0DJWajZgiLm5P8ucflJEMgemv_jjQvdy8_9curlyBd7JOuwVp8-zp3hz7Wg9uz83VLRqSqxJG1Al1aMW2tdvUxgRL24GA35ASGI7xPEghE4UxGHLIEEsWqQHQHJwX_8nYGtvDJ6NEzOBkoLpn53UMMFdIOoIVmrqWo8oTgdxOpVTShgznekfZByDNljzey-tGkPA&h=XNrzBkvtXhHpLbeN4uldWTwENPFkUC_L6M-6WRbwKsc + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Mon, 23 Mar 2026 23:14:05 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerRegistry/locations/WESTUS/operationResults/cacherules-c8bbce07-c677-4d60-af43-8751db5b2fcd?api-version=2026-01-01-preview&t=639099044466284924&c=MIIHlDCCBnygAwIBAgIQbRZBCnyTTrdKyx3sn6-cIjANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBFVVMyIENBIDAxMB4XDTI2MDIyNDE4NDcwN1oXDTI2MDgyMDAwNDcwN1owQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDLYIfsKK3BxfjRY95DQ7nTiHuQIybDAR8CX9yInjq_0E3Mb9YwMAQGJklR1lZJqg9M7got1ThcwNEpPovodQrXAzXRPqJ0JyNpNf1UNLgRs-3_mYbXxvSrBdgdZL4WUq9XCQ9WaH2aM3MAuLy8FL835sRe_Zx46G3TsI9Grsv5U-8gTr440L6nsopLTJJzQCpxou4KEuTMiG2GpVzxExJwvUDuutVCxXnsUwksDnhFUbqcJ7mVhhK5If25oHTNYUQwYylqvq_5eVdfEXEzpbP3XfDdKxljTnSMHaniaYcYW3OmhIMmdnHNFiPA9LQ2DtYs_7T68xnPVpbVO0EZ2Em5AgMBAAGjggSSMIIEjjCBnQYDVR0gBIGVMIGSMAwGCisGAQQBgjd7AQEwZgYKKwYBBAGCN3sCAjBYMFYGCCsGAQUFBwICMEoeSAAzADMAZQAwADEAOQAyADEALQA0AGQANgA0AC0ANABmADgAYwAtAGEAMAA1ADUALQA1AGIAZABhAGYAZgBkADUAZQAzADMAZDAMBgorBgEEAYI3ewMCMAwGCisGAQQBgjd7BAIwDAYDVR0TAQH_BAIwADAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDgYDVR0PAQH_BAQDAgWgMB0GA1UdDgQWBBQixmODlrY3K7hS01rA8V_TZUhMsjAfBgNVHSMEGDAWgBT87D7bqnwfgh4FuKEG-UPnArMKuTCCAbIGA1UdHwSCAakwggGlMGmgZ6BlhmNodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvZWFzdHVzMi9jcmxzL2NjbWVlYXN0dXMycGtpL2NjbWVlYXN0dXMyaWNhMDEvNjUvY3VycmVudC5jcmwwa6BpoGeGZWh0dHA6Ly9zZWNvbmRhcnktY2RuLnBraS5jb3JlLndpbmRvd3MubmV0L2Vhc3R1czIvY3Jscy9jY21lZWFzdHVzMnBraS9jY21lZWFzdHVzMmljYTAxLzY1L2N1cnJlbnQuY3JsMFqgWKBWhlRodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vZWFzdHVzMi9jcmxzL2NjbWVlYXN0dXMycGtpL2NjbWVlYXN0dXMyaWNhMDEvNjUvY3VycmVudC5jcmwwb6BtoGuGaWh0dHA6Ly9jY21lZWFzdHVzMnBraS5lYXN0dXMyLnBraS5jb3JlLndpbmRvd3MubmV0L2NlcnRpZmljYXRlQXV0aG9yaXRpZXMvY2NtZWVhc3R1czJpY2EwMS82NS9jdXJyZW50LmNybDCCAbcGCCsGAQUFBwEBBIIBqTCCAaUwbAYIKwYBBQUHMAKGYGh0dHA6Ly9wcmltYXJ5LWNkbi5wa2kuY29yZS53aW5kb3dzLm5ldC9lYXN0dXMyL2NhY2VydHMvY2NtZWVhc3R1czJwa2kvY2NtZWVhc3R1czJpY2EwMS9jZXJ0LmNlcjBuBggrBgEFBQcwAoZiaHR0cDovL3NlY29uZGFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvZWFzdHVzMi9jYWNlcnRzL2NjbWVlYXN0dXMycGtpL2NjbWVlYXN0dXMyaWNhMDEvY2VydC5jZXIwXQYIKwYBBQUHMAKGUWh0dHA6Ly9jcmwubWljcm9zb2Z0LmNvbS9lYXN0dXMyL2NhY2VydHMvY2NtZWVhc3R1czJwa2kvY2NtZWVhc3R1czJpY2EwMS9jZXJ0LmNlcjBmBggrBgEFBQcwAoZaaHR0cDovL2NjbWVlYXN0dXMycGtpLmVhc3R1czIucGtpLmNvcmUud2luZG93cy5uZXQvY2VydGlmaWNhdGVBdXRob3JpdGllcy9jY21lZWFzdHVzMmljYTAxMA0GCSqGSIb3DQEBCwUAA4IBAQBKY8uIen-4v_aGTptgf_04u1F6978whzIp4ZiTbOSXPwNnweOy6hCQUcuaqDgVZEiozCZ3DTEQooEcQdtH6WhiCDn5FLdHIVfLyo35uSdRGa9igGbbQ22s_ZI2_Sp17bV5_a-akDuAb6xVSZB_RbHXoicbUykmyHQ2aRb7wLI-YJ4X_aS00yjgBXHLbbbD1PGhTMYVk-5Qy8AYGA2_CTJ0ZS5toZF1EKxkz6ka6D_ROn4Sg7PthZX7Y3YpuVwnCelnvJvOgla_MQjpNDBcgmnVyU-ChBBd3TykrRxVWNXjEm54XPippvvwuKEdc4BCa38ZFVNgvDuK-tY_JpycugPZ&s=GMU6pf37k7dnJJRIZB8duobotOOlaisZX0ObDTNyzbT5nZdLR1n24xxSt99rLcbY2pRV68xNNpZxPSe7rqJ3VHNX8AuGKqlORl3hEnv2pPMRF-S7s3gsN_Txx-qXG-uGp_jkK4XCV5utowz2mDndo_XOJQbEMh_T3eImD510DN0omleHPWFO8X4Manpn3tNeCjS4hd4NnUhWr9M20VB9RQGx36Sz5HZJ1rYLP_7UsBjVRpLRSZ2-1-ve46U5By8KAoPX59cFmcXsH5FkgXKOuCOQfIKg61aZLoBTGn8Un6kzrkdya9xf5rU52xjn4O5dJAZ0pRK0KczICuIAVsVclA&h=bwiJRuuzYmaSK0af7W1ZpPTIBn6sl8vy5Q-9yxyeXRA + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=1de06a28-1a3a-4047-8877-0fb23647661b/westus2/5fcca788-d151-4e72-9fb3-6943745c616a + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 25D7DA59EDC54C678023DD35691A8030 Ref B: CO6AA3150218037 Ref C: 2026-03-23T23:14:06Z' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - acr cache delete + Connection: + - keep-alive + ParameterSetName: + - -n -r -y + User-Agent: + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerRegistry/locations/WESTUS/operationResults/cacherules-c8bbce07-c677-4d60-af43-8751db5b2fcd?api-version=2026-01-01-preview&t=639099044466284924&c=MIIHlDCCBnygAwIBAgIQbRZBCnyTTrdKyx3sn6-cIjANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBFVVMyIENBIDAxMB4XDTI2MDIyNDE4NDcwN1oXDTI2MDgyMDAwNDcwN1owQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDLYIfsKK3BxfjRY95DQ7nTiHuQIybDAR8CX9yInjq_0E3Mb9YwMAQGJklR1lZJqg9M7got1ThcwNEpPovodQrXAzXRPqJ0JyNpNf1UNLgRs-3_mYbXxvSrBdgdZL4WUq9XCQ9WaH2aM3MAuLy8FL835sRe_Zx46G3TsI9Grsv5U-8gTr440L6nsopLTJJzQCpxou4KEuTMiG2GpVzxExJwvUDuutVCxXnsUwksDnhFUbqcJ7mVhhK5If25oHTNYUQwYylqvq_5eVdfEXEzpbP3XfDdKxljTnSMHaniaYcYW3OmhIMmdnHNFiPA9LQ2DtYs_7T68xnPVpbVO0EZ2Em5AgMBAAGjggSSMIIEjjCBnQYDVR0gBIGVMIGSMAwGCisGAQQBgjd7AQEwZgYKKwYBBAGCN3sCAjBYMFYGCCsGAQUFBwICMEoeSAAzADMAZQAwADEAOQAyADEALQA0AGQANgA0AC0ANABmADgAYwAtAGEAMAA1ADUALQA1AGIAZABhAGYAZgBkADUAZQAzADMAZDAMBgorBgEEAYI3ewMCMAwGCisGAQQBgjd7BAIwDAYDVR0TAQH_BAIwADAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDgYDVR0PAQH_BAQDAgWgMB0GA1UdDgQWBBQixmODlrY3K7hS01rA8V_TZUhMsjAfBgNVHSMEGDAWgBT87D7bqnwfgh4FuKEG-UPnArMKuTCCAbIGA1UdHwSCAakwggGlMGmgZ6BlhmNodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvZWFzdHVzMi9jcmxzL2NjbWVlYXN0dXMycGtpL2NjbWVlYXN0dXMyaWNhMDEvNjUvY3VycmVudC5jcmwwa6BpoGeGZWh0dHA6Ly9zZWNvbmRhcnktY2RuLnBraS5jb3JlLndpbmRvd3MubmV0L2Vhc3R1czIvY3Jscy9jY21lZWFzdHVzMnBraS9jY21lZWFzdHVzMmljYTAxLzY1L2N1cnJlbnQuY3JsMFqgWKBWhlRodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vZWFzdHVzMi9jcmxzL2NjbWVlYXN0dXMycGtpL2NjbWVlYXN0dXMyaWNhMDEvNjUvY3VycmVudC5jcmwwb6BtoGuGaWh0dHA6Ly9jY21lZWFzdHVzMnBraS5lYXN0dXMyLnBraS5jb3JlLndpbmRvd3MubmV0L2NlcnRpZmljYXRlQXV0aG9yaXRpZXMvY2NtZWVhc3R1czJpY2EwMS82NS9jdXJyZW50LmNybDCCAbcGCCsGAQUFBwEBBIIBqTCCAaUwbAYIKwYBBQUHMAKGYGh0dHA6Ly9wcmltYXJ5LWNkbi5wa2kuY29yZS53aW5kb3dzLm5ldC9lYXN0dXMyL2NhY2VydHMvY2NtZWVhc3R1czJwa2kvY2NtZWVhc3R1czJpY2EwMS9jZXJ0LmNlcjBuBggrBgEFBQcwAoZiaHR0cDovL3NlY29uZGFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvZWFzdHVzMi9jYWNlcnRzL2NjbWVlYXN0dXMycGtpL2NjbWVlYXN0dXMyaWNhMDEvY2VydC5jZXIwXQYIKwYBBQUHMAKGUWh0dHA6Ly9jcmwubWljcm9zb2Z0LmNvbS9lYXN0dXMyL2NhY2VydHMvY2NtZWVhc3R1czJwa2kvY2NtZWVhc3R1czJpY2EwMS9jZXJ0LmNlcjBmBggrBgEFBQcwAoZaaHR0cDovL2NjbWVlYXN0dXMycGtpLmVhc3R1czIucGtpLmNvcmUud2luZG93cy5uZXQvY2VydGlmaWNhdGVBdXRob3JpdGllcy9jY21lZWFzdHVzMmljYTAxMA0GCSqGSIb3DQEBCwUAA4IBAQBKY8uIen-4v_aGTptgf_04u1F6978whzIp4ZiTbOSXPwNnweOy6hCQUcuaqDgVZEiozCZ3DTEQooEcQdtH6WhiCDn5FLdHIVfLyo35uSdRGa9igGbbQ22s_ZI2_Sp17bV5_a-akDuAb6xVSZB_RbHXoicbUykmyHQ2aRb7wLI-YJ4X_aS00yjgBXHLbbbD1PGhTMYVk-5Qy8AYGA2_CTJ0ZS5toZF1EKxkz6ka6D_ROn4Sg7PthZX7Y3YpuVwnCelnvJvOgla_MQjpNDBcgmnVyU-ChBBd3TykrRxVWNXjEm54XPippvvwuKEdc4BCa38ZFVNgvDuK-tY_JpycugPZ&s=GMU6pf37k7dnJJRIZB8duobotOOlaisZX0ObDTNyzbT5nZdLR1n24xxSt99rLcbY2pRV68xNNpZxPSe7rqJ3VHNX8AuGKqlORl3hEnv2pPMRF-S7s3gsN_Txx-qXG-uGp_jkK4XCV5utowz2mDndo_XOJQbEMh_T3eImD510DN0omleHPWFO8X4Manpn3tNeCjS4hd4NnUhWr9M20VB9RQGx36Sz5HZJ1rYLP_7UsBjVRpLRSZ2-1-ve46U5By8KAoPX59cFmcXsH5FkgXKOuCOQfIKg61aZLoBTGn8Un6kzrkdya9xf5rU52xjn4O5dJAZ0pRK0KczICuIAVsVclA&h=bwiJRuuzYmaSK0af7W1ZpPTIBn6sl8vy5Q-9yxyeXRA + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Mon, 23 Mar 2026 23:14:16 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=1de06a28-1a3a-4047-8877-0fb23647661b/westus2/cc11f15e-9e3d-45e3-9b79-f82ab865d3c9 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 184AA4E57C0A4DB69474C23F2AF5D73B Ref B: MWH011020807060 Ref C: 2026-03-23T23:14:16Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - acr delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -n -g -y + User-Agent: + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002?api-version=2026-01-01-preview + response: + body: + string: '{"sku":{"name":"Standard","tier":"Standard"},"type":"Microsoft.ContainerRegistry/registries","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002","name":"clireg000002","location":"westus","tags":{},"systemData":{"createdBy":"test@example.com","createdByType":"User","createdAt":"2026-03-23T23:13:35.6778083+00:00","lastModifiedBy":"test@example.com","lastModifiedByType":"User","lastModifiedAt":"2026-03-23T23:13:35.6778083+00:00"},"properties":{"loginServer":"clireg000002.azurecr.io","creationDate":"2026-03-23T23:13:35.6778083Z","provisioningState":"Deleting","adminUserEnabled":false,"policies":{"quarantinePolicy":{"status":"disabled"},"trustPolicy":{"type":"Notary","status":"disabled"},"retentionPolicy":{"days":7,"lastUpdatedTime":"2026-03-23T23:13:44.6009944+00:00","status":"disabled"},"exportPolicy":{"status":"enabled"},"azureADAuthenticationAsArmPolicy":{"status":"enabled"},"softDeletePolicy":{"retentionDays":7,"lastUpdatedTime":"2026-03-23T23:13:44.6010352+00:00","status":"disabled"}},"encryption":{"status":"disabled"},"dataEndpointEnabled":false,"regionalEndpoints":"Disabled","dataEndpointHostNames":[],"regionalEndpointHostNames":[],"endpointProtocol":"IPv4","privateEndpointConnections":[],"publicNetworkAccess":"Enabled","networkRuleBypassOptions":"AzureServices","networkRuleBypassAllowedForTasks":false,"zoneRedundancy":"Disabled","anonymousPullEnabled":false,"metadataSearch":"Disabled","roleAssignmentMode":"LegacyRegistryPermissions","autoGeneratedDomainNameLabelScope":"Unsecure"}}' + headers: + api-supported-versions: + - 2026-01-01-preview + cache-control: + - no-cache + content-length: + - '1610' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 23 Mar 2026 23:14:17 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerRegistry/locations/westus/operationResults/registries-03df6211-270e-11f1-8883-002248bf0ab3?api-version=2026-01-01-preview&t=639099044578500005&c=MIIIJjCCBw6gAwIBAgIQXAg_KQfqNmXWsnKmcWm-CjANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBXQ1VTIENBIDAxMB4XDTI2MDMwMzE4NDAwNFoXDTI2MDgzMDAwNDAwNFowQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCq2QsnpddKa8kR8gt-vA9VEusmZorO2S-vbINESl_vgl_PJICxJntGEX47Fd1DDc76k_3GujB58pb9CVQcLZ3-ca4xBv6hEqbf7VGNJdlUmL6V31uaLBLUMfEySd5hdTIpu4K8C1BsXVfomETR-eBTaEKo7U6rad09i8wEBquSFVf5S7J71JehWC4rsigucyf3uMHNqTzZudQy7Dr4g3o1z8GDPMMNrN8NB6XUfnHR60daMf2EzZU2v746EHu58MN3kAveFfbqRrcWd5-tDS7K-u-_1JBNmgg_vgVE_HIXLJ-H3nSUSgujW4YOVJzkyLbU8xAJiSJ_NeLBYjJyJhCNAgMBAAGjggUkMIIFIDCBnQYDVR0gBIGVMIGSMAwGCisGAQQBgjd7AQEwZgYKKwYBBAGCN3sCAjBYMFYGCCsGAQUFBwICMEoeSAAzADMAZQAwADEAOQAyADEALQA0AGQANgA0AC0ANABmADgAYwAtAGEAMAA1ADUALQA1AGIAZABhAGYAZgBkADUAZQAzADMAZDAMBgorBgEEAYI3ewMCMAwGCisGAQQBgjd7BAIwDAYDVR0TAQH_BAIwADAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDgYDVR0PAQH_BAQDAgWgMB0GA1UdDgQWBBRvNYqFx4fDp-iV_6CV_JvtWzks-DAfBgNVHSMEGDAWgBQU0jfg9tZ9ft2NurplqwSUJeCWHTCCAfsGA1UdHwSCAfIwggHuMHugeaB3hnVodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwfaB7oHmGd2h0dHA6Ly9zZWNvbmRhcnktY2RuLnBraS5jb3JlLndpbmRvd3MubmV0L3dlc3RjZW50cmFsdXMvY3Jscy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxLzI1L2N1cnJlbnQuY3JsMGygaqBohmZodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwgYGgf6B9hntodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwggIABggrBgEFBQcBAQSCAfIwggHuMH4GCCsGAQUFBzAChnJodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jYWNlcnRzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvY2VydC5jZXIwgYAGCCsGAQUFBzAChnRodHRwOi8vc2Vjb25kYXJ5LWNkbi5wa2kuY29yZS53aW5kb3dzLm5ldC93ZXN0Y2VudHJhbHVzL2NhY2VydHMvY2NtZXdlc3RjZW50cmFsdXNwa2kvY2NtZXdlc3RjZW50cmFsdXNpY2EwMS9jZXJ0LmNlcjBvBggrBgEFBQcwAoZjaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3dlc3RjZW50cmFsdXMvY2FjZXJ0cy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxL2NlcnQuY2VyMHgGCCsGAQUFBzAChmxodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEwDQYJKoZIhvcNAQELBQADggEBAHyESoM-hJA8co5aYFKQj6Yb2naSt-_hW50RjbHBbcf7c32Ujn8L-srkiIyVxkEpzXn0sgWpC8m9Wmwi-IXcD8wG3oPqMrn5ZYvIwrFdrlRwKg23jUltqn23uy8oAzIxCBsBblPSNyWSbEL5Vi52YbLITPHu4uEC7Exy9jJvn6cttL4bste7Sfve85Dd-RbogDrr8HBad8-CN8sHHSyii8mKaK7rq75VE6arRrM28SQgrKJDPrv40C9I6Z5pK40CEUfpYyWTzS6FkLMf7SIjhz0Ilua9xqzb0IO32oVtuv4c-GmmjyJy8FRZzgEYbW_CUh19Gx-9L_Sd5ZzebW5exxE&s=OoBN-fdHwf65-g5T0g5hV8Udl7ggHDZ3tys5kkIPrePZopddFfmxDpLwGUf5kG9UMet9H_61eeZOCgOvkeZgXitjckPJ72caScIWh20vLqxgNhp2nvCCzRzoijlGMMhl0IhnGxPbGQEtAGJ7m7O9jLinD_aOdBlGJ77MbuAlgjmHe-Pb5Plpe4hAgU-LKaCVhwEidMb3Eg2k6YxRE1QVEyLMMLkJDgSNyoRGL1exJyc7dF5xVK1IzEi3S5ghBi9S_TGgkjlwMWt1BaaEap4HbbbZgLGi4AggMP8qBtLPAXbaEs8q6D0zknFyLs1yYY7-oBe2SAvo0B2dI4VHq1EGjA&h=LU-lLr87vgpPOsqDujxUPT8kSacQgJGktgxBEHH-lgs + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=1de06a28-1a3a-4047-8877-0fb23647661b/westus/86954a9d-7698-4a81-aa78-6ac292f7e647 + x-ms-ratelimit-remaining-subscription-deletes: + - '799' + x-ms-ratelimit-remaining-subscription-global-deletes: + - '11999' + x-msedge-ref: + - 'Ref A: E39734A84515404BAC63D44DF184E1E3 Ref B: MWH011020806029 Ref C: 2026-03-23T23:14:17Z' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - acr delete + Connection: + - keep-alive + ParameterSetName: + - -n -g -y + User-Agent: + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerRegistry/locations/westus/operationResults/registries-03df6211-270e-11f1-8883-002248bf0ab3?api-version=2026-01-01-preview&t=639099044578500005&c=MIIIJjCCBw6gAwIBAgIQXAg_KQfqNmXWsnKmcWm-CjANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBXQ1VTIENBIDAxMB4XDTI2MDMwMzE4NDAwNFoXDTI2MDgzMDAwNDAwNFowQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCq2QsnpddKa8kR8gt-vA9VEusmZorO2S-vbINESl_vgl_PJICxJntGEX47Fd1DDc76k_3GujB58pb9CVQcLZ3-ca4xBv6hEqbf7VGNJdlUmL6V31uaLBLUMfEySd5hdTIpu4K8C1BsXVfomETR-eBTaEKo7U6rad09i8wEBquSFVf5S7J71JehWC4rsigucyf3uMHNqTzZudQy7Dr4g3o1z8GDPMMNrN8NB6XUfnHR60daMf2EzZU2v746EHu58MN3kAveFfbqRrcWd5-tDS7K-u-_1JBNmgg_vgVE_HIXLJ-H3nSUSgujW4YOVJzkyLbU8xAJiSJ_NeLBYjJyJhCNAgMBAAGjggUkMIIFIDCBnQYDVR0gBIGVMIGSMAwGCisGAQQBgjd7AQEwZgYKKwYBBAGCN3sCAjBYMFYGCCsGAQUFBwICMEoeSAAzADMAZQAwADEAOQAyADEALQA0AGQANgA0AC0ANABmADgAYwAtAGEAMAA1ADUALQA1AGIAZABhAGYAZgBkADUAZQAzADMAZDAMBgorBgEEAYI3ewMCMAwGCisGAQQBgjd7BAIwDAYDVR0TAQH_BAIwADAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDgYDVR0PAQH_BAQDAgWgMB0GA1UdDgQWBBRvNYqFx4fDp-iV_6CV_JvtWzks-DAfBgNVHSMEGDAWgBQU0jfg9tZ9ft2NurplqwSUJeCWHTCCAfsGA1UdHwSCAfIwggHuMHugeaB3hnVodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwfaB7oHmGd2h0dHA6Ly9zZWNvbmRhcnktY2RuLnBraS5jb3JlLndpbmRvd3MubmV0L3dlc3RjZW50cmFsdXMvY3Jscy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxLzI1L2N1cnJlbnQuY3JsMGygaqBohmZodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwgYGgf6B9hntodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwggIABggrBgEFBQcBAQSCAfIwggHuMH4GCCsGAQUFBzAChnJodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jYWNlcnRzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvY2VydC5jZXIwgYAGCCsGAQUFBzAChnRodHRwOi8vc2Vjb25kYXJ5LWNkbi5wa2kuY29yZS53aW5kb3dzLm5ldC93ZXN0Y2VudHJhbHVzL2NhY2VydHMvY2NtZXdlc3RjZW50cmFsdXNwa2kvY2NtZXdlc3RjZW50cmFsdXNpY2EwMS9jZXJ0LmNlcjBvBggrBgEFBQcwAoZjaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3dlc3RjZW50cmFsdXMvY2FjZXJ0cy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxL2NlcnQuY2VyMHgGCCsGAQUFBzAChmxodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEwDQYJKoZIhvcNAQELBQADggEBAHyESoM-hJA8co5aYFKQj6Yb2naSt-_hW50RjbHBbcf7c32Ujn8L-srkiIyVxkEpzXn0sgWpC8m9Wmwi-IXcD8wG3oPqMrn5ZYvIwrFdrlRwKg23jUltqn23uy8oAzIxCBsBblPSNyWSbEL5Vi52YbLITPHu4uEC7Exy9jJvn6cttL4bste7Sfve85Dd-RbogDrr8HBad8-CN8sHHSyii8mKaK7rq75VE6arRrM28SQgrKJDPrv40C9I6Z5pK40CEUfpYyWTzS6FkLMf7SIjhz0Ilua9xqzb0IO32oVtuv4c-GmmjyJy8FRZzgEYbW_CUh19Gx-9L_Sd5ZzebW5exxE&s=OoBN-fdHwf65-g5T0g5hV8Udl7ggHDZ3tys5kkIPrePZopddFfmxDpLwGUf5kG9UMet9H_61eeZOCgOvkeZgXitjckPJ72caScIWh20vLqxgNhp2nvCCzRzoijlGMMhl0IhnGxPbGQEtAGJ7m7O9jLinD_aOdBlGJ77MbuAlgjmHe-Pb5Plpe4hAgU-LKaCVhwEidMb3Eg2k6YxRE1QVEyLMMLkJDgSNyoRGL1exJyc7dF5xVK1IzEi3S5ghBi9S_TGgkjlwMWt1BaaEap4HbbbZgLGi4AggMP8qBtLPAXbaEs8q6D0zknFyLs1yYY7-oBe2SAvo0B2dI4VHq1EGjA&h=LU-lLr87vgpPOsqDujxUPT8kSacQgJGktgxBEHH-lgs + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Mon, 23 Mar 2026 23:14:17 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerRegistry/locations/westus/operationResults/registries-03df6211-270e-11f1-8883-002248bf0ab3?api-version=2026-01-01-preview&t=639099044581379009&c=MIIIJjCCBw6gAwIBAgIQXAg_KQfqNmXWsnKmcWm-CjANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBXQ1VTIENBIDAxMB4XDTI2MDMwMzE4NDAwNFoXDTI2MDgzMDAwNDAwNFowQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCq2QsnpddKa8kR8gt-vA9VEusmZorO2S-vbINESl_vgl_PJICxJntGEX47Fd1DDc76k_3GujB58pb9CVQcLZ3-ca4xBv6hEqbf7VGNJdlUmL6V31uaLBLUMfEySd5hdTIpu4K8C1BsXVfomETR-eBTaEKo7U6rad09i8wEBquSFVf5S7J71JehWC4rsigucyf3uMHNqTzZudQy7Dr4g3o1z8GDPMMNrN8NB6XUfnHR60daMf2EzZU2v746EHu58MN3kAveFfbqRrcWd5-tDS7K-u-_1JBNmgg_vgVE_HIXLJ-H3nSUSgujW4YOVJzkyLbU8xAJiSJ_NeLBYjJyJhCNAgMBAAGjggUkMIIFIDCBnQYDVR0gBIGVMIGSMAwGCisGAQQBgjd7AQEwZgYKKwYBBAGCN3sCAjBYMFYGCCsGAQUFBwICMEoeSAAzADMAZQAwADEAOQAyADEALQA0AGQANgA0AC0ANABmADgAYwAtAGEAMAA1ADUALQA1AGIAZABhAGYAZgBkADUAZQAzADMAZDAMBgorBgEEAYI3ewMCMAwGCisGAQQBgjd7BAIwDAYDVR0TAQH_BAIwADAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDgYDVR0PAQH_BAQDAgWgMB0GA1UdDgQWBBRvNYqFx4fDp-iV_6CV_JvtWzks-DAfBgNVHSMEGDAWgBQU0jfg9tZ9ft2NurplqwSUJeCWHTCCAfsGA1UdHwSCAfIwggHuMHugeaB3hnVodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwfaB7oHmGd2h0dHA6Ly9zZWNvbmRhcnktY2RuLnBraS5jb3JlLndpbmRvd3MubmV0L3dlc3RjZW50cmFsdXMvY3Jscy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxLzI1L2N1cnJlbnQuY3JsMGygaqBohmZodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwgYGgf6B9hntodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwggIABggrBgEFBQcBAQSCAfIwggHuMH4GCCsGAQUFBzAChnJodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jYWNlcnRzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvY2VydC5jZXIwgYAGCCsGAQUFBzAChnRodHRwOi8vc2Vjb25kYXJ5LWNkbi5wa2kuY29yZS53aW5kb3dzLm5ldC93ZXN0Y2VudHJhbHVzL2NhY2VydHMvY2NtZXdlc3RjZW50cmFsdXNwa2kvY2NtZXdlc3RjZW50cmFsdXNpY2EwMS9jZXJ0LmNlcjBvBggrBgEFBQcwAoZjaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3dlc3RjZW50cmFsdXMvY2FjZXJ0cy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxL2NlcnQuY2VyMHgGCCsGAQUFBzAChmxodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEwDQYJKoZIhvcNAQELBQADggEBAHyESoM-hJA8co5aYFKQj6Yb2naSt-_hW50RjbHBbcf7c32Ujn8L-srkiIyVxkEpzXn0sgWpC8m9Wmwi-IXcD8wG3oPqMrn5ZYvIwrFdrlRwKg23jUltqn23uy8oAzIxCBsBblPSNyWSbEL5Vi52YbLITPHu4uEC7Exy9jJvn6cttL4bste7Sfve85Dd-RbogDrr8HBad8-CN8sHHSyii8mKaK7rq75VE6arRrM28SQgrKJDPrv40C9I6Z5pK40CEUfpYyWTzS6FkLMf7SIjhz0Ilua9xqzb0IO32oVtuv4c-GmmjyJy8FRZzgEYbW_CUh19Gx-9L_Sd5ZzebW5exxE&s=exSJiEJnf0Kjc2iHjxQn_FCQURmal-rp2SPO_Y2dyGax3tPMbVgqpnrs92utDBdQcVg0xlbgxElultdZtdSdcjbsQ5YozEoGMDpNzq2uEwBh3BSXNFxkyeafDoSi5leQ7lqP1wo-g3_xUWJPrdZKxNO2yuUy2YgfotJoEE7Q5ofykMHGAlmG4Rh6dcFa1ebMeBUOqmveX6knI7RvTpWq0TzUFQPfgvBrEzpP0ruA47KE-1wcxrsAN1XfzesgwGPSR10g3d6_LJgSzkyurs6-R7fC0PjVR0xeQIeGPFBi8hLPYynOZyDayk0L_wQq_wxC9tcw5vKjzrekqTKMQzO4dQ&h=-pwb4FEUy9xHaOOhki1K8rO5BLmffX88q7bYSlIwzPM + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=1de06a28-1a3a-4047-8877-0fb23647661b/westus/22e62d92-ef98-4eec-9b55-923aeec0d053 + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 0F3D7D639C9F426AB69A74CEBE7B38E0 Ref B: MWH011020807060 Ref C: 2026-03-23T23:14:18Z' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - acr delete + Connection: + - keep-alive + ParameterSetName: + - -n -g -y + User-Agent: + - AZURECLI/2.84.0 azsdk-python-core/1.38.0 Python/3.11.9 (Windows-10-10.0.26200-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerRegistry/locations/westus/operationResults/registries-03df6211-270e-11f1-8883-002248bf0ab3?api-version=2026-01-01-preview&t=639099044581379009&c=MIIIJjCCBw6gAwIBAgIQXAg_KQfqNmXWsnKmcWm-CjANBgkqhkiG9w0BAQsFADA2MTQwMgYDVQQDEytDQ01FIEcxIFRMUyBSU0EgMjA0OCBTSEEyNTYgMjA0OSBXQ1VTIENBIDAxMB4XDTI2MDMwMzE4NDAwNFoXDTI2MDgzMDAwNDAwNFowQDE-MDwGA1UEAxM1YXN5bmNvcGVyYXRpb25zaWduaW5nY2VydGlmaWNhdGUubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCq2QsnpddKa8kR8gt-vA9VEusmZorO2S-vbINESl_vgl_PJICxJntGEX47Fd1DDc76k_3GujB58pb9CVQcLZ3-ca4xBv6hEqbf7VGNJdlUmL6V31uaLBLUMfEySd5hdTIpu4K8C1BsXVfomETR-eBTaEKo7U6rad09i8wEBquSFVf5S7J71JehWC4rsigucyf3uMHNqTzZudQy7Dr4g3o1z8GDPMMNrN8NB6XUfnHR60daMf2EzZU2v746EHu58MN3kAveFfbqRrcWd5-tDS7K-u-_1JBNmgg_vgVE_HIXLJ-H3nSUSgujW4YOVJzkyLbU8xAJiSJ_NeLBYjJyJhCNAgMBAAGjggUkMIIFIDCBnQYDVR0gBIGVMIGSMAwGCisGAQQBgjd7AQEwZgYKKwYBBAGCN3sCAjBYMFYGCCsGAQUFBwICMEoeSAAzADMAZQAwADEAOQAyADEALQA0AGQANgA0AC0ANABmADgAYwAtAGEAMAA1ADUALQA1AGIAZABhAGYAZgBkADUAZQAzADMAZDAMBgorBgEEAYI3ewMCMAwGCisGAQQBgjd7BAIwDAYDVR0TAQH_BAIwADAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDgYDVR0PAQH_BAQDAgWgMB0GA1UdDgQWBBRvNYqFx4fDp-iV_6CV_JvtWzks-DAfBgNVHSMEGDAWgBQU0jfg9tZ9ft2NurplqwSUJeCWHTCCAfsGA1UdHwSCAfIwggHuMHugeaB3hnVodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwfaB7oHmGd2h0dHA6Ly9zZWNvbmRhcnktY2RuLnBraS5jb3JlLndpbmRvd3MubmV0L3dlc3RjZW50cmFsdXMvY3Jscy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxLzI1L2N1cnJlbnQuY3JsMGygaqBohmZodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vd2VzdGNlbnRyYWx1cy9jcmxzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwgYGgf6B9hntodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvMjUvY3VycmVudC5jcmwwggIABggrBgEFBQcBAQSCAfIwggHuMH4GCCsGAQUFBzAChnJodHRwOi8vcHJpbWFyeS1jZG4ucGtpLmNvcmUud2luZG93cy5uZXQvd2VzdGNlbnRyYWx1cy9jYWNlcnRzL2NjbWV3ZXN0Y2VudHJhbHVzcGtpL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEvY2VydC5jZXIwgYAGCCsGAQUFBzAChnRodHRwOi8vc2Vjb25kYXJ5LWNkbi5wa2kuY29yZS53aW5kb3dzLm5ldC93ZXN0Y2VudHJhbHVzL2NhY2VydHMvY2NtZXdlc3RjZW50cmFsdXNwa2kvY2NtZXdlc3RjZW50cmFsdXNpY2EwMS9jZXJ0LmNlcjBvBggrBgEFBQcwAoZjaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3dlc3RjZW50cmFsdXMvY2FjZXJ0cy9jY21ld2VzdGNlbnRyYWx1c3BraS9jY21ld2VzdGNlbnRyYWx1c2ljYTAxL2NlcnQuY2VyMHgGCCsGAQUFBzAChmxodHRwOi8vY2NtZXdlc3RjZW50cmFsdXNwa2kud2VzdGNlbnRyYWx1cy5wa2kuY29yZS53aW5kb3dzLm5ldC9jZXJ0aWZpY2F0ZUF1dGhvcml0aWVzL2NjbWV3ZXN0Y2VudHJhbHVzaWNhMDEwDQYJKoZIhvcNAQELBQADggEBAHyESoM-hJA8co5aYFKQj6Yb2naSt-_hW50RjbHBbcf7c32Ujn8L-srkiIyVxkEpzXn0sgWpC8m9Wmwi-IXcD8wG3oPqMrn5ZYvIwrFdrlRwKg23jUltqn23uy8oAzIxCBsBblPSNyWSbEL5Vi52YbLITPHu4uEC7Exy9jJvn6cttL4bste7Sfve85Dd-RbogDrr8HBad8-CN8sHHSyii8mKaK7rq75VE6arRrM28SQgrKJDPrv40C9I6Z5pK40CEUfpYyWTzS6FkLMf7SIjhz0Ilua9xqzb0IO32oVtuv4c-GmmjyJy8FRZzgEYbW_CUh19Gx-9L_Sd5ZzebW5exxE&s=exSJiEJnf0Kjc2iHjxQn_FCQURmal-rp2SPO_Y2dyGax3tPMbVgqpnrs92utDBdQcVg0xlbgxElultdZtdSdcjbsQ5YozEoGMDpNzq2uEwBh3BSXNFxkyeafDoSi5leQ7lqP1wo-g3_xUWJPrdZKxNO2yuUy2YgfotJoEE7Q5ofykMHGAlmG4Rh6dcFa1ebMeBUOqmveX6knI7RvTpWq0TzUFQPfgvBrEzpP0ruA47KE-1wcxrsAN1XfzesgwGPSR10g3d6_LJgSzkyurs6-R7fC0PjVR0xeQIeGPFBi8hLPYynOZyDayk0L_wQq_wxC9tcw5vKjzrekqTKMQzO4dQ&h=-pwb4FEUy9xHaOOhki1K8rO5BLmffX88q7bYSlIwzPM + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Mon, 23 Mar 2026 23:14:27 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=1de06a28-1a3a-4047-8877-0fb23647661b/westus/ccb43cb0-3e0b-4666-9525-6bdbf66f9cec + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 7EE57DA72C7041C59705B9DFD92317BC Ref B: MWH011020809052 Ref C: 2026-03-23T23:14:28Z' + status: + code: 200 + message: OK +version: 1 diff --git a/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands.py b/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands.py index 124f41e78a8..229f124b687 100644 --- a/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands.py +++ b/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands.py @@ -283,7 +283,7 @@ def test_acr_cache_managed_identity(self, resource_group, resource_group_locatio 'rg_loc': resource_group_location, 'sku': 'Standard', 'cr_name': 'test-mi', - 'source_repo': 'mcr.microsoft.com/mcr/hello-world', + 'source_repo': 'upstreamregistry.azurecr.io/hello-world', 'target_repo': 'hello-world-mi', 'identity_name': self.create_random_name('cache-identity', 20), 'identity_name2': self.create_random_name('cache-identity2', 20) @@ -307,19 +307,19 @@ def test_acr_cache_managed_identity(self, resource_group, resource_group_locatio self.cmd('acr cache create -n {cr_name} -r {registry_name} -s {source_repo} -t {target_repo} --identity {identity_id}', checks=[self.check('name', '{cr_name}'), self.check('provisioningState', 'Succeeded'), - self.check('identity.type', 'UserAssigned')]) + self.check('identity.type', 'userAssigned')]) # Test cache show includes identity self.cmd('acr cache show -n {cr_name} -r {registry_name} -g {rg}', checks=[self.check('name', '{cr_name}'), self.check('provisioningState', 'Succeeded'), - self.check('identity.type', 'UserAssigned')]) + self.check('identity.type', 'userAssigned')]) # Test cache update with different managed identity self.cmd('acr cache update -n {cr_name} -r {registry_name} --identity {identity_id2}', checks=[self.check('name', '{cr_name}'), self.check('provisioningState', 'Succeeded'), - self.check('identity.type', 'UserAssigned')]) + self.check('identity.type', 'userAssigned')]) # Clean up self.cmd('acr cache delete -n {cr_name} -r {registry_name} -y')