diff --git a/src/acrcache/HISTORY.rst b/src/acrcache/HISTORY.rst index f5c436bcd8b..2f2e2f38d8f 100644 --- a/src/acrcache/HISTORY.rst +++ b/src/acrcache/HISTORY.rst @@ -2,6 +2,20 @@ Release History =============== +1.0.2 +++++++ +* **BREAKING**: Migrated sync command to dedicated sync API endpoint + * Updated `az acr cache sync` command to use new cacheRuleSyncParameter endpoint instead of importImage + * Changed from Long Running Operation (LRO) pattern to fire-and-forget queuing model + * Added messaging to inform users that sync requests are queued and will complete asynchronously + +* **FEATURE**: Added `--sync-tag-if-deleted` parameter for enhanced sync control + * New optional flag for `az acr cache sync` command to control behavior with deleted tags + * When enabled, allows syncing tags that have been deleted from the source registry + * sync_tag_if_deleted parameter defaults to false when omitted + +* **ENHANCEMENT**: Improved parameter handling and validation + * Removed unused imports (ImportSource, ImportImageParameters) from legacy implementation 1.0.1 ++++++ @@ -63,4 +77,4 @@ Release History 1.0.0 ++++++ -* Initial release. \ No newline at end of file +* Initial release. diff --git a/src/acrcache/README.rst b/src/acrcache/README.rst index 5b80521e3a2..5f64dcd0edc 100644 --- a/src/acrcache/README.rst +++ b/src/acrcache/README.rst @@ -85,6 +85,7 @@ Manual Sync Parameters ~~~~~~~~~~~~~~~~~~~~~~ - ``--tag``: The name of the tag to sync immediately (requires existing cache rule with artifact sync enabled) +- ``--sync-tag-if-deleted``: Flag to indicate whether the tag should be synced if it has already been deleted from the source registry (defaults to false) Installation ------------ diff --git a/src/acrcache/azext_acrcache/_client_factory.py b/src/acrcache/azext_acrcache/_client_factory.py index 0bbd8921be9..6e15974f3d2 100644 --- a/src/acrcache/azext_acrcache/_client_factory.py +++ b/src/acrcache/azext_acrcache/_client_factory.py @@ -10,6 +10,7 @@ def cf_acrcache(cli_ctx, *_): subscription_id = get_subscription_id(cli_ctx) return get_mgmt_service_client(cli_ctx, ContainerRegistryManagementClient, subscription_id=subscription_id).cache_rules + def cf_acrreg(cli_ctx, *_): from azure.cli.core.commands.client_factory import get_mgmt_service_client, get_subscription_id from azext_acrcache.vendored_sdks.containerregistry.v2025_09_01_preview.generated.container_registry_management_client import ContainerRegistryManagementClient diff --git a/src/acrcache/azext_acrcache/_help.py b/src/acrcache/azext_acrcache/_help.py index d2442cef07d..bf05e9ad0ce 100644 --- a/src/acrcache/azext_acrcache/_help.py +++ b/src/acrcache/azext_acrcache/_help.py @@ -35,8 +35,8 @@ - name: --assign-identity short-summary: Resource ID of the user-assigned managed identity. long-summary: | - Resource ID of the user-assigned managed identity for authenticating with the ACR source registry. - Must be in the same tenant as both registries. + Resource ID of the user-assigned managed identity for authenticating with the ACR source registry. + Must be in the same tenant as both registries. Format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName} - name: --sync-referrers short-summary: Enable or disable sync referrers. @@ -71,8 +71,8 @@ - name: --assign-identity short-summary: Resource ID of the user-assigned managed identity. long-summary: | - Resource ID of the user-assigned managed identity for authenticating with the ACR source registry. - Must be in the same tenant as both registries. + Resource ID of the user-assigned managed identity for authenticating with the ACR source registry. + Must be in the same tenant as both registries. Format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName} - name: --sync-referrers short-summary: Enable or disable syncing of referrers. @@ -83,7 +83,7 @@ - name: Remove a credential set from an existing cache rule. text: az acr cache update -r myregistry -n MyRule --remove-cred-set - name: Update a cache rule with a user-assigned managed identity. - text: az acr cache update -r myregistry -n MyRule --assign-identity /subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identity-name} + text: az acr cache update -r myregistry -n MyRule --assign-identity /subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identity-name} - name: Enable artifact sync and set a tag filter. text: az acr cache update -r myregistry -n MyRule --sync activesync --tag-starts-with v1 --tag-ends-with beta - name: Enable artifact sync, set a tag filter, and specify platforms and sync referrers. diff --git a/src/acrcache/azext_acrcache/_params.py b/src/acrcache/azext_acrcache/_params.py index 9da7be86d83..f497fd0b887 100644 --- a/src/acrcache/azext_acrcache/_params.py +++ b/src/acrcache/azext_acrcache/_params.py @@ -35,4 +35,5 @@ def load_arguments(self, _): c.argument('exclude_image_types', help='A list of image types to exclude from the sync. e.g. application/vnd.docker.distribution.manifest.v2+json') with self.argument_context('acr cache sync') as c: - c.argument('tag', help='The name of the tag you want to sync immediately. Can only be used if artifact sync is enabled and the tag is within any specified tag filter.', deprecate_info=None) \ No newline at end of file + c.argument('tag', help='The name of the tag you want to sync immediately. Can only be used if artifact sync is enabled and the tag is within any specified tag filter.', deprecate_info=None) + c.argument('sync_tag_if_deleted', help='Flag to indicate whether the tag should be sync\'d if it has already been deleted. Defaults to false.', action='store_true') diff --git a/src/acrcache/azext_acrcache/cache.py b/src/acrcache/azext_acrcache/cache.py index 49646474d5e..bfddc8bace0 100644 --- a/src/acrcache/azext_acrcache/cache.py +++ b/src/acrcache/azext_acrcache/cache.py @@ -5,25 +5,27 @@ # pylint: disable=line-too-long import re -from azure.cli.core.util import user_confirmation + from knack.util import CLIError from knack.log import get_logger -from azure.core.serialization import NULL as AzureCoreNull +from azure.cli.core.util import user_confirmation from azure.cli.command_modules.acr._utils import get_resource_group_name_by_registry_name, get_registry_by_name +from azure.core.serialization import NULL as AzureCoreNull from azure.mgmt.core.tools import parse_resource_id, is_valid_resource_id from .vendored_sdks.containerregistry.v2025_09_01_preview.generated.container_registry_management_client.models._models import ( - CacheRule, CacheRuleProperties, - CacheRuleUpdateParameters, CacheRuleUpdateProperties, ImportSource, ImportImageParameters, - PlatformFilter, ArtifactTypeFilter, TagFilter, ArtifactSyncFilterProperties, - IdentityProperties, UserIdentityProperties + CacheRule, CacheRuleProperties, CacheRuleUpdateParameters, CacheRuleUpdateProperties, + PlatformFilter, ArtifactTypeFilter, TagFilter, ArtifactSyncFilterProperties, IdentityProperties, UserIdentityProperties, + CacheRuleSyncParameters ) + # Constants for managed identity resource validation MANAGED_IDENTITY_RESOURCE_PROVIDER = "Microsoft.ManagedIdentity" USER_ASSIGNED_IDENTITY_RESOURCE_TYPE = "userAssignedIdentities" logger = get_logger(__name__) + def _create_kql(starts_with=None, ends_with=None, contains=None, tag=None): if not starts_with and not ends_with and not contains and not tag: return "Tags" @@ -44,7 +46,6 @@ def _create_kql(starts_with=None, ends_with=None, contains=None, tag=None): return query - def process_tag_filters(tag, starts_with, ends_with, contains, tag_equals, tag_starts_with, tag_ends_with, tag_contains): """ @@ -55,9 +56,10 @@ def process_tag_filters(tag, starts_with, ends_with, contains, final_starts_with = tag_starts_with if tag_starts_with is not None else starts_with final_ends_with = tag_ends_with if tag_ends_with is not None else ends_with final_contains = tag_contains if tag_contains is not None else contains - + return final_tag, final_starts_with, final_ends_with, final_contains + def process_assign_identity_parameter(assign_identity: str) -> IdentityProperties: """Process assign identity parameter and return IdentityProperties object. @@ -67,7 +69,7 @@ def process_assign_identity_parameter(assign_identity: str) -> IdentityPropertie if not assign_identity: return None - + if not is_valid_user_assigned_managed_identity_resource_id(assign_identity): raise CLIError(f"Invalid user-assigned managed identity resource ID: {assign_identity}") @@ -78,17 +80,18 @@ def process_assign_identity_parameter(assign_identity: str) -> IdentityPropertie } ) return identity_properties - + + def is_valid_user_assigned_managed_identity_resource_id(resource_id): """ Validate user-assigned managed identity resource ID using Azure's built-in utilities. - + :param resource_id: Resource ID to validate :return: True if valid, False otherwise """ if not is_valid_resource_id(resource_id): return False - + try: parsed = parse_resource_id(resource_id) # Ensure it's specifically a Microsoft.ManagedIdentity userAssignedIdentities resource @@ -102,6 +105,7 @@ def is_valid_user_assigned_managed_identity_resource_id(resource_id): except Exception: return False + def acr_cache_show(cmd, client, registry_name, @@ -169,11 +173,11 @@ def acr_cache_create(cmd, registry, _ = get_registry_by_name(cmd.cli_ctx, registry_name, resource_group_name) - #extract resource group from registry id + # extract resource group from registry id if resource_group_name: rg = resource_group_name else: - #extract resource group from registry id + # extract resource group from registry id match = re.search(r'/resourceGroups/([^/]+)/', registry.id) rg = match.group(1) if match else None @@ -204,14 +208,14 @@ def acr_cache_create(cmd, if include_image_types and exclude_image_types: raise CLIError("You cannot specify both include_image_types and exclude_image_types. Please choose one.") - #validate that filter parameters require sync to be enabled - if sync and sync.lower() != 'activesync' and (include_artifact_types or exclude_artifact_types or - include_image_types or exclude_image_types or - platforms or processed_starts_with or processed_ends_with or processed_contains or processed_tag): + # validate that filter parameters require sync to be enabled + if sync and sync.lower() != 'activesync' and (include_artifact_types or exclude_artifact_types or + include_image_types or exclude_image_types or + platforms or processed_starts_with or processed_ends_with or processed_contains or processed_tag): raise CLIError("Artifact sync filters (--include-artifact-types, --exclude-artifact-types, " - "--include-image-types, --exclude-image-types, --platforms, " - "--starts-with, --ends-with, --contains, --tag, " - "--tag-equals, --tag-starts-with, --tag-ends-with, --tag-contains) require --sync activesync.") + "--include-image-types, --exclude-image-types, --platforms, " + "--starts-with, --ends-with, --contains, --tag, " + "--tag-equals, --tag-starts-with, --tag-ends-with, --tag-contains) require --sync activesync.") cred_set_id = AzureCoreNull if not cred_set else f'{registry.id}/credentialSets/{cred_set}' @@ -221,7 +225,7 @@ def acr_cache_create(cmd, if ':' in source_repo: raise CLIError("Source repository should not include a tag. Please use the --tag-equals parameter to specify tag for filtering.") - #create artifact sync filters object + # create artifact sync filters object artifact_sync_filters = None if sync and sync.lower() == 'activesync': @@ -271,7 +275,7 @@ def acr_cache_create(cmd, query=kql_str ) - #create cacheRuleProperties object + # create cacheRuleProperties object properties = CacheRuleProperties( credential_set_resource_id=cred_set_id, source_repository=source_repo, @@ -329,18 +333,18 @@ def acr_cache_update_custom(cmd, registry, rg = get_registry_by_name(cmd.cli_ctx, registry_name, resource_group_name) - #fetch existing cacheRule + # fetch existing cacheRule cache_rule = client.get(resource_group_name=rg, registry_name=registry_name, cache_rule_name=name) - #extract existing properties + # extract existing properties properties = cache_rule.properties sync_mode = properties.sync_mode sync_referrers_status = properties.sync_referrers - #check if activesync is enabled - #check both existing sync mode (when not changing sync) AND new sync value (when updating sync) + # check if activesync is enabled + # check both existing sync mode (when not changing sync) AND new sync value (when updating sync) is_active_sync = (sync is None and sync_mode and sync_mode.lower() == 'activesync') or (sync and sync.lower() == 'activesync') # Validate sync_referrers requires activesync @@ -358,14 +362,14 @@ def acr_cache_update_custom(cmd, tag, starts_with, ends_with, contains, tag_equals, tag_starts_with, tag_ends_with, tag_contains ) - + # Initialize filter objects updated_tags = None updated_platforms = None updated_artifact_types = None updated_image_types = None - #preserve old artifact sync filters + # preserve old artifact sync filters preserve_filters = (properties.artifact_sync_filters is not None and is_active_sync) if preserve_filters: @@ -385,7 +389,7 @@ def acr_cache_update_custom(cmd, if properties.artifact_sync_filters.image_types and not include_image_types and not exclude_image_types: updated_image_types = properties.artifact_sync_filters.image_types - #Handle credential sets update + # Handle credential sets update cred_set_id = properties.credential_set_resource_id if remove_cred_set: cred_set_id = AzureCoreNull @@ -405,7 +409,7 @@ def acr_cache_update_custom(cmd, if sync_referrers is not None: sync_referrers_status = "Enabled" if sync_referrers and sync_referrers.lower() == 'enabled' else "Disabled" - #update artifact sync filters object + # update artifact sync filters object updated_artifact_sync_filters = None if is_active_sync: if processed_starts_with or processed_ends_with or processed_contains or processed_tag: @@ -447,7 +451,7 @@ def acr_cache_update_custom(cmd, values=exclude_image_list ) - #create artifactSyncFilterProperties object if any filter is set + # create artifactSyncFilterProperties object if any filter is set updated_artifact_sync_filters = ArtifactSyncFilterProperties( tags=updated_tags, platforms=updated_platforms, @@ -455,10 +459,10 @@ def acr_cache_update_custom(cmd, image_types=updated_image_types ) - #create updated cache rule properties + # create updated cache rule properties updated_properties = CacheRuleUpdateProperties( - credential_set_resource_id= cred_set_id, - sync_mode= sync_mode, + credential_set_resource_id=cred_set_id, + sync_mode=sync_mode, sync_referrers=sync_referrers_status, artifact_sync_filters=updated_artifact_sync_filters ) @@ -471,15 +475,15 @@ def acr_cache_update_custom(cmd, registry_name=registry_name, cache_rule_name=name, cache_rule_create_parameters=CacheRuleUpdateParameters( - properties=updated_properties, - identity=identity_properties)) + properties=updated_properties, + identity=identity_properties)) return client.begin_update(resource_group_name=rg, registry_name=registry_name, cache_rule_name=name, cache_rule_update_parameters=CacheRuleUpdateParameters( - properties=updated_properties, - identity=identity_properties)) + properties=updated_properties, + identity=identity_properties)) def acr_cache_sync(cmd, @@ -487,28 +491,25 @@ def acr_cache_sync(cmd, registry_name, name, tag, + sync_tag_if_deleted=None, resource_group_name=None): rg = get_resource_group_name_by_registry_name(cmd.cli_ctx, registry_name, resource_group_name) - rule = client.cache_rules.get(resource_group_name=rg, - registry_name=registry_name, - cache_rule_name=name) - - rule_id = rule.id - source_repo = rule.properties.source_repository - target_repo = rule.properties.target_repository - source_image_str = source_repo[source_repo.find('/') + 1:] + ":" + tag - - import_source = ImportSource(source_image=source_image_str, - cache_rule_resource_id=rule_id) + # Create sync parameters for the new cacheRuleSyncParameter endpoint + sync_params = CacheRuleSyncParameters( + tag_name=tag, + sync_tag_if_deleted=sync_tag_if_deleted if sync_tag_if_deleted is not None else False + ) - params = ImportImageParameters(source=import_source, - # import tag with force to override existing tags - mode="Force", - target_tags=[target_repo + ":" + tag]) + # Call the sync API + result = client.cache_rules.sync_cache_rule( + resource_group_name=rg, + registry_name=registry_name, + cache_rule_name=name, + sync_tag_parameters=sync_params + ) - return client.registries.begin_import_image(resource_group_name=rg, - registry_name=registry_name, - parameters=params) - + # Inform user that sync request has been queued + logger.warning("Sync request queued successfully. The repository/tag will appear when sync completes.") + return result diff --git a/src/acrcache/azext_acrcache/tests/latest/test_cache.py b/src/acrcache/azext_acrcache/tests/latest/test_cache.py index ff566aea669..27ff06a2dd8 100644 --- a/src/acrcache/azext_acrcache/tests/latest/test_cache.py +++ b/src/acrcache/azext_acrcache/tests/latest/test_cache.py @@ -295,34 +295,45 @@ def setUp(self): self.client = mock.Mock() @mock.patch('azext_acrcache.cache.get_resource_group_name_by_registry_name') - def test_acr_cache_sync_calls_import_image(self, mock_get_rg): - """Test that cache sync calls the import image operation""" + def test_acr_cache_sync_calls_sync_cache_rule(self, mock_get_rg): + """Test that cache sync calls the new sync cache rule operation""" mock_get_rg.return_value = "mockrg" - # Set up mock cache rule - dummy_rule = mock.Mock() - dummy_rule.id = "ruleid" - dummy_rule.properties = mock.Mock() - dummy_rule.properties.source_repository = "repo/source" - dummy_rule.properties.target_repository = "repo/target" - - self.client.cache_rules.get.return_value = dummy_rule - self.client.registries.begin_import_image = mock.Mock() + # Set up mock for the new sync API + self.client.cache_rules.sync_cache_rule = mock.Mock() cache.acr_cache_sync(self.cmd, self.client, "mockRegistry", "mockCacheRule1", "tag1") - self.client.registries.begin_import_image.assert_called_once() + self.client.cache_rules.sync_cache_rule.assert_called_once() - # Verify the import parameters - call_args = self.client.registries.begin_import_image.call_args + # Verify the sync parameters + call_args = self.client.cache_rules.sync_cache_rule.call_args self.assertEqual(call_args[1]['resource_group_name'], "mockrg") self.assertEqual(call_args[1]['registry_name'], "mockRegistry") + self.assertEqual(call_args[1]['cache_rule_name'], "mockCacheRule1") + + # Verify sync parameters structure + sync_params = call_args[1]['sync_tag_parameters'] + self.assertEqual(sync_params.tag_name, "tag1") + self.assertEqual(sync_params.sync_tag_if_deleted, False) - # Verify import parameters structure - params = call_args[1]['parameters'] - self.assertEqual(params.mode, "Force") - self.assertEqual(params.target_tags, ["repo/target:tag1"]) - self.assertEqual(params.source.cache_rule_resource_id, "ruleid") + @mock.patch('azext_acrcache.cache.get_resource_group_name_by_registry_name') + def test_acr_cache_sync_with_sync_tag_if_deleted(self, mock_get_rg): + """Test that cache sync passes sync_tag_if_deleted parameter correctly""" + mock_get_rg.return_value = "mockrg" + + # Set up mock for the new sync API + self.client.cache_rules.sync_cache_rule = mock.Mock() + + cache.acr_cache_sync(self.cmd, self.client, "mockRegistry", "mockCacheRule1", "tag1", sync_tag_if_deleted=True) + + self.client.cache_rules.sync_cache_rule.assert_called_once() + + # Verify sync parameters structure with sync_tag_if_deleted=True + call_args = self.client.cache_rules.sync_cache_rule.call_args + sync_params = call_args[1]['sync_tag_parameters'] + self.assertEqual(sync_params.tag_name, "tag1") + self.assertEqual(sync_params.sync_tag_if_deleted, True) class TestIdentityProcessing(unittest.TestCase): """Test identity parameter processing functionality""" diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/containerregistry.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/containerregistry_aspnetcore.json similarity index 81% rename from src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/containerregistry.json rename to src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/containerregistry_aspnetcore.json index 265a579a087..1c4782f8873 100644 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/containerregistry.json +++ b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/containerregistry_aspnetcore.json @@ -1,68 +1,14 @@ { "swagger": "2.0", "info": { - "version": "2025-09-01-preview", - "title": "ContainerRegistryManagementClient" + "title": "ContainerRegistryManagementClient", + "version": "2025-09-01-preview" }, "host": "management.azure.com", "schemes": [ "https" ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], "paths": { - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives": { - "get": { - "tags": [ - "Archives" - ], - "description": "Lists all archives for the specified container registry and package type.", - "operationId": "Archives_List", - "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" - }, - { - "$ref": "#/parameters/RegistryNameParameter" - }, - { - "$ref": "#/parameters/PackageTypeParameter" - } - ], - "responses": { - "200": { - "description": "The request was successful; the request was well-formed and received properly.", - "schema": { - "$ref": "#/definitions/ArchiveListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "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": { "tags": [ @@ -70,15 +16,18 @@ ], "description": "Gets the properties of the archive.", "operationId": "Archives_Get", + "produces": [ + "application/json" + ], "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" @@ -100,7 +49,7 @@ "default": { "description": "Error response describing why the operation failed. If the resource does not exist, 404 (Not found) is returned.", "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, @@ -116,15 +65,21 @@ ], "description": "Creates a archive for a container registry with the specified parameters.", "operationId": "Archives_Create", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" @@ -136,8 +91,8 @@ "$ref": "#/parameters/ArchiveNameParameter" }, { - "name": "archiveCreateParameters", "in": "body", + "name": "archiveCreateParameters", "description": "The parameters for creating a archive.", "required": true, "schema": { @@ -166,35 +121,41 @@ "default": { "description": "Error response describing why the operation failed. If any of the input parameters are invalid, 400 (Bad Request) is returned. If the request cannot be processed due to a conflict in the request, 409 (Conflict) is returned.", "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, "x-ms-examples": { "ArchiveCreate": { "$ref": "./examples/ArchiveCreate.json" } - }, - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation" } }, - "delete": { + "patch": { "tags": [ "Archives" ], - "description": "Deletes a archive from a container registry.", - "operationId": "Archives_Delete", + "description": "Updates a archive for a container registry with the specified parameters.", + "operationId": "Archives_Update", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" @@ -204,52 +165,52 @@ }, { "$ref": "#/parameters/ArchiveNameParameter" + }, + { + "in": "body", + "name": "archiveUpdateParameters", + "description": "The parameters for updating a archive.", + "required": true, + "schema": { + "$ref": "#/definitions/ArchiveUpdateParameters" + } } ], "responses": { - "202": { - "description": "The request was successful; the operation will complete asynchronously.", - "headers": { - "Location": { - "type": "string" - } + "200": { + "description": "The request was successful; the operation has completed successfully.", + "schema": { + "$ref": "#/definitions/Archive" } }, - "204": { - "description": "The archive does not exist in the subscription." - }, "default": { - "description": "Error response describing why the operation failed.", + "description": "Error response describing why the operation failed. If any of the input parameters are invalid, 400 (Bad Request) is returned. If the request cannot be processed due to a conflict in the request, 409 (Conflict) is returned.", "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { - "ArchiveDelete": { - "$ref": "./examples/ArchiveDelete.json" + "ArchiveUpdate": { + "$ref": "./examples/ArchiveUpdate.json" } - }, - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options": { - "final-state-via": "location" } }, - "patch": { + "delete": { "tags": [ "Archives" ], - "description": "Updates a archive for a container registry with the specified parameters.", - "operationId": "Archives_Update", + "description": "Deletes a archive from a container registry.", + "operationId": "Archives_Delete", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" @@ -259,86 +220,89 @@ }, { "$ref": "#/parameters/ArchiveNameParameter" - }, - { - "name": "archiveUpdateParameters", - "in": "body", - "description": "The parameters for updating a archive.", - "required": true, - "schema": { - "$ref": "#/definitions/ArchiveUpdateParameters" - } } ], "responses": { - "200": { - "description": "The request was successful; the operation has completed successfully.", - "schema": { - "$ref": "#/definitions/Archive" + "202": { + "description": "The request was successful; the operation will complete asynchronously.", + "headers": { + "Location": { + "type": "string" + } } }, + "204": { + "description": "The archive does not exist in the subscription." + }, "default": { - "description": "Error response describing why the operation failed. If any of the input parameters are invalid, 400 (Bad Request) is returned. If the request cannot be processed due to a conflict in the request, 409 (Conflict) is returned.", + "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, "x-ms-examples": { - "ArchiveUpdate": { - "$ref": "./examples/ArchiveUpdate.json" + "ArchiveDelete": { + "$ref": "./examples/ArchiveDelete.json" } - } + }, + "produces": [ + "application/json" + ] } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}/versions": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives": { "get": { "tags": [ - "ArchiveVersions" + "Archives" + ], + "description": "Lists all archives for the specified container registry and package type.", + "operationId": "Archives_List", + "produces": [ + "application/json" ], - "description": "Lists all archive versions for the specified container registry, repository type and archive name.", - "operationId": "ArchiveVersions_List", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" }, { "$ref": "#/parameters/PackageTypeParameter" - }, - { - "$ref": "#/parameters/ArchiveNameParameter" } ], "responses": { "200": { "description": "The request was successful; the request was well-formed and received properly.", "schema": { - "$ref": "#/definitions/ArchiveVersionListResult" + "$ref": "#/definitions/ArchiveListResult" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, - "x-ms-examples": { - "ArchiveVersionList": { - "$ref": "./examples/ArchiveVersionList.json" - } - }, "x-ms-pageable": { "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "ArchiveList": { + "$ref": "./examples/ArchiveList.json" + } } } }, @@ -349,15 +313,18 @@ ], "description": "Gets the properties of the archive version.", "operationId": "ArchiveVersions_Get", + "produces": [ + "application/json" + ], "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" @@ -382,7 +349,7 @@ "default": { "description": "Error response describing why the operation failed. If the resource does not exist, 404 (Not found) is returned.", "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, @@ -398,15 +365,18 @@ ], "description": "Creates a archive for a container registry with the specified parameters.", "operationId": "ArchiveVersions_Create", + "produces": [ + "application/json" + ], "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" @@ -442,18 +412,18 @@ "default": { "description": "Error response describing why the operation failed. If any of the input parameters are invalid, 400 (Bad Request) is returned. If the request cannot be processed due to a conflict in the request, 409 (Conflict) is returned.", "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, "x-ms-examples": { "ArchiveVersionCreate": { "$ref": "./examples/ArchiveVersionCreate.json" } - }, - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation" } }, "delete": { @@ -464,13 +434,13 @@ "operationId": "ArchiveVersions_Delete", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" @@ -500,101 +470,174 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, "x-ms-examples": { "ArchiveVersionDelete": { "$ref": "./examples/ArchiveVersionDelete.json" } }, - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options": { - "final-state-via": "location" - } + "produces": [ + "application/json" + ] } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}/versions": { "get": { "tags": [ - "CacheRules" + "ArchiveVersions" + ], + "description": "Lists all archive versions for the specified container registry, repository type and archive name.", + "operationId": "ArchiveVersions_List", + "produces": [ + "application/json" ], - "description": "Lists all cache rule resources for the specified container registry.", - "operationId": "CacheRules_List", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" + }, + { + "$ref": "#/parameters/PackageTypeParameter" + }, + { + "$ref": "#/parameters/ArchiveNameParameter" } ], "responses": { "200": { "description": "The request was successful; the request was well-formed and received properly.", "schema": { - "$ref": "#/definitions/CacheRulesListResult" + "$ref": "#/definitions/ArchiveVersionListResult" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, - "x-ms-examples": { - "CacheRuleList": { - "$ref": "./examples/CacheRuleList.json" - } - }, "x-ms-pageable": { "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "ArchiveVersionList": { + "$ref": "./examples/ArchiveVersionList.json" + } } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules/{cacheRuleName}": { - "get": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/checkCacheRuleArtifactSyncEstimate": { + "post": { "tags": [ - "CacheRules" + "Registries", + "Operation" + ], + "description": "Checks the contents of an upstream repository and executes the query of a cache rule's artifact sync scope filter.", + "operationId": "Registries_CheckCacheRuleArtifactSyncEstimate", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" ], - "description": "Gets the properties of the specified cache rule resource.", - "operationId": "CacheRules_Get", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" }, { - "$ref": "#/parameters/CacheRuleNameParameter" + "in": "body", + "name": "cacheRuleParameters", + "description": "The cache rule resource.", + "required": true, + "schema": { + "$ref": "#/definitions/CacheRule" + } } ], "responses": { "200": { "description": "The request was successful; the request was well-formed and received properly.", "schema": { - "$ref": "#/definitions/CacheRule" + "$ref": "#/definitions/CacheRuleArtifactSyncEstimateResult" } }, "default": { - "description": "Error response describing why the operation failed. If the resource does not exist, 404 (Not found) is returned.", + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "CheckCacheRuleArtifactSyncEstimate": { + "$ref": "./examples/CheckCacheRuleArtifactSyncEstimate.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules/{cacheRuleName}": { + "get": { + "tags": [ + "CacheRules" + ], + "description": "Gets the properties of the specified cache rule resource.", + "operationId": "CacheRules_Get", + "produces": [ + "application/json" + ], + "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" + }, + { + "$ref": "#/parameters/RegistryNameParameter" + }, + { + "$ref": "#/parameters/CacheRuleNameParameter" + } + ], + "responses": { + "200": { + "description": "The request was successful; the request was well-formed and received properly.", + "schema": { + "$ref": "#/definitions/CacheRule" + } + }, + "default": { + "description": "Error response describing why the operation failed. If the resource does not exist, 404 (Not found) is returned.", "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, @@ -610,15 +653,21 @@ ], "description": "Creates a cache rule for a container registry with the specified parameters.", "operationId": "CacheRules_Create", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" @@ -627,8 +676,8 @@ "$ref": "#/parameters/CacheRuleNameParameter" }, { - "name": "cacheRuleCreateParameters", "in": "body", + "name": "cacheRuleCreateParameters", "description": "The parameters for creating a cache rule.", "required": true, "schema": { @@ -657,24 +706,91 @@ "default": { "description": "Error response describing why the operation failed. If any of the input parameters are invalid, 400 (Bad Request) is returned. If the request cannot be processed due to a conflict in the request, 409 (Conflict) is returned.", "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, "x-ms-examples": { "CacheRuleCreate": { "$ref": "./examples/CacheRuleCreate.json" + } + } + }, + "patch": { + "tags": [ + "CacheRules" + ], + "description": "Updates a cache rule for a container registry with the specified parameters.", + "operationId": "CacheRules_Update", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "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" + }, + { + "$ref": "#/parameters/RegistryNameParameter" + }, + { + "$ref": "#/parameters/CacheRuleNameParameter" + }, + { + "in": "body", + "name": "cacheRuleUpdateParameters", + "description": "The parameters for updating a cache rule.", + "required": true, + "schema": { + "$ref": "#/definitions/CacheRuleUpdateParameters" + } + } + ], + "responses": { + "200": { + "description": "The request was successful; the request was well-formed and received properly.", + "schema": { + "$ref": "#/definitions/CacheRule" + } }, - "CacheRuleCreateArtifactSync": { - "$ref": "./examples/CacheRuleCreateArtifactSync.json" + "201": { + "description": "The request was successful; the operation will complete asynchronously.", + "schema": { + "$ref": "#/definitions/CacheRule" + }, + "headers": { + "Azure-AsyncOperation": { + "type": "string" + } + } }, - "CacheRuleCreateSyncReferrers": { - "$ref": "./examples/CacheRuleCreateSyncReferrers.json" + "default": { + "description": "Error response describing why the operation failed. If any of the input parameters are invalid, 400 (Bad Request) is returned. If the request cannot be processed due to a conflict in the request, 409 (Conflict) is returned.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } } }, "x-ms-long-running-operation": true, "x-ms-long-running-operation-options": { "final-state-via": "azure-async-operation" + }, + "x-ms-examples": { + "CacheRuleUpdate": { + "$ref": "./examples/CacheRuleUpdate.json" + } } }, "delete": { @@ -685,13 +801,13 @@ "operationId": "CacheRules_Delete", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" @@ -713,37 +829,92 @@ "description": "The cache rule does not exist in the subscription." }, "default": { - "description": "Error response describing why the operation failed. If the resource does not exist, 404 (Not found) is returned.", + "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, "x-ms-examples": { "CacheRuleDelete": { "$ref": "./examples/CacheRuleDelete.json" } }, - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options": { - "final-state-via": "location" + "produces": [ + "application/json" + ] + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules": { + "get": { + "tags": [ + "CacheRules" + ], + "description": "Lists all cache rule resources for the specified container registry.", + "operationId": "CacheRules_List", + "produces": [ + "application/json" + ], + "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" + }, + { + "$ref": "#/parameters/RegistryNameParameter" + } + ], + "responses": { + "200": { + "description": "The request was successful; the request was well-formed and received properly.", + "schema": { + "$ref": "#/definitions/CacheRulesListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "CacheRuleList": { + "$ref": "./examples/CacheRuleList.json" + } } - }, - "patch": { + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules/{cacheRuleName}/sync": { + "post": { "tags": [ "CacheRules" ], - "description": "Updates a cache rule for a container registry with the specified parameters.", - "operationId": "CacheRules_Update", + "operationId": "CacheRules_SyncCacheRule", + "consumes": [ + "application/json" + ], "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" @@ -752,55 +923,33 @@ "$ref": "#/parameters/CacheRuleNameParameter" }, { - "name": "cacheRuleUpdateParameters", "in": "body", - "description": "The parameters for updating a cache rule.", + "name": "syncTagParameters", "required": true, "schema": { - "$ref": "#/definitions/CacheRuleUpdateParameters" + "$ref": "#/definitions/CacheRuleSyncParameters" } } ], "responses": { "200": { - "description": "The request was successful; the request was well-formed and received properly.", - "schema": { - "$ref": "#/definitions/CacheRule" - } - }, - "201": { - "description": "The request was successful; the operation will complete asynchronously.", - "schema": { - "$ref": "#/definitions/CacheRule" - }, - "headers": { - "Azure-AsyncOperation": { - "type": "string" - } - } + "description": "A request has been queued to sync a tag for the cache rule." }, "default": { - "description": "Error response describing why the operation failed. If any of the input parameters are invalid, 400 (Bad Request) is returned. If the request cannot be processed due to a conflict in the request, 409 (Conflict) is returned.", + "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { - "CacheRuleUpdate": { - "$ref": "./examples/CacheRuleUpdate.json" - }, - "CacheRuleUpdateArtifactSync": { - "$ref": "./examples/CacheRuleUpdateArtifactSync.json" - }, - "CacheRuleUpdateSyncReferrers": { - "$ref": "./examples/CacheRuleUpdateSyncReferrers.json" + "SyncCacheRuleTagOperationFilter": { + "$ref": "./examples/SyncCacheRuleTagOperationFilter.json" } }, - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation" - } + "produces": [ + "application/json" + ] } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}": { @@ -810,15 +959,18 @@ ], "description": "Gets the properties of the connected registry.", "operationId": "ConnectedRegistries_Get", + "produces": [ + "application/json" + ], "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" @@ -837,7 +989,7 @@ "default": { "description": "Error response describing why the operation failed. If the resource does not exist, 404 (Not found) is returned.", "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, @@ -853,15 +1005,21 @@ ], "description": "Creates a connected registry for a container registry with the specified parameters.", "operationId": "ConnectedRegistries_Create", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" @@ -900,7 +1058,7 @@ "default": { "description": "Error response describing why the operation failed. If any of the input parameters are invalid, 400 (Bad Request) is returned. If the request cannot be processed due to a conflict in the request, 409 (Conflict) is returned.", "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, @@ -920,15 +1078,21 @@ ], "description": "Updates a connected registry with the specified parameters.", "operationId": "ConnectedRegistries_Update", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" @@ -967,7 +1131,7 @@ "default": { "description": "Error response describing why the operation failed. If any of the input parameters are invalid, 400 (Bad Request) is returned. If the request cannot be processed due to a conflict in the request, 409 (Conflict) is returned.", "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, @@ -989,13 +1153,13 @@ "operationId": "ConnectedRegistries_Delete", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" @@ -1022,7 +1186,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, @@ -1047,15 +1211,18 @@ ], "description": "Lists all connected registries for the specified container registry.", "operationId": "ConnectedRegistries_List", + "produces": [ + "application/json" + ], "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" @@ -1074,7 +1241,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, @@ -1097,13 +1264,13 @@ "operationId": "ConnectedRegistries_Deactivate", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" @@ -1127,7 +1294,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, @@ -1139,7 +1306,10 @@ "ConnectedRegistryDeactivate": { "$ref": "./examples/ConnectedRegistryDeactivate.json" } - } + }, + "produces": [ + "application/json" + ] } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}/resync": { @@ -1149,15 +1319,18 @@ ], "description": "Resync the connected registry instance.", "operationId": "ConnectedRegistries_Resync", + "produces": [ + "application/json" + ], "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" @@ -1168,12 +1341,15 @@ ], "responses": { "200": { - "description": "The request was successful; the request was well-formed and received properly." + "description": "The request was successful; the request was well-formed and received properly.", + "schema": { + "$ref": "#/definitions/ConnectedRegistry" + } }, "default": { - "description": "Error response describing why the operation failed.", + "description": "Error response describing why the operation failed. If the resource does not exist, 404 (Not found) is returned.", "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, @@ -1184,73 +1360,89 @@ } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets/{credentialSetName}": { "get": { "tags": [ "CredentialSets" ], - "description": "Lists all credential set resources for the specified container registry.", - "operationId": "CredentialSets_List", + "description": "Gets the properties of the specified credential set resource.", + "operationId": "CredentialSets_Get", + "produces": [ + "application/json" + ], "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" + }, + { + "$ref": "#/parameters/CredentialSetNameParameter" } ], "responses": { "200": { "description": "The request was successful; the request was well-formed and received properly.", "schema": { - "$ref": "#/definitions/CredentialSetListResult" + "$ref": "#/definitions/CredentialSet" } }, "default": { - "description": "Error response describing why the operation failed.", + "description": "Error response describing why the operation failed. If the resource does not exist, 404 (Not found) is returned.", "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { - "CredentialSetList": { - "$ref": "./examples/CredentialSetList.json" + "CredentialSetGet": { + "$ref": "./examples/CredentialSetGet.json" } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets/{credentialSetName}": { - "get": { + }, + "put": { "tags": [ "CredentialSets" ], - "description": "Gets the properties of the specified credential set resource.", - "operationId": "CredentialSets_Get", + "description": "Creates a credential set for a container registry with the specified parameters.", + "operationId": "CredentialSets_Create", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" }, { "$ref": "#/parameters/CredentialSetNameParameter" + }, + { + "in": "body", + "name": "credentialSetCreateParameters", + "description": "The parameters for creating a credential set.", + "required": true, + "schema": { + "$ref": "#/definitions/CredentialSet" + } } ], "responses": { @@ -1260,34 +1452,55 @@ "$ref": "#/definitions/CredentialSet" } }, + "201": { + "description": "The request was successful; the operation will complete asynchronously.", + "schema": { + "$ref": "#/definitions/CredentialSet" + }, + "headers": { + "Azure-AsyncOperation": { + "type": "string" + } + } + }, "default": { - "description": "Error response describing why the operation failed. If the resource does not exist, 404 (Not found) is returned.", + "description": "Error response describing why the operation failed. If any of the input parameters are invalid, 400 (Bad Request) is returned. If the request cannot be processed due to a conflict in the request, 409 (Conflict) is returned.", "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, "x-ms-examples": { - "CredentialSetGet": { - "$ref": "./examples/CredentialSetGet.json" + "CredentialSetCreate": { + "$ref": "./examples/CredentialSetCreate.json" } } }, - "put": { + "patch": { "tags": [ "CredentialSets" ], - "description": "Creates a credential set for a container registry with the specified parameters.", - "operationId": "CredentialSets_Create", + "description": "Updates a credential set for a container registry with the specified parameters.", + "operationId": "CredentialSets_Update", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" @@ -1296,12 +1509,12 @@ "$ref": "#/parameters/CredentialSetNameParameter" }, { - "name": "credentialSetCreateParameters", "in": "body", - "description": "The parameters for creating a credential set.", + "name": "credentialSetUpdateParameters", + "description": "The parameters for updating a credential set.", "required": true, "schema": { - "$ref": "#/definitions/CredentialSet" + "$ref": "#/definitions/CredentialSetUpdateParameters" } } ], @@ -1326,18 +1539,18 @@ "default": { "description": "Error response describing why the operation failed. If any of the input parameters are invalid, 400 (Bad Request) is returned. If the request cannot be processed due to a conflict in the request, 409 (Conflict) is returned.", "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, - "x-ms-examples": { - "CredentialSetCreate": { - "$ref": "./examples/CredentialSetCreate.json" - } - }, "x-ms-long-running-operation": true, "x-ms-long-running-operation-options": { "final-state-via": "azure-async-operation" + }, + "x-ms-examples": { + "CredentialSetUpdate": { + "$ref": "./examples/CredentialSetUpdate.json" + } } }, "delete": { @@ -1348,13 +1561,13 @@ "operationId": "CredentialSets_Delete", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" @@ -1376,106 +1589,45 @@ "description": "The credential store resource does not exist in the subscription." }, "default": { - "description": "Error response describing why the operation failed. If the resource does not exist, 404 (Not found) is returned.", + "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, - "x-ms-examples": { - "CredentialSetDelete": { - "$ref": "./examples/CredentialSetDelete.json" - } - }, "x-ms-long-running-operation": true, "x-ms-long-running-operation-options": { "final-state-via": "location" - } - }, - "patch": { - "tags": [ - "CredentialSets" - ], - "description": "Updates a credential set for a container registry with the specified parameters.", - "operationId": "CredentialSets_Update", - "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" - }, - { - "$ref": "#/parameters/RegistryNameParameter" - }, - { - "$ref": "#/parameters/CredentialSetNameParameter" - }, - { - "name": "credentialSetUpdateParameters", - "in": "body", - "description": "The parameters for updating a credential set.", - "required": true, - "schema": { - "$ref": "#/definitions/CredentialSetUpdateParameters" - } - } - ], - "responses": { - "200": { - "description": "The request was successful; the request was well-formed and received properly.", - "schema": { - "$ref": "#/definitions/CredentialSet" - } - }, - "201": { - "description": "The request was successful; the operation will complete asynchronously.", - "schema": { - "$ref": "#/definitions/CredentialSet" - }, - "headers": { - "Azure-AsyncOperation": { - "type": "string" - } - } - }, - "default": { - "description": "Error response describing why the operation failed. If any of the input parameters are invalid, 400 (Bad Request) is returned. If the request cannot be processed due to a conflict in the request, 409 (Conflict) is returned.", - "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" - } - } }, "x-ms-examples": { - "CredentialSetUpdate": { - "$ref": "./examples/CredentialSetUpdate.json" + "CredentialSetDelete": { + "$ref": "./examples/CredentialSetDelete.json" } }, - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation" - } + "produces": [ + "application/json" + ] } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets": { "get": { "tags": [ - "ExportPipelines" + "CredentialSets" + ], + "description": "Lists all credential set resources for the specified container registry.", + "operationId": "CredentialSets_List", + "produces": [ + "application/json" ], - "description": "Lists all export pipelines for the specified container registry.", - "operationId": "ExportPipelines_List", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" @@ -1485,23 +1637,23 @@ "200": { "description": "The request was successful; the request was well-formed and received properly.", "schema": { - "$ref": "#/definitions/ExportPipelineListResult" + "$ref": "#/definitions/CredentialSetListResult" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, - "x-ms-examples": { - "ExportPipelineList": { - "$ref": "./examples/ExportPipelineList.json" - } - }, "x-ms-pageable": { "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "CredentialSetList": { + "$ref": "./examples/CredentialSetList.json" + } } } }, @@ -1512,15 +1664,18 @@ ], "description": "Gets the properties of the export pipeline.", "operationId": "ExportPipelines_Get", + "produces": [ + "application/json" + ], "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" @@ -1539,7 +1694,7 @@ "default": { "description": "Error response describing why the operation failed. If the resource does not exist, 404 (Not found) is returned.", "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, @@ -1555,15 +1710,21 @@ ], "description": "Creates an export pipeline for a container registry with the specified parameters.", "operationId": "ExportPipelines_Create", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" @@ -1572,8 +1733,8 @@ "$ref": "#/parameters/ExportPipelineNameParameter" }, { - "name": "exportPipelineCreateParameters", "in": "body", + "name": "exportPipelineCreateParameters", "description": "The parameters for creating an export pipeline.", "required": true, "schema": { @@ -1602,18 +1763,18 @@ "default": { "description": "Error response describing why the operation failed. If any of the input parameters are invalid, 400 (Bad Request) is returned. If the request cannot be processed due to a conflict in the request, 409 (Conflict) is returned.", "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, "x-ms-examples": { "ExportPipelineCreate": { "$ref": "./examples/ExportPipelineCreate.json" } - }, - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation" } }, "delete": { @@ -1624,13 +1785,13 @@ "operationId": "ExportPipelines_Delete", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" @@ -1657,18 +1818,69 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, "x-ms-examples": { "ExportPipelineDelete": { "$ref": "./examples/ExportPipelineDelete.json" } }, - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options": { - "final-state-via": "location" + "produces": [ + "application/json" + ] + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines": { + "get": { + "tags": [ + "ExportPipelines" + ], + "description": "Lists all export pipelines for the specified container registry.", + "operationId": "ExportPipelines_List", + "produces": [ + "application/json" + ], + "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" + }, + { + "$ref": "#/parameters/RegistryNameParameter" + } + ], + "responses": { + "200": { + "description": "The request was successful; the request was well-formed and received properly.", + "schema": { + "$ref": "#/definitions/ExportPipelineListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "ExportPipelineList": { + "$ref": "./examples/ExportPipelineList.json" + } } } }, @@ -1679,22 +1891,25 @@ ], "description": "Copies an image to this container registry from the specified container registry.", "operationId": "Registries_ImportImage", + "consumes": [ + "application/json" + ], "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" }, { - "name": "parameters", "in": "body", + "name": "parameters", "description": "The parameters specifying the image to copy and the source container registry.", "required": true, "schema": { @@ -1715,9 +1930,13 @@ } } }, - "x-ms-examples": { - "ImportImageByTag": { - "$ref": "./examples/ImportImageByTag.json" + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-examples": { + "ImportImageByTag": { + "$ref": "./examples/ImportImageByTag.json" }, "ImportImageByManifestDigest": { "$ref": "./examples/ImportImageByManifestDigest.json" @@ -1725,55 +1944,6 @@ "ImportImageFromPublicRegistry": { "$ref": "./examples/ImportImageFromPublicRegistry.json" } - }, - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options": { - "final-state-via": "location" - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines": { - "get": { - "tags": [ - "ImportPipelines" - ], - "description": "Lists all import pipelines for the specified container registry.", - "operationId": "ImportPipelines_List", - "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" - }, - { - "$ref": "#/parameters/RegistryNameParameter" - } - ], - "responses": { - "200": { - "description": "The request was successful; the request was well-formed and received properly.", - "schema": { - "$ref": "#/definitions/ImportPipelineListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "ImportPipelineList": { - "$ref": "./examples/ImportPipelineList.json" - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" } } }, @@ -1784,15 +1954,18 @@ ], "description": "Gets the properties of the import pipeline.", "operationId": "ImportPipelines_Get", + "produces": [ + "application/json" + ], "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" @@ -1811,7 +1984,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, @@ -1827,15 +2000,21 @@ ], "description": "Creates an import pipeline for a container registry with the specified parameters.", "operationId": "ImportPipelines_Create", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" @@ -1844,8 +2023,8 @@ "$ref": "#/parameters/ImportPipelineNameParameter" }, { - "name": "importPipelineCreateParameters", "in": "body", + "name": "importPipelineCreateParameters", "description": "The parameters for creating an import pipeline.", "required": true, "schema": { @@ -1874,18 +2053,18 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, "x-ms-examples": { "ImportPipelineCreate": { "$ref": "./examples/ImportPipelineCreate.json" } - }, - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation" } }, "delete": { @@ -1896,13 +2075,13 @@ "operationId": "ImportPipelines_Delete", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" @@ -1929,68 +2108,96 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, "x-ms-examples": { "ImportPipelineDelete": { "$ref": "./examples/ImportPipelineDelete.json" } }, - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options": { - "final-state-via": "location" - } + "produces": [ + "application/json" + ] } }, - "/providers/Microsoft.ContainerRegistry/operations": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines": { "get": { "tags": [ - "Operation" + "ImportPipelines" + ], + "description": "Lists all import pipelines for the specified container registry.", + "operationId": "ImportPipelines_List", + "produces": [ + "application/json" ], - "description": "Lists all of the available Azure Container Registry REST API operations.", - "operationId": "Operations_List", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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" + }, + { + "$ref": "#/parameters/RegistryNameParameter" } ], "responses": { "200": { "description": "The request was successful; the request was well-formed and received properly.", "schema": { - "$ref": "#/definitions/OperationListResult" + "$ref": "#/definitions/ImportPipelineListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } - } - }, - "x-ms-examples": { - "OperationList": { - "$ref": "./examples/OperationList.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "ImportPipelineList": { + "$ref": "./examples/ImportPipelineList.json" + } } } }, "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerRegistry/checkNameAvailability": { "post": { "tags": [ + "Operations", "Operation" ], "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.", "operationId": "Registries_CheckNameAvailability", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "name": "registryNameCheckRequest", "in": "body", + "name": "registryNameCheckRequest", "description": "The object containing information for the availability request.", "required": true, "schema": { @@ -2016,48 +2223,37 @@ } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns": { + "/providers/Microsoft.ContainerRegistry/operations": { "get": { "tags": [ - "PipelineRuns" + "Operations", + "Operation" + ], + "description": "Lists all of the available Azure Container Registry REST API operations.", + "operationId": "Operations_List", + "produces": [ + "application/json" ], - "description": "Lists all the pipeline runs for the specified container registry.", - "operationId": "PipelineRuns_List", "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" - }, - { - "$ref": "#/parameters/RegistryNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { - "description": "The request was successful; the request was well - formed and received properly.", - "schema": { - "$ref": "#/definitions/PipelineRunListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", + "description": "The request was successful; the request was well-formed and received properly.", "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/OperationListResult" } } }, - "x-ms-examples": { - "PipelineRunList": { - "$ref": "./examples/PipelineRunList.json" - } - }, "x-ms-pageable": { "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "OperationList": { + "$ref": "./examples/OperationList.json" + } } } }, @@ -2068,15 +2264,18 @@ ], "description": "Gets the detailed information for a given pipeline run.", "operationId": "PipelineRuns_Get", + "produces": [ + "application/json" + ], "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" @@ -2095,7 +2294,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, @@ -2111,15 +2310,21 @@ ], "description": "Creates a pipeline run for a container registry with the specified parameters", "operationId": "PipelineRuns_Create", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" @@ -2128,8 +2333,8 @@ "$ref": "#/parameters/PipelineRunNameParameter" }, { - "name": "pipelineRunCreateParameters", "in": "body", + "name": "pipelineRunCreateParameters", "description": "The parameters for creating a pipeline run.", "required": true, "schema": { @@ -2158,10 +2363,14 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, "x-ms-examples": { "PipelineRunCreate_Export": { "$ref": "./examples/PipelineRunCreate_Export.json" @@ -2169,10 +2378,6 @@ "PipelineRunCreate_Import": { "$ref": "./examples/PipelineRunCreate_Import.json" } - }, - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation" } }, "delete": { @@ -2183,13 +2388,13 @@ "operationId": "PipelineRuns_Delete", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" @@ -2216,37 +2421,43 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, "x-ms-examples": { "PipelineRunDelete": { "$ref": "./examples/PipelineRunDelete.json" } }, - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options": { - "final-state-via": "location" - } + "produces": [ + "application/json" + ] } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateEndpointConnections": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns": { "get": { "tags": [ - "PrivateEndpointConnections" + "PipelineRuns" + ], + "description": "Lists all the pipeline runs for the specified container registry.", + "operationId": "PipelineRuns_List", + "produces": [ + "application/json" ], - "description": "List all private endpoint connections in a container registry.", - "operationId": "PrivateEndpointConnections_List", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" @@ -2254,44 +2465,65 @@ ], "responses": { "200": { - "description": "The request was successful; the request was well-formed and received properly.", + "description": "The request was successful; the request was well - formed and received properly.", "schema": { - "$ref": "#/definitions/PrivateEndpointConnectionListResult" + "$ref": "#/definitions/PipelineRunListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } - } - }, - "x-ms-examples": { - "PrivateEndpointConnectionList": { - "$ref": "./examples/PrivateEndpointConnectionList.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "PipelineRunList": { + "$ref": "./examples/PipelineRunList.json" + } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateEndpointConnections/{privateEndpointConnectionName}": { - "get": { + "put": { "tags": [ "PrivateEndpointConnections" ], - "description": "Get the specified private endpoint connection associated with the container registry.", - "operationId": "PrivateEndpointConnections_Get", + "description": "Update the state of specified private endpoint connection associated with the container registry.", + "operationId": "PrivateEndpointConnections_CreateOrUpdate", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" }, { "$ref": "#/parameters/PrivateEndpointConnectionNameParameter" + }, + { + "in": "body", + "name": "privateEndpointConnection", + "description": "The parameters for creating a private endpoint connection.", + "required": true, + "schema": { + "$ref": "#/definitions/PrivateEndpointConnection" + } } ], "responses": { @@ -2300,44 +2532,53 @@ "schema": { "$ref": "#/definitions/PrivateEndpointConnection" } + }, + "201": { + "description": "The request was successful; the operation will complete asynchronously.", + "schema": { + "$ref": "#/definitions/PrivateEndpointConnection" + }, + "headers": { + "Azure-AsyncOperation": { + "type": "string" + } + } } }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, "x-ms-examples": { - "PrivateEndpointConnectionGet": { - "$ref": "./examples/PrivateEndpointConnectionGet.json" + "PrivateEndpointConnectionCreateOrUpdate": { + "$ref": "./examples/PrivateEndpointConnectionCreateOrUpdate.json" } } }, - "put": { + "get": { "tags": [ "PrivateEndpointConnections" ], - "description": "Update the state of specified private endpoint connection associated with the container registry.", - "operationId": "PrivateEndpointConnections_CreateOrUpdate", + "description": "Get the specified private endpoint connection associated with the container registry.", + "operationId": "PrivateEndpointConnections_Get", + "produces": [ + "application/json" + ], "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" }, { "$ref": "#/parameters/PrivateEndpointConnectionNameParameter" - }, - { - "name": "privateEndpointConnection", - "in": "body", - "description": "The parameters for creating a private endpoint connection.", - "required": true, - "schema": { - "$ref": "#/definitions/PrivateEndpointConnection" - } } ], "responses": { @@ -2346,27 +2587,12 @@ "schema": { "$ref": "#/definitions/PrivateEndpointConnection" } - }, - "201": { - "description": "The request was successful; the operation will complete asynchronously.", - "schema": { - "$ref": "#/definitions/PrivateEndpointConnection" - }, - "headers": { - "Azure-AsyncOperation": { - "type": "string" - } - } } }, "x-ms-examples": { - "PrivateEndpointConnectionCreateOrUpdate": { - "$ref": "./examples/PrivateEndpointConnectionCreateOrUpdate.json" + "PrivateEndpointConnectionGet": { + "$ref": "./examples/PrivateEndpointConnectionGet.json" } - }, - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation" } }, "delete": { @@ -2377,13 +2603,13 @@ "operationId": "PrivateEndpointConnections_Delete", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" @@ -2408,83 +2634,59 @@ "description": "The private endpoint connection does not exist in the subscription." } }, - "x-ms-examples": { - "PrivateEndpointConnectionDelete": { - "$ref": "./examples/PrivateEndpointConnectionDelete.json" - } - }, "x-ms-long-running-operation": true, "x-ms-long-running-operation-options": { "final-state-via": "location" - } - } - }, - "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerRegistry/registries": { - "get": { - "tags": [ - "Registries" - ], - "description": "Lists all the container registries under the specified subscription.", - "operationId": "Registries_List", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" - } - ], - "responses": { - "200": { - "description": "The request was successful; the request was well-formed and received properly.", - "schema": { - "$ref": "#/definitions/RegistryListResult" - } - } }, "x-ms-examples": { - "RegistryList": { - "$ref": "./examples/RegistryList.json" + "PrivateEndpointConnectionDelete": { + "$ref": "./examples/PrivateEndpointConnectionDelete.json" } }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } + "produces": [ + "application/json" + ] } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateEndpointConnections": { "get": { "tags": [ - "Registries" + "PrivateEndpointConnections" + ], + "description": "List all private endpoint connections in a container registry.", + "operationId": "PrivateEndpointConnections_List", + "produces": [ + "application/json" ], - "description": "Lists all the container registries under the specified resource group.", - "operationId": "Registries_ListByResourceGroup", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/RegistryNameParameter" } ], "responses": { "200": { "description": "The request was successful; the request was well-formed and received properly.", "schema": { - "$ref": "#/definitions/RegistryListResult" + "$ref": "#/definitions/PrivateEndpointConnectionListResult" } } }, - "x-ms-examples": { - "RegistryListByResourceGroup": { - "$ref": "./examples/RegistryListByResourceGroup.json" - } - }, "x-ms-pageable": { "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "PrivateEndpointConnectionList": { + "$ref": "./examples/PrivateEndpointConnectionList.json" + } } } }, @@ -2495,15 +2697,18 @@ ], "description": "Gets the properties of the specified container registry.", "operationId": "Registries_Get", + "produces": [ + "application/json" + ], "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" @@ -2529,22 +2734,28 @@ ], "description": "Creates a container registry with the specified parameters.", "operationId": "Registries_Create", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" }, { - "name": "registry", "in": "body", + "name": "registry", "description": "The parameters for creating a container registry.", "required": true, "schema": { @@ -2571,69 +2782,17 @@ } } }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, "x-ms-examples": { "RegistryCreate": { "$ref": "./examples/RegistryCreate.json" }, "RegistryCreateZoneRedundant": { "$ref": "./examples/RegistryCreateZoneRedundant.json" - }, - "RegistryCreateDomainNameLabelScope": { - "$ref": "./examples/RegistryCreateDomainNameLabelScope.json" - }, - "RegistryCreateAbac": { - "$ref": "./examples/RegistryCreateAbac.json" - } - }, - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation" - } - }, - "delete": { - "tags": [ - "Registries" - ], - "description": "Deletes a container registry.", - "operationId": "Registries_Delete", - "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" - }, - { - "$ref": "#/parameters/RegistryNameParameter" - } - ], - "responses": { - "200": { - "description": "The request was successful; the request was well-formed and received properly." - }, - "202": { - "description": "The request was successful; the operation will complete asynchronously.", - "headers": { - "Location": { - "type": "string" - } - } - }, - "204": { - "description": "The container registry does not exist in the subscription." - } - }, - "x-ms-examples": { - "RegistryDelete": { - "$ref": "./examples/RegistryDelete.json" } - }, - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options": { - "final-state-via": "location" } }, "patch": { @@ -2642,22 +2801,28 @@ ], "description": "Updates a container registry with the specified parameters.", "operationId": "Registries_Update", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" }, { - "name": "registryUpdateParameters", "in": "body", + "name": "registryUpdateParameters", "description": "The parameters for updating a container registry.", "required": true, "schema": { @@ -2684,33 +2849,31 @@ } } }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, "x-ms-examples": { "RegistryUpdate": { "$ref": "./examples/RegistryUpdate.json" } - }, - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation" } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listUsages": { - "get": { + }, + "delete": { "tags": [ "Registries" ], - "description": "Gets the quota usages for the specified container registry.", - "operationId": "Registries_ListUsages", + "description": "Deletes a container registry.", + "operationId": "Registries_Delete", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" @@ -2718,171 +2881,218 @@ ], "responses": { "200": { - "description": "The request was successful; the registry usages retrieved and returned successfully.", - "schema": { - "$ref": "#/definitions/RegistryUsageListResult" + "description": "The request was successful; the request was well-formed and received properly." + }, + "202": { + "description": "The request was successful; the operation will complete asynchronously.", + "headers": { + "Location": { + "type": "string" + } } + }, + "204": { + "description": "The container registry does not exist in the subscription." } }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, "x-ms-examples": { - "RegistryListUsages": { - "$ref": "./examples/RegistryListUsages.json" + "RegistryDelete": { + "$ref": "./examples/RegistryDelete.json" } - } + }, + "produces": [ + "application/json" + ] } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateLinkResources": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries": { "get": { "tags": [ "Registries" ], - "description": "Lists the private link resources for a container registry.", - "operationId": "Registries_ListPrivateLinkResources", + "description": "Lists all the container registries under the specified resource group.", + "operationId": "Registries_ListByResourceGroup", + "produces": [ + "application/json" + ], "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/ApiVersionParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "#/parameters/RegistryNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" } ], "responses": { "200": { - "description": "The request was successful; the private link resources were retrieved and returned successfully.", + "description": "The request was successful; the request was well-formed and received properly.", "schema": { - "$ref": "#/definitions/PrivateLinkResourceListResult" + "$ref": "#/definitions/RegistryListResult" } } }, - "x-ms-examples": { - "RegistryListPrivateLinkResources": { - "$ref": "./examples/RegistryListPrivateLinkResources.json" - } - }, "x-ms-pageable": { "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "RegistryListByResourceGroup": { + "$ref": "./examples/RegistryListByResourceGroup.json" + } } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateLinkResources/{groupName}": { + "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerRegistry/registries": { "get": { "tags": [ "Registries" ], - "description": "Gets a private link resource by a specified group name for a container registry.", - "operationId": "Registries_GetPrivateLinkResource", + "description": "Lists all the container registries under the specified subscription.", + "operationId": "Registries_List", + "produces": [ + "application/json" + ], "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/ApiVersionParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/RegistryNameParameter" - }, - { - "$ref": "#/parameters/GroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { - "description": "The request was successful; the private link resource was retrieved and returned successfully.", + "description": "The request was successful; the request was well-formed and received properly.", "schema": { - "$ref": "#/definitions/PrivateLinkResource" + "$ref": "#/definitions/RegistryListResult" } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "RegistryList": { + "$ref": "./examples/RegistryList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listCredentials": { + "post": { + "tags": [ + "Registries" + ], + "description": "Lists the login credentials for the specified container registry.", + "operationId": "Registries_ListCredentials", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" }, - "default": { - "description": "Error response describing why the operation failed. If the resource does not exist, 404 (Not found) is returned.", + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/RegistryNameParameter" + } + ], + "responses": { + "200": { + "description": "The request was successful; the list of credentials retrieved and returned successfully.", "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/RegistryListCredentialsResult" } } }, "x-ms-examples": { - "RegistryGetPrivateLinkResource": { - "$ref": "./examples/RegistryGetPrivateLinkResource.json" + "RegistryListCredentials": { + "$ref": "./examples/RegistryListCredentials.json" } } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/checkCacheRuleArtifactSyncEstimate": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/regenerateCredential": { "post": { "tags": [ - "Registries", - "Operation" + "Registries" + ], + "description": "Regenerates one of the login credentials for the specified container registry.", + "operationId": "Registries_RegenerateCredential", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" ], - "description": "Checks the upstream repository for artifacts that match the cache rule's sync scope filter and estimates the number of artifacts that would be synchronized if the rule is applied.", - "operationId": "Registries_CheckCacheRuleArtifactSyncEstimate", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" }, { "in": "body", - "name": "cacheRuleParameters", - "description": "The cache rule resource.", + "name": "regenerateCredentialParameters", + "description": "Specifies name of the password which should be regenerated -- password or password2.", "required": true, "schema": { - "$ref": "#/definitions/CacheRule" + "$ref": "#/definitions/RegenerateCredentialParameters" } } ], "responses": { "200": { - "description": "The request was successful; the request was well-formed and received properly.", - "schema": { - "$ref": "#/definitions/CacheRuleArtifactSyncEstimateResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", + "description": "The request was successful; the specified credential regenerated successfully.", "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/RegistryListCredentialsResult" } } }, "x-ms-examples": { - "CheckCacheRuleArtifactSyncEstimate": { - "$ref": "./examples/CheckCacheRuleArtifactSyncEstimate.json" + "RegistryRegenerateCredential": { + "$ref": "./examples/RegistryRegenerateCredential.json" } } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listCredentials": { - "post": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listUsages": { + "get": { "tags": [ "Registries" ], - "description": "Lists the login credentials for the specified container registry.", - "operationId": "Registries_ListCredentials", + "description": "Gets the quota usages for the specified container registry.", + "operationId": "Registries_ListUsages", + "produces": [ + "application/json" + ], "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" @@ -2890,100 +3100,106 @@ ], "responses": { "200": { - "description": "The request was successful; the list of credentials retrieved and returned successfully.", + "description": "The request was successful; the registry usages retrieved and returned successfully.", "schema": { - "$ref": "#/definitions/RegistryListCredentialsResult" + "$ref": "#/definitions/RegistryUsageListResult" } } }, "x-ms-examples": { - "RegistryListCredentials": { - "$ref": "./examples/RegistryListCredentials.json" + "RegistryListUsages": { + "$ref": "./examples/RegistryListUsages.json" } } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/regenerateCredential": { - "post": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateLinkResources": { + "get": { "tags": [ "Registries" ], - "description": "Regenerates one of the login credentials for the specified container registry.", - "operationId": "Registries_RegenerateCredential", + "description": "Lists the private link resources for a container registry.", + "operationId": "Registries_ListPrivateLinkResources", + "produces": [ + "application/json" + ], "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" - }, - { - "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": "The request was successful; the specified credential regenerated successfully.", + "description": "The request was successful; the private link resources were retrieved and returned successfully.", "schema": { - "$ref": "#/definitions/RegistryListCredentialsResult" + "$ref": "#/definitions/PrivateLinkResourceListResult" } } }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, "x-ms-examples": { - "RegistryRegenerateCredential": { - "$ref": "./examples/RegistryRegenerateCredential.json" + "RegistryListPrivateLinkResources": { + "$ref": "./examples/RegistryListPrivateLinkResources.json" } } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateLinkResources/{groupName}": { "get": { "tags": [ - "Replications" + "Registries" + ], + "description": "Gets a private link resource by a specified group name for a container registry.", + "operationId": "Registries_GetPrivateLinkResource", + "produces": [ + "application/json" ], - "description": "Lists all the replications for the specified container registry.", - "operationId": "Replications_List", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" + }, + { + "$ref": "#/parameters/GroupNameParameter" } ], "responses": { "200": { - "description": "The request was successful; the request was well-formed and received properly.", + "description": "The request was successful; the private link resource was retrieved and returned successfully.", "schema": { - "$ref": "#/definitions/ReplicationListResult" + "$ref": "#/definitions/PrivateLinkResource" + } + }, + "default": { + "description": "Error response describing why the operation failed. If the resource does not exist, 404 (Not found) is returned.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { - "ReplicationList": { - "$ref": "./examples/ReplicationList.json" + "RegistryGetPrivateLinkResource": { + "$ref": "./examples/RegistryGetPrivateLinkResource.json" } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" } } }, @@ -2994,15 +3210,18 @@ ], "description": "Gets the properties of the specified replication.", "operationId": "Replications_Get", + "produces": [ + "application/json" + ], "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" @@ -3031,15 +3250,21 @@ ], "description": "Creates a replication for a container registry with the specified parameters.", "operationId": "Replications_Create", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" @@ -3048,8 +3273,8 @@ "$ref": "#/parameters/ReplicationNameParameter" }, { - "name": "replication", "in": "body", + "name": "replication", "description": "The parameters for creating a replication.", "required": true, "schema": { @@ -3076,6 +3301,10 @@ } } }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, "x-ms-examples": { "ReplicationCreate": { "$ref": "./examples/ReplicationCreate.json" @@ -3083,59 +3312,6 @@ "ReplicationCreateZoneRedundant": { "$ref": "./examples/ReplicationCreateZoneRedundant.json" } - }, - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation" - } - }, - "delete": { - "tags": [ - "Replications" - ], - "description": "Deletes a replication from a container registry.", - "operationId": "Replications_Delete", - "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" - }, - { - "$ref": "#/parameters/RegistryNameParameter" - }, - { - "$ref": "#/parameters/ReplicationNameParameter" - } - ], - "responses": { - "200": { - "description": "The request was successful; the request was well-formed and received properly." - }, - "202": { - "description": "The request was successful; the operation will complete asynchronously.", - "headers": { - "Location": { - "type": "string" - } - } - }, - "204": { - "description": "The replication does not exist in the subscription." - } - }, - "x-ms-examples": { - "ReplicationDelete": { - "$ref": "./examples/ReplicationDelete.json" - } - }, - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options": { - "final-state-via": "location" } }, "patch": { @@ -3144,15 +3320,21 @@ ], "description": "Updates a replication for a container registry with the specified parameters.", "operationId": "Replications_Update", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" @@ -3161,8 +3343,8 @@ "$ref": "#/parameters/ReplicationNameParameter" }, { - "name": "replicationUpdateParameters", "in": "body", + "name": "replicationUpdateParameters", "description": "The parameters for updating a replication.", "required": true, "schema": { @@ -3189,59 +3371,108 @@ } } }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, "x-ms-examples": { "ReplicationUpdate": { "$ref": "./examples/ReplicationUpdate.json" } - }, - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation" } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps": { - "get": { + }, + "delete": { "tags": [ - "ScopeMaps" + "Replications" ], - "description": "Lists all the scope maps for the specified container registry.", - "operationId": "ScopeMaps_List", + "description": "Deletes a replication from a container registry.", + "operationId": "Replications_Delete", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" - } - ], + }, + { + "$ref": "#/parameters/ReplicationNameParameter" + } + ], "responses": { "200": { - "description": "The request was successful; the request was well-formed and received properly.", - "schema": { - "$ref": "#/definitions/ScopeMapListResult" - } + "description": "The request was successful; the request was well-formed and received properly." }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + "202": { + "description": "The request was successful; the operation will complete asynchronously.", + "headers": { + "Location": { + "type": "string" + } } + }, + "204": { + "description": "The replication does not exist in the subscription." } }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, "x-ms-examples": { - "ScopeMapList": { - "$ref": "./examples/ScopeMapList.json" + "ReplicationDelete": { + "$ref": "./examples/ReplicationDelete.json" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications": { + "get": { + "tags": [ + "Replications" + ], + "description": "Lists all the replications for the specified container registry.", + "operationId": "Replications_List", + "produces": [ + "application/json" + ], + "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" + }, + { + "$ref": "#/parameters/RegistryNameParameter" + } + ], + "responses": { + "200": { + "description": "The request was successful; the request was well-formed and received properly.", + "schema": { + "$ref": "#/definitions/ReplicationListResult" + } } }, "x-ms-pageable": { "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "ReplicationList": { + "$ref": "./examples/ReplicationList.json" + } } } }, @@ -3252,15 +3483,18 @@ ], "description": "Gets the properties of the specified scope map.", "operationId": "ScopeMaps_Get", + "produces": [ + "application/json" + ], "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" @@ -3279,7 +3513,7 @@ "default": { "description": "Error response describing why the operation failed. If the resource does not exist, 404 (Not found) is returned.", "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, @@ -3295,15 +3529,21 @@ ], "description": "Creates a scope map for a container registry with the specified parameters.", "operationId": "ScopeMaps_Create", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" @@ -3312,8 +3552,8 @@ "$ref": "#/parameters/ScopeMapNameParameter" }, { - "name": "scopeMapCreateParameters", "in": "body", + "name": "scopeMapCreateParameters", "description": "The parameters for creating a scope map.", "required": true, "schema": { @@ -3342,159 +3582,171 @@ "default": { "description": "Error response describing why the operation failed. If any of the input parameters are invalid, 400 (Bad Request) is returned. If the request cannot be processed due to a conflict in the request, 409 (Conflict) is returned.", "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, "x-ms-examples": { "ScopeMapCreate": { "$ref": "./examples/ScopeMapCreate.json" } - }, - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation" } }, - "delete": { + "patch": { "tags": [ "ScopeMaps" ], - "description": "Deletes a scope map from a container registry.", - "operationId": "ScopeMaps_Delete", + "description": "Updates a scope map with the specified parameters.", + "operationId": "ScopeMaps_Update", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" }, { "$ref": "#/parameters/ScopeMapNameParameter" + }, + { + "in": "body", + "name": "scopeMapUpdateParameters", + "description": "The parameters for updating a scope map.", + "required": true, + "schema": { + "$ref": "#/definitions/ScopeMapUpdateParameters" + } } ], "responses": { "200": { - "description": "The request was successful; the request was well-formed and received properly." + "description": "The request was successful; the request was well-formed and received properly.", + "schema": { + "$ref": "#/definitions/ScopeMap" + } }, - "202": { + "201": { "description": "The request was successful; the operation will complete asynchronously.", + "schema": { + "$ref": "#/definitions/ScopeMap" + }, "headers": { - "Location": { + "Azure-AsyncOperation": { "type": "string" } } }, - "204": { - "description": "The scopemap does not exist in the subscription." - }, "default": { - "description": "Error response describing why the operation failed.", + "description": "Error response describing why the operation failed. If any of the input parameters are invalid, 400 (Bad Request) is returned. If the request cannot be processed due to a conflict in the request, 409 (Conflict) is returned.", "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, - "x-ms-examples": { - "ScopeMapDelete": { - "$ref": "./examples/ScopeMapDelete.json" - } - }, "x-ms-long-running-operation": true, "x-ms-long-running-operation-options": { - "final-state-via": "location" + "final-state-via": "azure-async-operation" + }, + "x-ms-examples": { + "ScopeMapUpdate": { + "$ref": "./examples/ScopeMapUpdate.json" + } } }, - "patch": { + "delete": { "tags": [ "ScopeMaps" ], - "description": "Updates a scope map with the specified parameters.", - "operationId": "ScopeMaps_Update", + "description": "Deletes a scope map from a container registry.", + "operationId": "ScopeMaps_Delete", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" }, { "$ref": "#/parameters/ScopeMapNameParameter" - }, - { - "name": "scopeMapUpdateParameters", - "in": "body", - "description": "The parameters for updating a scope map.", - "required": true, - "schema": { - "$ref": "#/definitions/ScopeMapUpdateParameters" - } } ], "responses": { "200": { - "description": "The request was successful; the request was well-formed and received properly.", - "schema": { - "$ref": "#/definitions/ScopeMap" - } + "description": "The request was successful; the request was well-formed and received properly." }, - "201": { + "202": { "description": "The request was successful; the operation will complete asynchronously.", - "schema": { - "$ref": "#/definitions/ScopeMap" - }, "headers": { - "Azure-AsyncOperation": { + "Location": { "type": "string" } } }, + "204": { + "description": "The scopemap does not exist in the subscription." + }, "default": { - "description": "Error response describing why the operation failed. If any of the input parameters are invalid, 400 (Bad Request) is returned. If the request cannot be processed due to a conflict in the request, 409 (Conflict) is returned.", + "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, "x-ms-examples": { - "ScopeMapUpdate": { - "$ref": "./examples/ScopeMapUpdate.json" + "ScopeMapDelete": { + "$ref": "./examples/ScopeMapDelete.json" } }, - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation" - } + "produces": [ + "application/json" + ] } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps": { "get": { "tags": [ - "Tokens" + "ScopeMaps" + ], + "description": "Lists all the scope maps for the specified container registry.", + "operationId": "ScopeMaps_List", + "produces": [ + "application/json" ], - "description": "Lists all the tokens for the specified container registry.", - "operationId": "Tokens_List", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" @@ -3504,23 +3756,23 @@ "200": { "description": "The request was successful; the request was well-formed and received properly.", "schema": { - "$ref": "#/definitions/TokenListResult" + "$ref": "#/definitions/ScopeMapListResult" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, - "x-ms-examples": { - "TokenList": { - "$ref": "./examples/TokenList.json" - } - }, "x-ms-pageable": { "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "ScopeMapList": { + "$ref": "./examples/ScopeMapList.json" + } } } }, @@ -3531,15 +3783,18 @@ ], "description": "Gets the properties of the specified token.", "operationId": "Tokens_Get", + "produces": [ + "application/json" + ], "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" @@ -3558,7 +3813,7 @@ "default": { "description": "Error response describing why the operation failed. If the resource does not exist, 404 (Not found) is returned.", "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, @@ -3574,15 +3829,21 @@ ], "description": "Creates a token for a container registry with the specified parameters.", "operationId": "Tokens_Create", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" @@ -3591,8 +3852,8 @@ "$ref": "#/parameters/TokenNameParameter" }, { - "name": "tokenCreateParameters", "in": "body", + "name": "tokenCreateParameters", "description": "The parameters for creating a token.", "required": true, "schema": { @@ -3621,140 +3882,197 @@ "default": { "description": "Error response describing why the operation failed. If any of the input parameters are invalid, 400 (Bad Request) is returned. If the request cannot be processed due to a conflict in the request, 409 (Conflict) is returned.", "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, "x-ms-examples": { "TokenCreate": { "$ref": "./examples/TokenCreate.json" } - }, - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation" } }, - "delete": { + "patch": { "tags": [ "Tokens" ], - "description": "Deletes a token from a container registry.", - "operationId": "Tokens_Delete", + "description": "Updates a token with the specified parameters.", + "operationId": "Tokens_Update", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" }, { "$ref": "#/parameters/TokenNameParameter" + }, + { + "in": "body", + "name": "tokenUpdateParameters", + "description": "The parameters for updating a token.", + "required": true, + "schema": { + "$ref": "#/definitions/TokenUpdateParameters" + } } ], "responses": { "200": { - "description": "The request was successful; the request was well-formed and received properly." + "description": "The request was successful; the request was well-formed and received properly.", + "schema": { + "$ref": "#/definitions/Token" + } }, - "202": { + "201": { "description": "The request was successful; the operation will complete asynchronously.", + "schema": { + "$ref": "#/definitions/Token" + }, "headers": { - "Location": { + "Azure-AsyncOperation": { "type": "string" } } }, - "204": { - "description": "The token does not exist in the subscription." - }, "default": { - "description": "Error response describing why the operation failed. If the resource does not exist, 404 (Not found) is returned.", + "description": "Error response describing why the operation failed. If any of the input parameters are invalid, 400 (Bad Request) is returned. If the request cannot be processed due to a conflict in the request, 409 (Conflict) is returned.", "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, - "x-ms-examples": { - "TokenDelete": { - "$ref": "./examples/TokenDelete.json" - } - }, "x-ms-long-running-operation": true, "x-ms-long-running-operation-options": { - "final-state-via": "location" + "final-state-via": "azure-async-operation" + }, + "x-ms-examples": { + "TokenUpdate": { + "$ref": "./examples/TokenUpdate.json" + } } }, - "patch": { + "delete": { "tags": [ "Tokens" ], - "description": "Updates a token with the specified parameters.", - "operationId": "Tokens_Update", + "description": "Deletes a token from a container registry.", + "operationId": "Tokens_Delete", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" }, { "$ref": "#/parameters/TokenNameParameter" - }, - { - "name": "tokenUpdateParameters", - "in": "body", - "description": "The parameters for updating a token.", - "required": true, - "schema": { - "$ref": "#/definitions/TokenUpdateParameters" - } } ], "responses": { "200": { - "description": "The request was successful; the request was well-formed and received properly.", - "schema": { - "$ref": "#/definitions/Token" - } + "description": "The request was successful; the request was well-formed and received properly." }, - "201": { + "202": { "description": "The request was successful; the operation will complete asynchronously.", - "schema": { - "$ref": "#/definitions/Token" - }, "headers": { - "Azure-AsyncOperation": { + "Location": { "type": "string" } } }, + "204": { + "description": "The token does not exist in the subscription." + }, "default": { - "description": "Error response describing why the operation failed. If any of the input parameters are invalid, 400 (Bad Request) is returned. If the request cannot be processed due to a conflict in the request, 409 (Conflict) is returned.", + "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, "x-ms-examples": { - "TokenUpdate": { - "$ref": "./examples/TokenUpdate.json" + "TokenDelete": { + "$ref": "./examples/TokenDelete.json" } }, - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation" + "produces": [ + "application/json" + ] + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens": { + "get": { + "tags": [ + "Tokens" + ], + "description": "Lists all the tokens for the specified container registry.", + "operationId": "Tokens_List", + "produces": [ + "application/json" + ], + "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" + }, + { + "$ref": "#/parameters/RegistryNameParameter" + } + ], + "responses": { + "200": { + "description": "The request was successful; the request was well-formed and received properly.", + "schema": { + "$ref": "#/definitions/TokenListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "TokenList": { + "$ref": "./examples/TokenList.json" + } } } }, @@ -3765,22 +4083,28 @@ ], "description": "Generate keys for a token of a specified container registry.", "operationId": "Registries_GenerateCredentials", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" }, { - "name": "generateCredentialsParameters", "in": "body", + "name": "generateCredentialsParameters", "description": "The parameters for generating credentials.", "required": true, "schema": { @@ -3806,57 +4130,18 @@ "default": { "description": "Error response describing why the operation failed. If the resource does not exist, 404 (Not found) is returned.", "schema": { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" } } }, - "x-ms-examples": { - "RegistryGenerateCredentials": { - "$ref": "./examples/RegistryGenerateCredentials.json" - } - }, "x-ms-long-running-operation": true, "x-ms-long-running-operation-options": { "final-state-via": "location" - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks": { - "get": { - "tags": [ - "Webhooks" - ], - "description": "Lists all the webhooks for the specified container registry.", - "operationId": "Webhooks_List", - "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" - }, - { - "$ref": "#/parameters/RegistryNameParameter" - } - ], - "responses": { - "200": { - "description": "The request was successful; the request was well-formed and received properly.", - "schema": { - "$ref": "#/definitions/WebhookListResult" - } - } }, "x-ms-examples": { - "WebhookList": { - "$ref": "./examples/WebhookList.json" + "RegistryGenerateCredentials": { + "$ref": "./examples/RegistryGenerateCredentials.json" } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" } } }, @@ -3867,15 +4152,18 @@ ], "description": "Gets the properties of the specified webhook.", "operationId": "Webhooks_Get", + "produces": [ + "application/json" + ], "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" @@ -3904,15 +4192,21 @@ ], "description": "Creates a webhook for a container registry with the specified parameters.", "operationId": "Webhooks_Create", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" @@ -3921,8 +4215,8 @@ "$ref": "#/parameters/WebhookNameParameter" }, { - "name": "webhookCreateParameters", "in": "body", + "name": "webhookCreateParameters", "description": "The parameters for creating a webhook.", "required": true, "schema": { @@ -3949,63 +4243,14 @@ } } }, - "x-ms-examples": { - "WebhookCreate": { - "$ref": "./examples/WebhookCreate.json" - } - }, "x-ms-long-running-operation": true, "x-ms-long-running-operation-options": { "final-state-via": "azure-async-operation" - } - }, - "delete": { - "tags": [ - "Webhooks" - ], - "description": "Deletes a webhook from a container registry.", - "operationId": "Webhooks_Delete", - "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" - }, - { - "$ref": "#/parameters/RegistryNameParameter" - }, - { - "$ref": "#/parameters/WebhookNameParameter" - } - ], - "responses": { - "200": { - "description": "The request was successful; the request was well-formed and received properly." - }, - "202": { - "description": "The request was successful; the operation will complete asynchronously.", - "headers": { - "Location": { - "type": "string" - } - } - }, - "204": { - "description": "The webhook does not exist in the subscription." - } }, "x-ms-examples": { - "WebhookDelete": { - "$ref": "./examples/WebhookDelete.json" + "WebhookCreate": { + "$ref": "./examples/WebhookCreate.json" } - }, - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options": { - "final-state-via": "location" } }, "patch": { @@ -4014,15 +4259,21 @@ ], "description": "Updates a webhook with the specified parameters.", "operationId": "Webhooks_Update", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" @@ -4031,8 +4282,8 @@ "$ref": "#/parameters/WebhookNameParameter" }, { - "name": "webhookUpdateParameters", "in": "body", + "name": "webhookUpdateParameters", "description": "The parameters for updating a webhook.", "required": true, "schema": { @@ -4059,33 +4310,31 @@ } } }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, "x-ms-examples": { "WebhookUpdate": { "$ref": "./examples/WebhookUpdate.json" } - }, - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation" } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/ping": { - "post": { + }, + "delete": { "tags": [ "Webhooks" ], - "description": "Triggers a ping event to be sent to the webhook.", - "operationId": "Webhooks_Ping", + "description": "Deletes a webhook from a container registry.", + "operationId": "Webhooks_Delete", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" @@ -4096,35 +4345,95 @@ ], "responses": { "200": { - "description": "The request was successful; the request was well-formed and received properly.", - "schema": { - "$ref": "#/definitions/EventInfo" + "description": "The request was successful; the request was well-formed and received properly." + }, + "202": { + "description": "The request was successful; the operation will complete asynchronously.", + "headers": { + "Location": { + "type": "string" + } } + }, + "204": { + "description": "The webhook does not exist in the subscription." } }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, "x-ms-examples": { - "WebhookPing": { - "$ref": "./examples/WebhookPing.json" + "WebhookDelete": { + "$ref": "./examples/WebhookDelete.json" + } + }, + "produces": [ + "application/json" + ] + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks": { + "get": { + "tags": [ + "Webhooks" + ], + "description": "Lists all the webhooks for the specified container registry.", + "operationId": "Webhooks_List", + "produces": [ + "application/json" + ], + "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" + }, + { + "$ref": "#/parameters/RegistryNameParameter" + } + ], + "responses": { + "200": { + "description": "The request was successful; the request was well-formed and received properly.", + "schema": { + "$ref": "#/definitions/WebhookListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "WebhookList": { + "$ref": "./examples/WebhookList.json" } } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/listEvents": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/ping": { "post": { "tags": [ "Webhooks" ], - "description": "Lists recent events for the specified webhook.", - "operationId": "Webhooks_ListEvents", + "description": "Triggers a ping event to be sent to the webhook.", + "operationId": "Webhooks_Ping", + "produces": [ + "application/json" + ], "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" @@ -4137,17 +4446,14 @@ "200": { "description": "The request was successful; the request was well-formed and received properly.", "schema": { - "$ref": "#/definitions/EventListResult" + "$ref": "#/definitions/EventInfo" } } }, "x-ms-examples": { - "WebhookListEvents": { - "$ref": "./examples/WebhookListEvents.json" + "WebhookPing": { + "$ref": "./examples/WebhookPing.json" } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" } } }, @@ -4158,15 +4464,18 @@ ], "description": "Gets the configuration of service URI and custom headers for the webhook.", "operationId": "Webhooks_GetCallbackConfig", + "produces": [ + "application/json" + ], "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + "$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/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/RegistryNameParameter" @@ -4189,6 +4498,51 @@ } } } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/listEvents": { + "post": { + "tags": [ + "Webhooks" + ], + "description": "Lists recent events for the specified webhook.", + "operationId": "Webhooks_ListEvents", + "produces": [ + "application/json" + ], + "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" + }, + { + "$ref": "#/parameters/RegistryNameParameter" + }, + { + "$ref": "#/parameters/WebhookNameParameter" + } + ], + "responses": { + "200": { + "description": "The request was successful; the request was well-formed and received properly.", + "schema": { + "$ref": "#/definitions/EventListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "WebhookListEvents": { + "$ref": "./examples/WebhookListEvents.json" + } + } + } } }, "definitions": { @@ -4211,22 +4565,41 @@ } } }, - "AzureADAuthenticationAsArmPolicy": { - "description": "The policy for using Azure Resource Manager audience token for a container registry.", + "ActiveDirectoryObject": { + "description": "The Active Directory Object that will be used for authenticating the token of a container registry.", "type": "object", "properties": { - "status": { - "description": "The value that indicates whether the policy is enabled or not.", - "default": "enabled", - "enum": [ - "enabled", - "disabled" - ], - "type": "string", - "x-ms-enum": { - "name": "AzureADAuthenticationAsArmPolicyStatus", - "modelAsString": true - } + "objectId": { + "description": "The user/group/application object ID for Active Directory Object that will be used for authenticating the token of a container registry.", + "type": "string" + }, + "tenantId": { + "description": "The tenant ID of user/group/application object Active Directory Object that will be used for authenticating the token of a container registry.", + "type": "string" + } + } + }, + "Actor": { + "description": "The agent that initiated the event. For most situations, this could be from the authorization context of the request.", + "type": "object", + "properties": { + "name": { + "description": "The subject or username associated with the request context that generated the event.", + "type": "string" + } + } + }, + "Archive": { + "description": "An object that represents a archive for a container registry.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ArchiveProperties" } } }, @@ -4247,19 +4620,24 @@ } } }, - "Archive": { - "description": "An object that represents a archive for a container registry.", + "ArchivePackageSourceProperties": { + "description": "The properties of the archive package source.", "type": "object", - "allOf": [ - { - "$ref": "#/definitions/ProxyResource" - } - ], "properties": { - "properties": { - "$ref": "#/definitions/ArchiveProperties", - "description": "The properties of the archive.", - "x-ms-client-flatten": true + "type": { + "description": "The type of package source for a archive.", + "enum": [ + "remote" + ], + "type": "string", + "x-ms-enum": { + "name": "PackageSourceType", + "modelAsString": true + } + }, + "url": { + "description": "The external repository url.", + "type": "string" } } }, @@ -4268,8 +4646,7 @@ "type": "object", "properties": { "packageSource": { - "$ref": "#/definitions/ArchivePackageSourceProperties", - "description": "The package source of the archive." + "$ref": "#/definitions/ArchivePackageSourceProperties" }, "publishedVersion": { "description": "The published version of the archive.", @@ -4301,34 +4678,16 @@ } } }, - "ArchivePackageSourceProperties": { - "description": "The properties of the archive package source.", - "type": "object", - "properties": { - "type": { - "description": "The type of package source for a archive.", - "enum": [ - "remote" - ], - "type": "string", - "x-ms-enum": { - "name": "PackageSourceType", - "modelAsString": true - } - }, - "url": { - "description": "The external repository url.", - "type": "string" - } - } - }, "ArchiveUpdateParameters": { "description": "The parameters for updating a archive.", "type": "object", "properties": { "properties": { - "$ref": "#/definitions/ArchiveUpdateProperties", - "description": "The properties of the connected registry update parameters.", + "allOf": [ + { + "$ref": "#/definitions/ArchiveUpdateProperties" + } + ], "x-ms-client-flatten": true } } @@ -4343,6 +4702,25 @@ } } }, + "ArchiveVersion": { + "description": "An object that represents an export pipeline for a container registry.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "allOf": [ + { + "$ref": "#/definitions/ArchiveVersionProperties" + } + ], + "x-ms-client-flatten": true + } + } + }, "ArchiveVersionListResult": { "description": "The result of a request to list export pipelines for a container registry.", "type": "object", @@ -4360,22 +4738,6 @@ } } }, - "ArchiveVersion": { - "description": "An object that represents an export pipeline for a container registry.", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/ProxyResource" - } - ], - "properties": { - "properties": { - "$ref": "#/definitions/ArchiveVersionProperties", - "description": "The properties of the archive.", - "x-ms-client-flatten": true - } - } - }, "ArchiveVersionProperties": { "description": "The properties of an export pipeline.", "type": "object", @@ -4418,25 +4780,20 @@ "type": "object", "properties": { "tags": { - "$ref": "#/definitions/TagFilter", - "description": "Specifies a query to filter tags in the upstream repository. Tags are user-defined labels for OCI artifacts or images. This enables selection of content based on tag values." + "$ref": "#/definitions/TagFilter" }, "platforms": { - "$ref": "#/definitions/PlatformFilter", - "description": "Specifies the platform attributes (such as operating system, architecture, and variant) to include or exclude in the filter. This allows selection of OCI artifacts or images that match specific platform requirements, such as linux/amd64 or windows/arm64." + "$ref": "#/definitions/PlatformFilter" }, "imageTypes": { - "$ref": "#/definitions/ImageTypeFilter", - "description": "Specifies the types of OCI images to include or exclude in the filter. OCI images are container images that follow the OCI image specification, typically used for running containers." + "$ref": "#/definitions/ImageTypeFilter" }, "artifactTypes": { - "$ref": "#/definitions/ArtifactTypeFilter", - "description": "Specifies the types of OCI artifacts to include or exclude in the filter. OCI artifacts can be images, Helm charts, SBOMs, signatures, or any content conforming to the OCI artifact specification." + "$ref": "#/definitions/ArtifactTypeFilter" } } }, "ArtifactTypeFilter": { - "description": "Specifies the types of OCI artifacts to include or exclude in the filter. OCI artifacts can be images, Helm charts, SBOMs, signatures, or any content conforming to the OCI artifact specification.", "type": "object", "properties": { "type": { @@ -4460,48 +4817,50 @@ } } }, - "CacheRuleArtifactSyncEstimateResult": { - "description": "The result of a request to check the cache rule artifact sync estimate", + "AuthCredential": { + "description": "Authentication credential stored for an upstream.", "type": "object", "properties": { "name": { - "description": "The name of the repository.", - "type": "string" + "description": "The name of the credential.", + "enum": [ + "Credential1" + ], + "type": "string", + "x-ms-enum": { + "name": "CredentialName", + "modelAsString": true + } }, - "totalCount": { - "format": "int32", - "description": "The total count of results belonging to the repository.", - "type": "integer" + "usernameSecretIdentifier": { + "description": "KeyVault Secret URI for accessing the username.", + "type": "string" }, - "filteredCount": { - "format": "int32", - "description": "The filtered count of results after processing the query.", - "type": "integer" + "passwordSecretIdentifier": { + "description": "KeyVault Secret URI for accessing the password.", + "type": "string" }, - "results": { - "description": "A sample of results processed by the query.", - "type": "array", - "items": { - "$ref": "#/definitions/ArtifactSyncEstimateResult" - }, - "x-ms-identifiers": [] + "credentialHealth": { + "$ref": "#/definitions/CredentialHealth" } } }, - "CacheRulesListResult": { - "description": "The result of a request to list cache rules for a container registry.", + "AzureADAuthenticationAsArmPolicy": { + "description": "The policy for using ARM audience token for a container registry.", "type": "object", "properties": { - "value": { - "description": "The list of cache rules.", - "type": "array", - "items": { - "$ref": "#/definitions/CacheRule" + "status": { + "description": "The value that indicates whether the policy is enabled or not.", + "default": "enabled", + "enum": [ + "enabled", + "disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "AzureADAuthenticationAsArmPolicyStatus", + "modelAsString": true } - }, - "nextLink": { - "description": "If provided, client must use NextLink URI to request next list of cache rules.", - "type": "string" } } }, @@ -4515,59 +4874,53 @@ ], "properties": { "identity": { - "$ref": "#/definitions/IdentityProperties", - "description": "Managed Identity associated with the resource." + "$ref": "#/definitions/IdentityProperties" }, "properties": { - "$ref": "#/definitions/CacheRuleProperties", - "description": "The properties of the cache rule.", + "allOf": [ + { + "$ref": "#/definitions/CacheRuleProperties" + } + ], "x-ms-client-flatten": true } } }, - "CacheRuleProperties": { - "description": "The properties of a cache rule.", + "CacheRuleArtifactSyncEstimateResult": { + "description": "The result of a request to check the cache rule artifact sync estimate", "type": "object", "properties": { - "syncMode": { - "description": "The sync mode of the cache rule that controls its synchronization behavior. PassiveSync indicates the rule behaves as a pull-through cache, preserving upstream pull behavior. ActiveSync indicates the rule actively synchronizes artifacts from the upstream repository according to the configured artifact sync filters.", - "enum": [ - "PassiveSync", - "ActiveSync" - ], - "type": "string", - "x-ms-enum": { - "name": "CacheRuleSyncMode", - "modelAsString": true - } + "name": { + "description": "The name of the repository.", + "type": "string" }, - "artifactSyncFilters": { - "$ref": "#/definitions/ArtifactSyncFilterProperties", - "description": "The filter properties of artifact sync." + "totalCount": { + "format": "int32", + "description": "The total count of results belonging to the repository.", + "type": "integer" }, - "syncReferrers": { - "description": "Indicates whether OCI referrers are synchronized for artifacts matching the cache rule. Valid values are 'Enabled' or 'Disabled'.", - "enum": [ - "Enabled", - "Disabled" - ], - "type": "string", - "x-ms-enum": { - "name": "ReferrersSyncStatus", - "modelAsString": true - } + "filteredCount": { + "format": "int32", + "description": "The filtered count of results after processing the query.", + "type": "integer" }, + "results": { + "description": "A sample of results processed by the query.", + "type": "array", + "items": { + "$ref": "#/definitions/ArtifactSyncEstimateResult" + }, + "x-ms-identifiers": [ ] + } + } + }, + "CacheRuleProperties": { + "description": "The properties of a cache rule.", + "type": "object", + "properties": { "credentialSetResourceId": { "description": "The ARM resource ID of the credential store which is associated with the cache rule.", - "type": "string", - "format": "arm-id", - "x-ms-arm-id-details": { - "allowedResources": [ - { - "type": "Microsoft.ContainerRegistry/registries/credentialSets" - } - ] - } + "type": "string" }, "sourceRepository": { "description": "Source repository pulled from upstream.", @@ -4599,6 +4952,64 @@ "name": "ProvisioningState", "modelAsString": true } + }, + "syncMode": { + "description": "The sync mode.", + "enum": [ + "passiveSync", + "activeSync" + ], + "type": "string", + "x-ms-enum": { + "name": "SyncMode", + "modelAsString": true + } + }, + "syncReferrers": { + "description": "The status of syncing referrers. Valid values are 'Enabled' or 'Disabled'.", + "enum": [ + "disabled", + "enabled" + ], + "type": "string", + "x-ms-enum": { + "name": "ReferrersSyncStatus", + "modelAsString": true + } + }, + "artifactSyncFilters": { + "$ref": "#/definitions/ArtifactSyncFilterProperties" + } + } + }, + "CacheRulesListResult": { + "description": "The result of a request to list cache rules for a container registry.", + "type": "object", + "properties": { + "value": { + "description": "The list of cache rules.", + "type": "array", + "items": { + "$ref": "#/definitions/CacheRule" + } + }, + "nextLink": { + "description": "If provided, client must use NextLink URI to request next list of cache rules.", + "type": "string" + } + } + }, + "CacheRuleSyncParameters": { + "description": "The parameters for syncing a cache rule.\r\nFor example, this is used to sync a specific tag from an upstream repository during artifact sync.", + "type": "object", + "properties": { + "tagName": { + "description": "The name of the tag that needs to be sync'd.", + "type": "string" + }, + "syncTagIfDeleted": { + "description": "Flag to indicate whether the tag should be sync'd if it has already been deleted.", + "type": "boolean" } } }, @@ -4607,12 +5018,14 @@ "type": "object", "properties": { "identity": { - "$ref": "#/definitions/IdentityProperties", - "description": "Managed Identity associated with the resource." + "$ref": "#/definitions/IdentityProperties" }, "properties": { - "$ref": "#/definitions/CacheRuleUpdateProperties", - "description": "The properties of the cache rule update parameters.", + "allOf": [ + { + "$ref": "#/definitions/CacheRuleUpdateProperties" + } + ], "x-ms-client-flatten": true } } @@ -4621,27 +5034,27 @@ "description": "The parameters for updating cache rule properties.", "type": "object", "properties": { + "credentialSetResourceId": { + "description": "The ARM resource ID of the credential store which is associated with the Cache rule.", + "type": "string" + }, "syncMode": { - "description": "The sync mode of the cache rule that controls its synchronization behavior. PassiveSync indicates the rule behaves as a pull-through cache, preserving upstream pull behavior. ActiveSync indicates the rule actively synchronizes artifacts from the upstream repository according to the configured artifact sync filters.", + "description": "The sync mode.", "enum": [ - "PassiveSync", - "ActiveSync" + "passiveSync", + "activeSync" ], "type": "string", "x-ms-enum": { - "name": "CacheRuleSyncMode", + "name": "SyncMode", "modelAsString": true } }, - "artifactSyncFilters": { - "$ref": "#/definitions/ArtifactSyncFilterProperties", - "description": "The filter properties of artifact sync." - }, "syncReferrers": { - "description": "The status of syncing referrers.", + "description": "The status of syncing referrers. Valid values are 'Enabled' or 'Disabled'.", "enum": [ - "Enabled", - "Disabled" + "disabled", + "enabled" ], "type": "string", "x-ms-enum": { @@ -4649,15 +5062,27 @@ "modelAsString": true } }, - "credentialSetResourceId": { - "description": "The ARM resource ID of the credential store which is associated with the cache rule.", - "type": "string", - "x-ms-arm-id-details": { - "allowedResources": [ - { - "type": "Microsoft.ContainerRegistry/registries/credentialSets" - } - ] + "artifactSyncFilters": { + "$ref": "#/definitions/ArtifactSyncFilterProperties" + } + } + }, + "CallbackConfig": { + "description": "The configuration of service URI and custom headers for the webhook.", + "required": [ + "serviceUri" + ], + "type": "object", + "properties": { + "serviceUri": { + "description": "The service URI for the webhook to post notifications.", + "type": "string" + }, + "customHeaders": { + "description": "Custom headers that will be added to the webhook notifications.", + "type": "object", + "additionalProperties": { + "type": "string" } } } @@ -4672,8 +5097,11 @@ ], "properties": { "properties": { - "$ref": "#/definitions/ConnectedRegistryProperties", - "description": "The properties of the connected registry.", + "allOf": [ + { + "$ref": "#/definitions/ConnectedRegistryProperties" + } + ], "x-ms-client-flatten": true } } @@ -4761,13 +5189,10 @@ "readOnly": true }, "activation": { - "$ref": "#/definitions/ActivationProperties", - "description": "The activation properties of the connected registry.", - "readOnly": true + "$ref": "#/definitions/ActivationProperties" }, "parent": { - "$ref": "#/definitions/ParentProperties", - "description": "The parent of the connected registry." + "$ref": "#/definitions/ParentProperties" }, "clientTokenIds": { "description": "The list of the ACR token resource IDs used to authenticate clients to the connected registry.", @@ -4777,12 +5202,10 @@ } }, "loginServer": { - "$ref": "#/definitions/LoginServerProperties", - "description": "The login server properties of the connected registry." + "$ref": "#/definitions/LoginServerProperties" }, "logging": { - "$ref": "#/definitions/LoggingProperties", - "description": "The logging properties of the connected registry." + "$ref": "#/definitions/LoggingProperties" }, "statusDetails": { "description": "The list of current statuses of the connected registry.", @@ -4812,8 +5235,11 @@ "type": "object", "properties": { "properties": { - "$ref": "#/definitions/ConnectedRegistryUpdateProperties", - "description": "The properties of the connected registry update parameters.", + "allOf": [ + { + "$ref": "#/definitions/ConnectedRegistryUpdateProperties" + } + ], "x-ms-client-flatten": true } } @@ -4823,12 +5249,10 @@ "type": "object", "properties": { "syncProperties": { - "$ref": "#/definitions/SyncUpdateProperties", - "description": "The sync properties of the connected registry with its parent." + "$ref": "#/definitions/SyncUpdateProperties" }, "logging": { - "$ref": "#/definitions/LoggingProperties", - "description": "The logging properties of the connected registry." + "$ref": "#/definitions/LoggingProperties" }, "clientTokenIds": { "description": "The list of the ACR token resource IDs used to authenticate clients to the connected registry.", @@ -4849,86 +5273,51 @@ } } }, - "GarbageCollectionProperties": { - "description": "The garbage collection properties of the connected registry.", - "type": "object", - "properties": { - "enabled": { - "description": "Indicates whether garbage collection is enabled for the connected registry.", - "type": "boolean" - }, - "schedule": { - "description": "The cron expression indicating the schedule that the connected registry will run garbage collection.", - "type": "string" - } - } - }, - "LoggingProperties": { - "description": "The logging properties of the connected registry.", + "CredentialHealth": { + "description": "The health of the auth credential.", "type": "object", "properties": { - "logLevel": { - "description": "The verbosity of logs persisted on the connected registry.", - "default": "Information", + "status": { + "description": "The health status of credential.", "enum": [ - "Debug", - "Information", - "Warning", - "Error", - "None" + "Healthy", + "Unhealthy" ], "type": "string", "x-ms-enum": { - "name": "LogLevel", + "name": "CredentialHealthStatus", "modelAsString": true } }, - "auditLogStatus": { - "description": "Indicates whether audit logs are enabled on the connected registry.", - "default": "Disabled", - "enum": [ - "Enabled", - "Disabled" - ], - "type": "string", - "x-ms-enum": { - "name": "AuditLogStatus", - "modelAsString": true - } + "errorCode": { + "description": "Error code representing the health check error.", + "type": "string" + }, + "errorMessage": { + "description": "Descriptive message representing the health check error.", + "type": "string" } } }, - "LoginServerProperties": { - "description": "The login server properties of the connected registry.", + "CredentialSet": { + "description": "An object that represents a credential set resource for a container registry.", "type": "object", - "properties": { - "host": { - "description": "The host of the connected registry. Can be FQDN or IP.", - "type": "string", - "readOnly": true - }, - "tls": { - "$ref": "#/definitions/TlsProperties", - "description": "The TLS properties of the connected registry login server.", - "readOnly": true + "allOf": [ + { + "$ref": "#/definitions/ProxyResource" } - } - }, - "ParentProperties": { - "description": "The properties of the connected registry parent.", - "required": [ - "syncProperties" ], - "type": "object", "properties": { - "id": { - "description": "The resource ID of the parent to which the connected registry will be associated.", - "type": "string", - "format": "arm-id" + "identity": { + "$ref": "#/definitions/IdentityProperties" }, - "syncProperties": { - "$ref": "#/definitions/SyncProperties", - "description": "The sync properties of the connected registry with its parent." + "properties": { + "allOf": [ + { + "$ref": "#/definitions/CredentialSetProperties" + } + ], + "x-ms-client-flatten": true } } }, @@ -4949,88 +5338,6 @@ } } }, - "CredentialSet": { - "description": "An object that represents a credential set resource for a container registry.", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/ProxyResource" - } - ], - "properties": { - "identity": { - "$ref": "#/definitions/IdentityProperties", - "description": "Identities associated with the resource. This is used to access the KeyVault secrets." - }, - "properties": { - "$ref": "#/definitions/CredentialSetProperties", - "description": "The properties of the credential set.", - "x-ms-client-flatten": true - } - } - }, - "IdentityProperties": { - "description": "Managed identity for the resource.", - "type": "object", - "properties": { - "principalId": { - "description": "The principal ID of resource identity.", - "type": "string", - "readOnly": true - }, - "tenantId": { - "description": "The tenant ID of resource.", - "type": "string", - "readOnly": true - }, - "type": { - "description": "The identity type.", - "enum": [ - "SystemAssigned", - "UserAssigned", - "SystemAssigned, UserAssigned", - "None" - ], - "type": "string", - "x-ms-enum": { - "name": "ResourceIdentityType", - "modelAsString": false - } - }, - "userAssignedIdentities": { - "description": "The list of user identities associated with the resource. The user identity \r\ndictionary key references will be ARM resource ids in the form: \r\n'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/\r\n providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/UserIdentityProperties" - } - } - } - }, - "ImageTypeFilter": { - "description": "Specifies the types of OCI images to include or exclude in the filter. OCI images are container images that follow the OCI image specification, typically used for running containers.", - "type": "object", - "properties": { - "type": { - "description": "The type of values. Allowed values are either 'include' or 'exclude'.", - "enum": [ - "include", - "exclude" - ], - "type": "string", - "x-ms-enum": { - "name": "ImageTypeFilterType", - "modelAsString": true - } - }, - "values": { - "description": "The list of image types to include or exclude from the filter.", - "type": "array", - "items": { - "type": "string" - } - } - } - }, "CredentialSetProperties": { "description": "The properties of a credential set resource.", "type": "object", @@ -5074,287 +5381,217 @@ } } }, - "UserIdentityProperties": { + "CredentialSetUpdateParameters": { + "description": "The parameters for updating a credential set", "type": "object", "properties": { - "principalId": { - "description": "The principal id of user assigned identity.", - "type": "string", - "readOnly": true + "properties": { + "allOf": [ + { + "$ref": "#/definitions/CredentialSetUpdateProperties" + } + ], + "x-ms-client-flatten": true }, - "clientId": { - "description": "The client id of user assigned identity.", - "type": "string", - "readOnly": true + "identity": { + "$ref": "#/definitions/IdentityProperties" } } }, - "Resource": { - "description": "An Azure resource.", - "required": [ - "location" - ], + "CredentialSetUpdateProperties": { + "description": "The parameters for updating credential set properties.", + "type": "object", "properties": { - "id": { - "description": "The resource ID.", - "type": "string", - "readOnly": true - }, - "name": { - "description": "The name of the resource.", - "type": "string", - "readOnly": true - }, - "type": { - "description": "The type of the resource.", - "type": "string", - "readOnly": true - }, - "location": { - "description": "The location of the resource. This cannot be changed after the resource is created.", - "type": "string", - "x-ms-mutability": [ - "read", - "create" + "authCredentials": { + "description": "List of authentication credentials stored for an upstream.\r\nUsually consists of a primary and an optional secondary credential.", + "type": "array", + "items": { + "$ref": "#/definitions/AuthCredential" + }, + "x-ms-identifiers": [ + "name" ] - }, - "tags": { - "description": "The tags of the resource.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "systemData": { - "$ref": "#/definitions/SystemData", - "description": "Metadata pertaining to creation and last modification of the resource.", - "type": "object", - "readOnly": true } - }, - "x-ms-azure-resource": true + } }, - "AuthCredential": { - "description": "Authentication credential stored for an upstream.", + "DebianArchivePackageSourceProperties": { + "description": "The properties of the archive package source.", "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ArchivePackageSourceProperties" + } + ], "properties": { - "name": { - "description": "The name of the credential.", - "enum": [ - "Credential1" - ], - "type": "string", - "x-ms-enum": { - "name": "CredentialName", - "modelAsString": true - } - }, - "type": { - "description": "The type of the credential.", - "enum": [ - "KeyVaultSecrets" - ], - "type": "string", - "x-ms-enum": { - "name": "CredentialType", - "modelAsString": true - } - }, - "usernameSecretIdentifier": { - "description": "KeyVault Secret URI for accessing the username.", - "type": "string" - }, - "passwordSecretIdentifier": { - "description": "KeyVault Secret URI for accessing the password.", + "distributionName": { + "description": "Upstream Debian distribution Name.", "type": "string" - }, - "credentialHealth": { - "$ref": "#/definitions/CredentialHealth", - "description": "This provides data pertaining to the health of the auth credential.", - "readOnly": true } } }, - "ProxyResource": { - "description": "The resource model definition for a ARM proxy resource. It will have everything other than required location and tags.", + "DebianArchiveProperties": { + "description": "The properties of the Debian package Archive.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ArchiveProperties" + } + ], "properties": { - "id": { - "description": "The resource ID.", - "type": "string", - "readOnly": true - }, - "name": { - "description": "The name of the resource.", - "type": "string", - "readOnly": true - }, - "type": { - "description": "The type of the resource.", - "type": "string", - "readOnly": true - }, - "systemData": { - "$ref": "#/definitions/SystemData", - "description": "Metadata pertaining to creation and last modification of the resource.", - "type": "object", - "readOnly": true + "distributionName": { + "description": "Debian distribution Name.", + "type": "string" } - }, - "x-ms-azure-resource": true + } }, - "CredentialHealth": { - "description": "The health of the auth credential.", + "EncryptionProperty": { "type": "object", "properties": { "status": { - "description": "The health status of credential.", + "description": "Indicates whether or not the encryption is enabled for container registry.", "enum": [ - "Healthy", - "Unhealthy" + "enabled", + "disabled" ], "type": "string", "x-ms-enum": { - "name": "CredentialHealthStatus", + "name": "EncryptionStatus", "modelAsString": true } }, - "errorCode": { - "description": "Error code representing the health check error.", - "type": "string" + "keyVaultProperties": { + "$ref": "#/definitions/KeyVaultProperties" + } + } + }, + "Event": { + "description": "The event for a webhook.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/EventInfo" + } + ], + "properties": { + "eventRequestMessage": { + "$ref": "#/definitions/EventRequestMessage" }, - "errorMessage": { - "description": "Descriptive message representing the health check error.", - "type": "string" + "eventResponseMessage": { + "$ref": "#/definitions/EventResponseMessage" } } }, - "SystemData": { - "description": "Metadata pertaining to creation and last modification of the resource.", + "EventContent": { + "description": "The content of the event request message.", "type": "object", "properties": { - "createdBy": { - "description": "The identity that created the resource.", + "id": { + "description": "The event ID.", "type": "string" }, - "createdByType": { - "description": "The type of identity that created the resource.", - "enum": [ - "User", - "Application", - "ManagedIdentity", - "Key" - ], - "type": "string", - "x-ms-enum": { - "name": "createdByType", - "modelAsString": true - } - }, - "createdAt": { + "timestamp": { "format": "date-time", - "description": "The timestamp of resource creation (UTC).", + "description": "The time at which the event occurred.", "type": "string" }, - "lastModifiedBy": { - "description": "The identity that last modified the resource.", + "action": { + "description": "The action that encompasses the provided event.", "type": "string" }, - "lastModifiedByType": { - "description": "The type of identity that last modified the resource.", - "enum": [ - "User", - "Application", - "ManagedIdentity", - "Key" - ], - "type": "string", - "x-ms-enum": { - "name": "lastModifiedByType", - "modelAsString": true - } + "target": { + "$ref": "#/definitions/Target" }, - "lastModifiedAt": { - "format": "date-time", - "description": "The timestamp of resource modification (UTC).", - "type": "string" - } - }, - "readOnly": true - }, - "DebianArchiveProperties": { - "description": "The properties of the Debian package Archive.", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/ArchiveProperties" - } - ], - "properties": { - "distributionName": { - "description": "Debian distribution Name.", - "type": "string" + "request": { + "$ref": "#/definitions/Request" + }, + "actor": { + "$ref": "#/definitions/Actor" + }, + "source": { + "$ref": "#/definitions/Source" } } }, - "DebianArchivePackageSourceProperties": { - "description": "The properties of the archive package source.", + "EventInfo": { + "description": "The basic information of an event.", "type": "object", - "allOf": [ - { - "$ref": "#/definitions/ArchivePackageSourceProperties" - } - ], "properties": { - "distributionName": { - "description": "Upstream Debian distribution Name.", + "id": { + "description": "The event ID.", "type": "string" } } }, - "CredentialSetUpdateParameters": { - "description": "The parameters for updating a credential set", + "EventListResult": { + "description": "The result of a request to list events for a webhook.", "type": "object", "properties": { - "properties": { - "$ref": "#/definitions/CredentialSetUpdateProperties", - "description": "The properties of the credential set update parameters", - "x-ms-client-flatten": true + "value": { + "description": "The list of events. Since this list may be incomplete, the nextLink field should be used to request the next list of events.", + "type": "array", + "items": { + "$ref": "#/definitions/Event" + } }, - "identity": { - "$ref": "#/definitions/IdentityProperties", - "description": "Identities associated with the resource. This is used to access the KeyVault secrets." + "nextLink": { + "description": "The URI that can be used to request the next list of events.", + "type": "string" } } }, - "CredentialSetUpdateProperties": { - "description": "The parameters for updating credential set properties.", + "EventRequestMessage": { + "description": "The event request message sent to the service URI.", "type": "object", "properties": { - "authCredentials": { - "description": "List of authentication credentials stored for an upstream.\r\nUsually consists of a primary and an optional secondary credential.", - "type": "array", - "items": { - "$ref": "#/definitions/AuthCredential" - }, - "x-ms-identifiers": [ - "name" - ] + "content": { + "$ref": "#/definitions/EventContent" + }, + "headers": { + "description": "The headers of the event request message.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "method": { + "description": "The HTTP method used to send the event request message.", + "type": "string" + }, + "requestUri": { + "description": "The URI used to send the event request message.", + "type": "string" + }, + "version": { + "description": "The HTTP message version.", + "type": "string" } } }, - "ExportPipelineListResult": { - "description": "The result of a request to list export pipelines for a container registry.", + "EventResponseMessage": { + "description": "The event response message received from the service URI.", "type": "object", "properties": { - "value": { - "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.", - "type": "array", - "items": { - "$ref": "#/definitions/ExportPipeline" + "content": { + "description": "The content of the event response message.", + "type": "string" + }, + "headers": { + "description": "The headers of the event response message.", + "type": "object", + "additionalProperties": { + "type": "string" } }, - "nextLink": { - "description": "The URI that can be used to request the next list of pipeline runs.", + "reasonPhrase": { + "description": "The reason phrase of the event response message.", + "type": "string" + }, + "statusCode": { + "description": "The status code of the event response message.", + "type": "string" + }, + "version": { + "description": "The HTTP message version.", "type": "string" } } @@ -5373,16 +5610,35 @@ "type": "string" }, "identity": { - "$ref": "#/definitions/IdentityProperties", - "description": "The identity of the export pipeline." + "$ref": "#/definitions/IdentityProperties" }, "properties": { - "$ref": "#/definitions/ExportPipelineProperties", - "description": "The properties of the export pipeline.", + "allOf": [ + { + "$ref": "#/definitions/ExportPipelineProperties" + } + ], "x-ms-client-flatten": true } } }, + "ExportPipelineListResult": { + "description": "The result of a request to list export pipelines for a container registry.", + "type": "object", + "properties": { + "value": { + "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.", + "type": "array", + "items": { + "$ref": "#/definitions/ExportPipeline" + } + }, + "nextLink": { + "description": "The URI that can be used to request the next list of pipeline runs.", + "type": "string" + } + } + }, "ExportPipelineProperties": { "description": "The properties of an export pipeline.", "required": [ @@ -5391,8 +5647,7 @@ "type": "object", "properties": { "target": { - "$ref": "#/definitions/ExportPipelineTargetProperties", - "description": "The target properties of the export pipeline." + "$ref": "#/definitions/ExportPipelineTargetProperties" }, "options": { "description": "The list of all options configured for the pipeline.", @@ -5451,119 +5706,178 @@ } } }, - "ImportImageParameters": { - "required": [ - "source" - ], + "ExportPolicy": { + "description": "The export policy for a container registry.", "type": "object", "properties": { - "source": { - "$ref": "#/definitions/ImportSource", - "description": "The source of the image." - }, - "targetTags": { - "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).", - "type": "array", - "items": { - "type": "string" - } - }, - "untaggedTargetRepositories": { - "description": "List of strings of repository names to do a manifest only copy. No tag will be created.", - "type": "array", - "items": { - "type": "string" - } - }, - "mode": { - "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", + "status": { + "description": "The value that indicates whether the policy is enabled or not.", + "default": "enabled", "enum": [ - "NoForce", - "Force" + "enabled", + "disabled" ], "type": "string", "x-ms-enum": { - "name": "ImportMode", + "name": "ExportPolicyStatus", "modelAsString": true } } } }, - "ImportSource": { - "required": [ - "sourceImage" - ], + "GarbageCollectionProperties": { + "description": "The garbage collection properties of the connected registry.", "type": "object", "properties": { - "resourceId": { - "description": "The resource identifier of the source Azure Container Registry.", - "type": "string", - "format": "arm-id", - "x-ms-arm-id-details": { - "allowedResources": [ - { - "type": "Microsoft.ContainerRegistry/registries" - } - ] - } - }, - "registryUri": { - "description": "The address of the source registry (e.g. 'mcr.microsoft.com').", - "type": "string" - }, - "cacheRuleResourceId": { - "description": "The resource identifier of the source cache rule.", - "type": "string", - "format": "arm-id", - "x-ms-arm-id-details": { - "allowedResources": [ - { - "type": "Microsoft.ContainerRegistry/registries/cacheRules" - } - ] - } - }, - "credentials": { - "$ref": "#/definitions/ImportSourceCredentials", - "description": "Credentials used when importing from a registry uri." + "enabled": { + "description": "Indicates whether garbage collection is enabled for the connected registry.", + "type": "boolean" }, - "sourceImage": { - "description": "Repository name of the source image.\r\nSpecify an image by repository ('hello-world'). This will use the 'latest' tag.\r\nSpecify an image by tag ('hello-world:latest').\r\nSpecify an image by sha256-based manifest digest ('hello-world@sha256:abc123').", + "schedule": { + "description": "The cron expression indicating the schedule that the connected registry will run garbage collection.", "type": "string" } } }, - "ImportSourceCredentials": { - "required": [ - "password" - ], + "GenerateCredentialsParameters": { + "description": "The parameters used to generate credentials for a specified token or user of a container registry.", "type": "object", "properties": { - "username": { - "description": "The username to authenticate with the source registry.", + "tokenId": { + "description": "The resource ID of the token for which credentials have to be generated.", "type": "string" }, - "password": { - "description": "The password used to authenticate with the source registry.", + "expiry": { + "format": "date-time", + "description": "The expiry date of the generated credentials after which the credentials become invalid.", "type": "string" - } - } - }, - "ImportPipelineListResult": { - "description": "The result of a request to list import pipelines for a container registry.", - "type": "object", - "properties": { - "value": { - "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.", + }, + "name": { + "description": "Specifies name of the password which should be regenerated if any -- password1 or password2.", + "enum": [ + "password1", + "password2" + ], + "type": "string", + "x-ms-enum": { + "name": "TokenPasswordName", + "modelAsString": true + } + } + } + }, + "GenerateCredentialsResult": { + "description": "The response from the GenerateCredentials operation.", + "type": "object", + "properties": { + "username": { + "description": "The username for a container registry.", + "type": "string" + }, + "passwords": { + "description": "The list of passwords for a container registry.", "type": "array", "items": { - "$ref": "#/definitions/ImportPipeline" + "$ref": "#/definitions/TokenPassword" + }, + "x-ms-identifiers": [ ] + } + } + }, + "IdentityProperties": { + "description": "Managed identity for the resource.", + "type": "object", + "properties": { + "principalId": { + "description": "The principal ID of resource identity.", + "type": "string", + "readOnly": true + }, + "tenantId": { + "description": "The tenant ID of resource.", + "type": "string", + "readOnly": true + }, + "type": { + "description": "The identity type.", + "enum": [ + "SystemAssigned", + "UserAssigned", + "SystemAssigned, UserAssigned", + "None" + ], + "type": "string", + "x-ms-enum": { + "name": "ResourceIdentityType", + "modelAsString": false } }, - "nextLink": { - "description": "The URI that can be used to request the next list of pipeline runs.", - "type": "string" + "userAssignedIdentities": { + "description": "The list of user identities associated with the resource. The user identity\r\ndictionary key references will be ARM resource ids in the form:\r\n'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/\r\n providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/UserIdentityProperties" + } + } + } + }, + "ImageTypeFilter": { + "type": "object", + "properties": { + "type": { + "enum": [ + "include", + "exclude" + ], + "type": "string", + "x-ms-enum": { + "name": "ImageTypeFilterType", + "modelAsString": true + } + }, + "values": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "ImportImageParameters": { + "required": [ + "source" + ], + "type": "object", + "properties": { + "source": { + "$ref": "#/definitions/ImportSource" + }, + "targetTags": { + "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).", + "type": "array", + "items": { + "type": "string" + } + }, + "untaggedTargetRepositories": { + "description": "List of strings of repository names to do a manifest only copy. No tag will be created.", + "type": "array", + "items": { + "type": "string" + } + }, + "mode": { + "description": "When Force, any existing target tags will be overwritten. When NoForce, any existing target tags will fail\r\nthe operation before any copying begins.", + "default": "NoForce", + "enum": [ + "NoForce", + "Force" + ], + "type": "string", + "x-ms-enum": { + "name": "ImportMode", + "modelAsString": true + } } } }, @@ -5581,16 +5895,35 @@ "type": "string" }, "identity": { - "$ref": "#/definitions/IdentityProperties", - "description": "The identity of the import pipeline." + "$ref": "#/definitions/IdentityProperties" }, "properties": { - "$ref": "#/definitions/ImportPipelineProperties", - "description": "The properties of the import pipeline.", + "allOf": [ + { + "$ref": "#/definitions/ImportPipelineProperties" + } + ], "x-ms-client-flatten": true } } }, + "ImportPipelineListResult": { + "description": "The result of a request to list import pipelines for a container registry.", + "type": "object", + "properties": { + "value": { + "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.", + "type": "array", + "items": { + "$ref": "#/definitions/ImportPipeline" + } + }, + "nextLink": { + "description": "The URI that can be used to request the next list of pipeline runs.", + "type": "string" + } + } + }, "ImportPipelineProperties": { "description": "The properties of an import pipeline.", "required": [ @@ -5599,12 +5932,10 @@ "type": "object", "properties": { "source": { - "$ref": "#/definitions/ImportPipelineSourceProperties", - "description": "The source properties of the import pipeline." + "$ref": "#/definitions/ImportPipelineSourceProperties" }, "trigger": { - "$ref": "#/definitions/PipelineTriggerProperties", - "description": "The properties that describe the trigger of the import pipeline." + "$ref": "#/definitions/PipelineTriggerProperties" }, "options": { "description": "The list of all options configured for the pipeline.", @@ -5671,167 +6002,250 @@ } } }, - "PipelineTriggerProperties": { + "ImportSource": { + "required": [ + "sourceImage" + ], "type": "object", "properties": { - "sourceTrigger": { - "$ref": "#/definitions/PipelineSourceTriggerProperties", - "description": "The source trigger properties of the pipeline." + "resourceId": { + "description": "The resource identifier of the source Azure Container Registry.", + "type": "string" + }, + "cacheRuleResourceId": { + "description": "The resource identifier of the source Cache Rule.", + "type": "string" + }, + "registryUri": { + "description": "The address of the source registry (e.g. 'mcr.microsoft.com').", + "type": "string" + }, + "credentials": { + "$ref": "#/definitions/ImportSourceCredentials" + }, + "sourceImage": { + "description": "Repository name of the source image.\r\nSpecify an image by repository ('hello-world'). This will use the 'latest' tag.\r\nSpecify an image by tag ('hello-world:latest').\r\nSpecify an image by sha256-based manifest digest ('hello-world@sha256:abc123').", + "type": "string" } } }, - "PipelineSourceTriggerProperties": { + "ImportSourceCredentials": { "required": [ - "status" + "password" ], "type": "object", "properties": { - "status": { - "description": "The current status of the source trigger.", - "default": "Enabled", + "username": { + "description": "The username to authenticate with the source registry.", + "type": "string" + }, + "password": { + "description": "The password used to authenticate with the source registry.", + "type": "string" + } + } + }, + "IPRule": { + "description": "IP rule with specific IP or IP range in CIDR format.", + "required": [ + "value" + ], + "type": "object", + "properties": { + "action": { + "description": "The action of IP ACL rule.", + "default": "Allow", "enum": [ - "Enabled", - "Disabled" + "Allow" ], "type": "string", "x-ms-enum": { - "name": "TriggerStatus", + "name": "Action", "modelAsString": true } - } - } - }, - "OperationListResult": { - "description": "The result of a request to list container registry operations.", - "type": "object", - "properties": { - "value": { - "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.", - "type": "array", - "items": { - "$ref": "#/definitions/OperationDefinition" - }, - "x-ms-identifiers": [ - "name" - ] }, - "nextLink": { - "description": "The URI that can be used to request the next list of container registry operations.", - "type": "string" + "value": { + "description": "Specifies the IP or IP range in CIDR format. Only IPV4 address is allowed.", + "type": "string", + "x-ms-client-name": "IPAddressOrRange" } } }, - "OperationDefinition": { - "description": "The definition of a container registry operation.", + "KeyVaultProperties": { "type": "object", "properties": { - "origin": { - "description": "The origin information of the container registry operation.", + "keyIdentifier": { + "description": "Key vault uri to access the encryption key.", "type": "string" }, - "name": { - "description": "Operation name: {provider}/{resource}/{operation}.", - "type": "string" + "versionedKeyIdentifier": { + "description": "The fully qualified key identifier that includes the version of the key that is actually used for encryption.", + "type": "string", + "readOnly": true }, - "display": { - "$ref": "#/definitions/OperationDisplayDefinition", - "description": "The display information for the container registry operation." + "identity": { + "description": "The client id of the identity which will be used to access key vault.", + "type": "string" }, - "properties": { - "$ref": "#/definitions/OperationPropertiesDefinition", - "description": "The properties information for the container registry operation.", - "x-ms-client-flatten": true + "keyRotationEnabled": { + "description": "Auto key rotation status for a CMK enabled registry.", + "type": "boolean", + "readOnly": true }, - "isDataAction": { - "description": "This property indicates if the operation is an action or a data action\r\nref: https://docs.microsoft.com/en-us/azure/role-based-access-control/role-definitions#management-and-data-operations", - "type": "boolean" + "lastKeyRotationTimestamp": { + "format": "date-time", + "description": "Timestamp of the last successful key rotation.", + "type": "string", + "readOnly": true } } }, - "OperationDisplayDefinition": { - "description": "The display information for a container registry operation.", + "LoggingProperties": { + "description": "The logging properties of the connected registry.", "type": "object", "properties": { - "provider": { - "description": "The resource provider name: Microsoft.ContainerRegistry.", - "type": "string" - }, - "resource": { - "description": "The resource on which the operation is performed.", - "type": "string" - }, - "operation": { - "description": "The operation that users can perform.", - "type": "string" + "logLevel": { + "description": "The verbosity of logs persisted on the connected registry.", + "default": "Information", + "enum": [ + "Debug", + "Information", + "Warning", + "Error", + "None" + ], + "type": "string", + "x-ms-enum": { + "name": "LogLevel", + "modelAsString": true + } }, - "description": { - "description": "The description for the operation.", - "type": "string" + "auditLogStatus": { + "description": "Indicates whether audit logs are enabled on the connected registry.", + "default": "Disabled", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "AuditLogStatus", + "modelAsString": true + } } } }, - "OperationPropertiesDefinition": { - "description": "The definition of Azure Monitoring properties.", + "LoginServerProperties": { + "description": "The login server properties of the connected registry.", "type": "object", "properties": { - "serviceSpecification": { - "$ref": "#/definitions/OperationServiceSpecificationDefinition", - "description": "The definition of Azure Monitoring service." + "host": { + "description": "The host of the connected registry. Can be FQDN or IP.", + "type": "string", + "readOnly": true + }, + "tls": { + "$ref": "#/definitions/TlsProperties" } } }, - "OperationServiceSpecificationDefinition": { - "description": "The definition of Azure Monitoring list.", + "NetworkRuleSet": { + "description": "The network rule set for a container registry.", + "required": [ + "defaultAction" + ], "type": "object", "properties": { - "metricSpecifications": { - "description": "A list of Azure Monitoring metrics definition.", - "type": "array", - "items": { - "$ref": "#/definitions/OperationMetricSpecificationDefinition" - }, - "x-ms-identifiers": [ - "name" - ] + "defaultAction": { + "description": "The default action of allow or deny when no other rules match.", + "default": "Allow", + "enum": [ + "Allow", + "Deny" + ], + "type": "string", + "x-ms-enum": { + "name": "DefaultAction", + "modelAsString": true + } }, - "logSpecifications": { - "description": "A list of Azure Monitoring log definitions.", + "ipRules": { + "description": "The IP ACL rules.", "type": "array", "items": { - "$ref": "#/definitions/OperationLogSpecificationDefinition" + "$ref": "#/definitions/IPRule" }, - "x-ms-identifiers": [ - "name" - ] + "x-ms-identifiers": [ ] } } }, - "OperationMetricSpecificationDefinition": { - "description": "The definition of Azure Monitoring metric.", + "OperationDefinition": { + "description": "The definition of a container registry operation.", "type": "object", "properties": { + "origin": { + "description": "The origin information of the container registry operation.", + "type": "string" + }, "name": { - "description": "Metric name.", + "description": "Operation name: {provider}/{resource}/{operation}.", "type": "string" }, - "displayName": { - "description": "Metric display name.", + "display": { + "$ref": "#/definitions/OperationDisplayDefinition" + }, + "properties": { + "allOf": [ + { + "$ref": "#/definitions/OperationPropertiesDefinition" + } + ], + "x-ms-client-flatten": true + }, + "isDataAction": { + "description": "This property indicates if the operation is an action or a data action\r\nref: https://docs.microsoft.com/en-us/azure/role-based-access-control/role-definitions#management-and-data-operations", + "type": "boolean" + } + } + }, + "OperationDisplayDefinition": { + "description": "The display information for a container registry operation.", + "type": "object", + "properties": { + "provider": { + "description": "The resource provider name: Microsoft.ContainerRegistry.", "type": "string" }, - "displayDescription": { - "description": "Metric description.", + "resource": { + "description": "The resource on which the operation is performed.", "type": "string" }, - "unit": { - "description": "Metric unit.", + "operation": { + "description": "The operation that users can perform.", "type": "string" }, - "aggregationType": { - "description": "Metric aggregation type.", + "description": { + "description": "The description for the operation.", "type": "string" + } + } + }, + "OperationListResult": { + "description": "The result of a request to list container registry operations.", + "type": "object", + "properties": { + "value": { + "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.", + "type": "array", + "items": { + "$ref": "#/definitions/OperationDefinition" + }, + "x-ms-identifiers": [ + "name" + ] }, - "internalMetricName": { - "description": "Internal metric name.", + "nextLink": { + "description": "The URI that can be used to request the next list of container registry operations.", "type": "string" } } @@ -5854,119 +6268,131 @@ } } }, - "RegistryNameCheckRequest": { - "description": "A request to check whether a container registry name is available.", - "required": [ - "name", - "type" - ], + "OperationMetricSpecificationDefinition": { + "description": "The definition of Azure Monitoring metric.", "type": "object", "properties": { "name": { - "description": "The name of the container registry.", - "maxLength": 50, - "minLength": 5, - "pattern": "^[a-zA-Z0-9]*$", + "description": "Metric name.", "type": "string" }, - "type": { - "description": "The resource type of the container registry. This field must be set to 'Microsoft.ContainerRegistry/registries'.", - "enum": [ - "Microsoft.ContainerRegistry/registries" - ], - "type": "string", - "x-ms-enum": { - "name": "ContainerRegistryResourceType", - "modelAsString": false - } - }, - "resourceGroupName": { - "description": "The resource group name of the container registry.", - "maxLength": 90, - "minLength": 1, + "displayName": { + "description": "Metric display name.", "type": "string" }, - "autoGeneratedDomainNameLabelScope": { - "description": "The auto generated domain name label of the container registry. This value defaults to \"Unsecure\".", - "default": "Unsecure", - "enum": [ - "Unsecure", - "TenantReuse", - "SubscriptionReuse", - "ResourceGroupReuse", - "NoReuse" - ], - "type": "string", - "x-ms-enum": { - "name": "AutoGeneratedDomainNameLabelScope", - "modelAsString": true - } - } - } - }, - "RegistryNameStatus": { - "description": "The result of a request to check the availability of a container registry name.", - "type": "object", - "properties": { - "availableLoginServerName": { - "description": "The complete login server name with domain name label (DNL) hash, if available", + "displayDescription": { + "description": "Metric description.", "type": "string" }, - "nameAvailable": { - "description": "The value that indicates whether the name is available.", - "type": "boolean" - }, - "reason": { - "description": "If any, the reason that the name is not available.", + "unit": { + "description": "Metric unit.", "type": "string" }, - "message": { - "description": "If any, the error message that provides more detail for the reason that the name is not available.", + "aggregationType": { + "description": "Metric aggregation type.", "type": "string" - } - } - }, - "PipelineRunListResult": { - "description": "The result of a request to list pipeline runs for a container registry.", - "type": "object", - "properties": { - "value": { - "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.", - "type": "array", - "items": { - "$ref": "#/definitions/PipelineRun" - } }, - "nextLink": { - "description": "The URI that can be used to request the next list of pipeline runs.", + "internalMetricName": { + "description": "Internal metric name.", "type": "string" } } }, - "PipelineRun": { - "description": "An object that represents a pipeline run for a container registry.", + "OperationPropertiesDefinition": { + "description": "The definition of Azure Monitoring properties.", "type": "object", - "allOf": [ - { - "$ref": "#/definitions/ProxyResource" - } - ], "properties": { - "properties": { - "$ref": "#/definitions/PipelineRunProperties", - "description": "The properties of a pipeline run.", - "x-ms-client-flatten": true + "serviceSpecification": { + "$ref": "#/definitions/OperationServiceSpecificationDefinition" } } }, - "PipelineRunProperties": { - "description": "The properties of a pipeline run.", + "OperationServiceSpecificationDefinition": { + "description": "The definition of Azure Monitoring list.", "type": "object", "properties": { - "provisioningState": { - "description": "The provisioning state of a pipeline run.", - "enum": [ - "Creating", + "metricSpecifications": { + "description": "A list of Azure Monitoring metrics definition.", + "type": "array", + "items": { + "$ref": "#/definitions/OperationMetricSpecificationDefinition" + }, + "x-ms-identifiers": [ + "name" + ] + }, + "logSpecifications": { + "description": "A list of Azure Monitoring log definitions.", + "type": "array", + "items": { + "$ref": "#/definitions/OperationLogSpecificationDefinition" + }, + "x-ms-identifiers": [ + "name" + ] + } + } + }, + "ParentProperties": { + "description": "The properties of the connected registry parent.", + "required": [ + "syncProperties" + ], + "type": "object", + "properties": { + "id": { + "description": "The resource ID of the parent to which the connected registry will be associated.", + "type": "string" + }, + "syncProperties": { + "$ref": "#/definitions/SyncProperties" + } + } + }, + "PipelineRun": { + "description": "An object that represents a pipeline run for a container registry.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "allOf": [ + { + "$ref": "#/definitions/PipelineRunProperties" + } + ], + "x-ms-client-flatten": true + } + } + }, + "PipelineRunListResult": { + "description": "The result of a request to list pipeline runs for a container registry.", + "type": "object", + "properties": { + "value": { + "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.", + "type": "array", + "items": { + "$ref": "#/definitions/PipelineRun" + } + }, + "nextLink": { + "description": "The URI that can be used to request the next list of pipeline runs.", + "type": "string" + } + } + }, + "PipelineRunProperties": { + "description": "The properties of a pipeline run.", + "type": "object", + "properties": { + "provisioningState": { + "description": "The provisioning state of a pipeline run.", + "enum": [ + "Creating", "Updating", "Deleting", "Succeeded", @@ -5981,12 +6407,14 @@ } }, "request": { - "$ref": "#/definitions/PipelineRunRequest", - "description": "The request parameters for a pipeline run." + "$ref": "#/definitions/PipelineRunRequest" }, "response": { - "$ref": "#/definitions/PipelineRunResponse", - "description": "The response of a pipeline run.", + "allOf": [ + { + "$ref": "#/definitions/PipelineRunResponse" + } + ], "readOnly": true }, "forceUpdateTag": { @@ -6011,12 +6439,10 @@ } }, "source": { - "$ref": "#/definitions/PipelineRunSourceProperties", - "description": "The source properties of the pipeline run." + "$ref": "#/definitions/PipelineRunSourceProperties" }, "target": { - "$ref": "#/definitions/PipelineRunTargetProperties", - "description": "The target properties of the pipeline run." + "$ref": "#/definitions/PipelineRunTargetProperties" }, "catalogDigest": { "description": "The digest of the tar used to transfer the artifacts.", @@ -6040,8 +6466,7 @@ } }, "progress": { - "$ref": "#/definitions/ProgressProperties", - "description": "The current progress of the copy operation." + "$ref": "#/definitions/ProgressProperties" }, "startTime": { "format": "date-time", @@ -6054,20 +6479,17 @@ "type": "string" }, "source": { - "$ref": "#/definitions/ImportPipelineSourceProperties", - "description": "The source of the pipeline run." + "$ref": "#/definitions/ImportPipelineSourceProperties" }, "target": { - "$ref": "#/definitions/ExportPipelineTargetProperties", - "description": "The target of the pipeline run." + "$ref": "#/definitions/ExportPipelineTargetProperties" }, "catalogDigest": { "description": "The digest of the tar used to transfer the artifacts.", "type": "string" }, "trigger": { - "$ref": "#/definitions/PipelineTriggerDescriptor", - "description": "The trigger that caused the pipeline run." + "$ref": "#/definitions/PipelineTriggerDescriptor" }, "pipelineRunErrorMessage": { "description": "The detailed error message for the pipeline run in the case of failure.", @@ -6117,47 +6539,106 @@ } } }, - "ProgressProperties": { + "PipelineSourceTriggerDescriptor": { "type": "object", "properties": { - "percentage": { - "description": "The percentage complete of the copy operation.", + "timestamp": { + "format": "date-time", + "description": "The timestamp when the source update happened.", "type": "string" } } }, + "PipelineSourceTriggerProperties": { + "required": [ + "status" + ], + "type": "object", + "properties": { + "status": { + "description": "The current status of the source trigger.", + "default": "Enabled", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "TriggerStatus", + "modelAsString": true + } + } + } + }, "PipelineTriggerDescriptor": { "type": "object", "properties": { "sourceTrigger": { - "$ref": "#/definitions/PipelineSourceTriggerDescriptor", - "description": "The source trigger that caused the pipeline run." + "$ref": "#/definitions/PipelineSourceTriggerDescriptor" } } }, - "PipelineSourceTriggerDescriptor": { + "PipelineTriggerProperties": { "type": "object", "properties": { - "timestamp": { - "format": "date-time", - "description": "The timestamp when the source update happened.", - "type": "string" + "sourceTrigger": { + "$ref": "#/definitions/PipelineSourceTriggerProperties" } } }, - "PrivateEndpointConnectionListResult": { - "description": "The result of a request to list private endpoint connections for a container registry.", + "PlatformFilter": { "type": "object", "properties": { - "value": { - "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.", + "type": { + "description": "The type of values. For example, 'array'.", + "enum": [ + "array" + ], + "type": "string", + "x-ms-enum": { + "name": "PlatformFilterType", + "modelAsString": true + } + }, + "values": { + "description": "The list of platforms to include when syncing.", "type": "array", "items": { - "$ref": "#/definitions/PrivateEndpointConnection" + "type": "string" } + } + } + }, + "Policies": { + "description": "The policies for a container registry.", + "type": "object", + "properties": { + "quarantinePolicy": { + "$ref": "#/definitions/QuarantinePolicy" }, - "nextLink": { - "description": "The URI that can be used to request the next list of private endpoint connections.", + "trustPolicy": { + "$ref": "#/definitions/TrustPolicy" + }, + "retentionPolicy": { + "$ref": "#/definitions/RetentionPolicy" + }, + "exportPolicy": { + "$ref": "#/definitions/ExportPolicy" + }, + "azureADAuthenticationAsArmPolicy": { + "$ref": "#/definitions/AzureADAuthenticationAsArmPolicy" + }, + "softDeletePolicy": { + "$ref": "#/definitions/SoftDeletePolicy" + } + } + }, + "PrivateEndpoint": { + "description": "The Private Endpoint resource.", + "type": "object", + "properties": { + "id": { + "description": "This is private endpoint resource created with Microsoft.Network resource provider.", "type": "string" } } @@ -6172,23 +6653,41 @@ ], "properties": { "properties": { - "$ref": "#/definitions/PrivateEndpointConnectionProperties", - "description": "The properties of a private endpoint connection.", + "allOf": [ + { + "$ref": "#/definitions/PrivateEndpointConnectionProperties" + } + ], "x-ms-client-flatten": true } } }, + "PrivateEndpointConnectionListResult": { + "description": "The result of a request to list private endpoint connections for a container registry.", + "type": "object", + "properties": { + "value": { + "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.", + "type": "array", + "items": { + "$ref": "#/definitions/PrivateEndpointConnection" + } + }, + "nextLink": { + "description": "The URI that can be used to request the next list of private endpoint connections.", + "type": "string" + } + } + }, "PrivateEndpointConnectionProperties": { "description": "The properties of a private endpoint connection.", "type": "object", "properties": { "privateEndpoint": { - "$ref": "#/definitions/PrivateEndpoint", - "description": "The resource of private endpoint." + "$ref": "#/definitions/PrivateEndpoint" }, "privateLinkServiceConnectionState": { - "$ref": "#/definitions/PrivateLinkServiceConnectionState", - "description": "A collection of information about the state of the connection between service consumer and provider." + "$ref": "#/definitions/PrivateLinkServiceConnectionState" }, "provisioningState": { "description": "The provisioning state of private endpoint connection resource.", @@ -6209,13 +6708,63 @@ } } }, - "PrivateEndpoint": { - "description": "The Private Endpoint resource.", + "PrivateLinkResource": { + "description": "A resource that supports private link capabilities.", "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProxyResource" + } + ], "properties": { - "id": { - "description": "This is private endpoint resource created with Microsoft.Network resource provider.", + "properties": { + "allOf": [ + { + "$ref": "#/definitions/PrivateLinkResourceProperties" + } + ], + "x-ms-client-flatten": true + } + } + }, + "PrivateLinkResourceListResult": { + "description": "The result of a request to list private link resources for a container registry.", + "type": "object", + "properties": { + "value": { + "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.", + "type": "array", + "items": { + "$ref": "#/definitions/PrivateLinkResource" + } + }, + "nextLink": { + "description": "The URI that can be used to request the next list of private link resources.", + "type": "string" + } + } + }, + "PrivateLinkResourceProperties": { + "description": "The properties of a private link resource.", + "type": "object", + "properties": { + "groupId": { + "description": "The private link resource group id.", "type": "string" + }, + "requiredMembers": { + "description": "The private link resource required member names.", + "type": "array", + "items": { + "type": "string" + } + }, + "requiredZoneNames": { + "description": "The private link resource Private link DNS zone name.", + "type": "array", + "items": { + "type": "string" + } } } }, @@ -6255,28 +6804,91 @@ } } }, - "RegistryListResult": { - "description": "The result of a request to list container registries.", + "ProgressProperties": { "type": "object", "properties": { - "value": { - "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.", - "type": "array", - "items": { - "$ref": "#/definitions/Registry" - } - }, - "nextLink": { - "description": "The URI that can be used to request the next list of container registries.", + "percentage": { + "description": "The percentage complete of the copy operation.", "type": "string" } } }, - "Registry": { - "description": "An object that represents a container registry.", - "required": [ - "sku" - ], + "ProxyResource": { + "description": "The resource model definition for a ARM proxy resource. It will have everything other than required location and tags.", + "properties": { + "id": { + "description": "The resource ID.", + "type": "string", + "readOnly": true + }, + "name": { + "description": "The name of the resource.", + "type": "string", + "readOnly": true + }, + "type": { + "description": "The type of the resource.", + "type": "string", + "readOnly": true + }, + "systemData": { + "description": "Metadata pertaining to creation and last modification of the resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/SystemData" + } + ], + "readOnly": true + } + }, + "x-ms-azure-resource": true + }, + "QuarantinePolicy": { + "description": "The quarantine policy for a container registry.", + "type": "object", + "properties": { + "status": { + "description": "The value that indicates whether the policy is enabled or not.", + "default": "disabled", + "enum": [ + "enabled", + "disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "PolicyStatus", + "modelAsString": true + } + } + } + }, + "RegenerateCredentialParameters": { + "description": "The parameters used to regenerate the login credential.", + "required": [ + "name" + ], + "type": "object", + "properties": { + "name": { + "description": "Specifies name of the password which should be regenerated -- password or password2.", + "enum": [ + "password", + "password2" + ], + "type": "string", + "x-ms-enum": { + "name": "PasswordName", + "modelAsString": false + } + } + } + }, + "Registry": { + "description": "An object that represents a container registry.", + "required": [ + "sku" + ], "type": "object", "allOf": [ { @@ -6285,58 +6897,150 @@ ], "properties": { "sku": { - "$ref": "#/definitions/Sku", - "description": "The SKU of the container registry." + "$ref": "#/definitions/Sku" }, "identity": { - "$ref": "#/definitions/IdentityProperties", - "description": "The identity of the container registry." + "$ref": "#/definitions/IdentityProperties" }, "properties": { - "$ref": "#/definitions/RegistryProperties", - "description": "The properties of the container registry.", + "allOf": [ + { + "$ref": "#/definitions/RegistryProperties" + } + ], "x-ms-client-flatten": true } } }, - "Sku": { - "description": "The SKU of a container registry.", + "RegistryListCredentialsResult": { + "description": "The response from the ListCredentials operation.", + "type": "object", + "properties": { + "username": { + "description": "The username for a container registry.", + "type": "string" + }, + "passwords": { + "description": "The list of passwords for a container registry.", + "type": "array", + "items": { + "$ref": "#/definitions/RegistryPassword" + }, + "x-ms-identifiers": [ ] + } + } + }, + "RegistryListResult": { + "description": "The result of a request to list container registries.", + "type": "object", + "properties": { + "value": { + "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.", + "type": "array", + "items": { + "$ref": "#/definitions/Registry" + } + }, + "nextLink": { + "description": "The URI that can be used to request the next list of container registries.", + "type": "string" + } + } + }, + "RegistryNameCheckRequest": { + "description": "A request to check whether a container registry name is available.", "required": [ - "name" + "name", + "type" ], "type": "object", "properties": { "name": { - "description": "The SKU name of the container registry. Required for registry creation.", + "description": "The name of the container registry.", + "maxLength": 50, + "minLength": 5, + "pattern": "^[a-zA-Z0-9]*$", + "type": "string" + }, + "type": { + "description": "The resource type of the container registry. This field must be set to 'Microsoft.ContainerRegistry/registries'.", "enum": [ - "Classic", - "Basic", - "Standard", - "Premium" + "Microsoft.ContainerRegistry/registries" ], "type": "string", "x-ms-enum": { - "name": "SkuName", - "modelAsString": true + "name": "ContainerRegistryResourceType", + "modelAsString": false } }, - "tier": { - "description": "The SKU tier based on the SKU name.", + "resourceGroupName": { + "description": "The resource group name of the container registry.", + "maxLength": 90, + "minLength": 1, + "type": "string" + }, + "autoGeneratedDomainNameLabelScope": { + "description": "The auto generated domain name label of the container registry. This value defaults to \"Unsecure\".", + "default": "Unsecure", "enum": [ - "Classic", - "Basic", - "Standard", - "Premium" + "Unsecure", + "TenantReuse", + "SubscriptionReuse", + "ResourceGroupReuse", + "NoReuse" ], "type": "string", - "readOnly": true, "x-ms-enum": { - "name": "SkuTier", + "name": "AutoGeneratedDomainNameLabelScope", "modelAsString": true } } } }, + "RegistryNameStatus": { + "description": "The result of a request to check the availability of a container registry name.", + "type": "object", + "properties": { + "availableLoginServerName": { + "description": "The complete login server name with domain name label (DNL) hash, if available", + "type": "string" + }, + "nameAvailable": { + "description": "The value that indicates whether the name is available.", + "type": "boolean" + }, + "reason": { + "description": "If any, the reason that the name is not available.", + "type": "string" + }, + "message": { + "description": "If any, the error message that provides more detail for the reason that the name is not available.", + "type": "string" + } + } + }, + "RegistryPassword": { + "description": "The login password for the container registry.", + "type": "object", + "properties": { + "name": { + "description": "The password name.", + "enum": [ + "password", + "password2" + ], + "type": "string", + "x-ms-enum": { + "name": "PasswordName", + "modelAsString": false + } + }, + "value": { + "description": "The password value.", + "type": "string" + } + } + }, "RegistryProperties": { "description": "The properties of a container registry.", "type": "object", @@ -6370,8 +7074,11 @@ } }, "status": { - "$ref": "#/definitions/Status", - "description": "The status of the container registry at the time the operation was called.", + "allOf": [ + { + "$ref": "#/definitions/Status" + } + ], "readOnly": true }, "adminUserEnabled": { @@ -6380,16 +7087,13 @@ "type": "boolean" }, "networkRuleSet": { - "$ref": "#/definitions/NetworkRuleSet", - "description": "The network rule set for a container registry." + "$ref": "#/definitions/NetworkRuleSet" }, "policies": { - "$ref": "#/definitions/Policies", - "description": "The policies for a container registry." + "$ref": "#/definitions/Policies" }, "encryption": { - "$ref": "#/definitions/EncryptionProperty", - "description": "The encryption settings of container registry." + "$ref": "#/definitions/EncryptionProperty" }, "dataEndpointEnabled": { "description": "Enable a single data endpoint per region for serving data.", @@ -6473,6 +7177,19 @@ "modelAsString": true } }, + "roleAssignmentMode": { + "description": "Determines registry role assignment mode.", + "default": "LegacyRegistryPermissions", + "enum": [ + "AbacRepositoryPermissions", + "LegacyRegistryPermissions" + ], + "type": "string", + "x-ms-enum": { + "name": "RoleAssignmentMode", + "modelAsString": true + } + }, "autoGeneratedDomainNameLabelScope": { "description": "Determines the domain name label reuse scope.", "default": "Unsecure", @@ -6488,343 +7205,354 @@ "name": "AutoGeneratedDomainNameLabelScope", "modelAsString": true } - }, - "roleAssignmentMode": { - "description": "Determines registry role assignment mode.", - "default": "LegacyRegistryPermissions", - "enum": [ - "AbacRepositoryPermissions", - "LegacyRegistryPermissions" - ], - "type": "string", - "x-ms-enum": { - "name": "RoleAssignmentMode", - "modelAsString": true - } } } }, - "Status": { - "description": "The status of an Azure resource at the time the operation was called.", + "RegistryPropertiesUpdateParameters": { + "description": "The parameters for updating the properties of a container registry.", "type": "object", "properties": { - "displayStatus": { - "description": "The short label for the status.", - "type": "string", - "readOnly": true + "adminUserEnabled": { + "description": "The value that indicates whether the admin user is enabled.", + "type": "boolean" }, - "message": { - "description": "The detailed message for the status, including alerts and error messages.", - "type": "string", - "readOnly": true + "networkRuleSet": { + "$ref": "#/definitions/NetworkRuleSet" }, - "timestamp": { - "format": "date-time", - "description": "The timestamp when the status was changed to the current value.", - "type": "string", - "readOnly": true - } - } - }, - "StatusDetailProperties": { - "description": "The status detail properties of the connected registry.", - "type": "object", - "properties": { - "type": { - "description": "The component of the connected registry corresponding to the status.", - "type": "string", - "readOnly": true + "policies": { + "$ref": "#/definitions/Policies" }, - "code": { - "description": "The HTTP status code.", - "type": "string", - "readOnly": true + "encryption": { + "$ref": "#/definitions/EncryptionProperty" }, - "description": { - "description": "The description of the status.", - "type": "string", - "readOnly": true + "dataEndpointEnabled": { + "description": "Enable a single data endpoint per region for serving data.", + "type": "boolean" }, - "timestamp": { - "format": "date-time", - "description": "The timestamp of the status.", + "publicNetworkAccess": { + "description": "Whether or not public network access is allowed for the container registry.", + "enum": [ + "Enabled", + "Disabled" + ], "type": "string", - "readOnly": true + "x-ms-enum": { + "name": "PublicNetworkAccess", + "modelAsString": true + } }, - "correlationId": { - "description": "The correlation ID of the status.", + "networkRuleBypassOptions": { + "description": "Whether to allow trusted Azure services to access a network restricted registry.", + "default": "AzureServices", + "enum": [ + "AzureServices", + "None" + ], "type": "string", - "readOnly": true - } - } - }, - "StorageAccountProperties": { - "description": "The properties of a storage account for a container registry. Only applicable to Classic SKU.", - "required": [ - "id" - ], - "type": "object", - "properties": { - "id": { - "description": "The resource ID of the storage account.", - "type": "string" - } - } - }, - "SyncProperties": { - "description": "The sync properties of the connected registry with its parent.", - "required": [ - "tokenId", - "messageTtl" - ], - "type": "object", - "properties": { - "tokenId": { - "description": "The resource ID of the ACR token used to authenticate the connected registry to its parent during sync.", - "type": "string" - }, - "schedule": { - "description": "The cron expression indicating the schedule that the connected registry will sync with its parent.", - "type": "string" + "x-ms-enum": { + "name": "NetworkRuleBypassOptions", + "modelAsString": true + } }, - "syncWindow": { - "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.", - "type": "string" + "networkRuleBypassAllowedForTasks": { + "description": "Whether to allow ACR Tasks service to access a network restricted registry.", + "type": "boolean" }, - "messageTtl": { - "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.", - "type": "string" + "anonymousPullEnabled": { + "description": "Enables registry-wide pull from unauthenticated clients.", + "type": "boolean" }, - "lastSyncTime": { - "format": "date-time", - "description": "The last time a sync occurred between the connected registry and its parent.", + "metadataSearch": { + "description": "Determines whether registry artifacts are indexed for metadata search.", + "default": "Disabled", + "enum": [ + "Enabled", + "Disabled" + ], "type": "string", - "readOnly": true + "x-ms-enum": { + "name": "MetadataSearch", + "modelAsString": true + } }, - "gatewayEndpoint": { - "description": "The gateway endpoint used by the connected registry to communicate with its parent.", + "roleAssignmentMode": { + "description": "Determines registry role assignment mode.", + "enum": [ + "AbacRepositoryPermissions", + "LegacyRegistryPermissions" + ], "type": "string", - "readOnly": true + "x-ms-enum": { + "name": "RoleAssignmentMode", + "modelAsString": true + } } } }, - "SyncUpdateProperties": { - "description": "The parameters for updating the sync properties of the connected registry with its parent.", + "RegistryUpdateParameters": { + "description": "The parameters for updating a container registry.", "type": "object", "properties": { - "schedule": { - "description": "The cron expression indicating the schedule that the connected registry will sync with its parent.", - "type": "string" + "identity": { + "$ref": "#/definitions/IdentityProperties" }, - "syncWindow": { - "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.", - "type": "string" + "tags": { + "description": "The tags for the container registry.", + "type": "object", + "additionalProperties": { + "type": "string" + } }, - "messageTtl": { - "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.", - "type": "string" + "sku": { + "$ref": "#/definitions/Sku" + }, + "properties": { + "allOf": [ + { + "$ref": "#/definitions/RegistryPropertiesUpdateParameters" + } + ], + "x-ms-client-flatten": true } } }, - "NetworkRuleSet": { - "description": "The network rule set for a container registry.", - "required": [ - "defaultAction" - ], + "RegistryUsage": { + "description": "The quota usage for a container registry.", "type": "object", "properties": { - "defaultAction": { - "description": "The default action of allow or deny when no other rules match.", - "default": "Allow", + "name": { + "description": "The name of the usage.", + "type": "string" + }, + "limit": { + "format": "int64", + "description": "The limit of the usage.", + "type": "integer" + }, + "currentValue": { + "format": "int64", + "description": "The current value of the usage.", + "type": "integer" + }, + "unit": { + "description": "The unit of measurement.", "enum": [ - "Allow", - "Deny" + "Count", + "Bytes" ], "type": "string", "x-ms-enum": { - "name": "DefaultAction", + "name": "RegistryUsageUnit", "modelAsString": true } - }, - "ipRules": { - "description": "The IP ACL rules.", - "type": "array", - "items": { - "$ref": "#/definitions/IPRule" - }, - "x-ms-identifiers": [] } } }, - "PlatformFilter": { - "description": "Specifies the platform attributes (such as operating system, architecture, and variant) to include or exclude in the filter. This allows selection of OCI artifacts or images that match specific platform requirements, such as linux/amd64 or windows/arm64.", + "RegistryUsageListResult": { + "description": "The result of a request to get container registry quota usages.", "type": "object", "properties": { - "type": { - "description": "The type of values. For example, 'array'.", - "enum": [ - "array" - ], - "type": "string", - "x-ms-enum": { - "name": "PlatformFilterType", - "modelAsString": true - } - }, - "values": { - "description": "The list of platforms to include when syncing.", + "value": { + "description": "The list of container registry quota usages.", "type": "array", "items": { - "type": "string" - } + "$ref": "#/definitions/RegistryUsage" + }, + "x-ms-identifiers": [ + "name" + ] } } }, - "Policies": { - "description": "The policies for a container registry.", + "Replication": { + "description": "An object that represents a replication for a container registry.", "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], "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." + "properties": { + "allOf": [ + { + "$ref": "#/definitions/ReplicationProperties" + } + ], + "x-ms-client-flatten": true } } }, - "EncryptionProperty": { + "ReplicationListResult": { + "description": "The result of a request to list replications for a container registry.", "type": "object", "properties": { - "status": { - "description": "Indicates whether or not the encryption is enabled for container registry.", - "enum": [ - "enabled", - "disabled" - ], - "type": "string", - "x-ms-enum": { - "name": "EncryptionStatus", - "modelAsString": true + "value": { + "description": "The list of replications. Since this list may be incomplete, the nextLink field should be used to request the next list of replications.", + "type": "array", + "items": { + "$ref": "#/definitions/Replication" } }, - "keyVaultProperties": { - "$ref": "#/definitions/KeyVaultProperties", - "description": "Key vault properties." + "nextLink": { + "description": "The URI that can be used to request the next list of replications.", + "type": "string" } } }, - "PackageType": { - "description": "The properties of a package type.", + "ReplicationProperties": { + "description": "The properties of a replication.", "type": "object", "properties": { - "name": { - "description": "The name of the package type.", - "type": "string" - }, - "endpoint": { - "description": "The endpoint of the package type.", - "type": "string", - "readOnly": true - } - } - }, - "IPRule": { - "description": "IP rule with specific IP or IP range in CIDR format.", - "required": [ - "value" - ], - "type": "object", - "properties": { - "action": { - "description": "The action of IP ACL rule.", - "default": "Allow", + "provisioningState": { + "description": "The provisioning state of the replication at the time the operation was called.", "enum": [ - "Allow" + "Creating", + "Updating", + "Deleting", + "Succeeded", + "Failed", + "Canceled" ], "type": "string", + "readOnly": true, "x-ms-enum": { - "name": "Action", + "name": "ProvisioningState", "modelAsString": true } }, - "value": { - "description": "Specifies the IP or IP range in CIDR format. Only IPV4 address is allowed.", - "type": "string", - "x-ms-client-name": "IPAddressOrRange" - } - } - }, - "QuarantinePolicy": { - "description": "The quarantine policy for a container registry.", - "type": "object", - "properties": { "status": { - "description": "The value that indicates whether the policy is enabled or not.", - "default": "disabled", + "allOf": [ + { + "$ref": "#/definitions/Status" + } + ], + "readOnly": true + }, + "regionEndpointEnabled": { + "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, + "type": "boolean" + }, + "zoneRedundancy": { + "description": "Whether or not zone redundancy is enabled for this container registry replication", + "default": "Disabled", "enum": [ - "enabled", - "disabled" + "Enabled", + "Disabled" ], "type": "string", "x-ms-enum": { - "name": "PolicyStatus", + "name": "ZoneRedundancy", "modelAsString": true } } } }, - "TrustPolicy": { - "description": "The content trust policy for a container registry.", + "ReplicationUpdateParameters": { + "description": "The parameters for updating a replication.", "type": "object", "properties": { - "type": { - "description": "The type of trust policy.", - "default": "Notary", - "enum": [ - "Notary" - ], - "type": "string", - "x-ms-enum": { - "name": "TrustPolicyType", - "modelAsString": true + "tags": { + "description": "The tags for the replication.", + "type": "object", + "additionalProperties": { + "type": "string" } }, - "status": { - "description": "The value that indicates whether the policy is enabled or not.", - "default": "disabled", - "enum": [ - "enabled", - "disabled" + "properties": { + "allOf": [ + { + "$ref": "#/definitions/ReplicationUpdateParametersProperties" + } ], + "x-ms-client-flatten": true + } + } + }, + "ReplicationUpdateParametersProperties": { + "type": "object", + "properties": { + "regionEndpointEnabled": { + "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.", + "type": "boolean" + } + } + }, + "Request": { + "description": "The request that generated the event.", + "type": "object", + "properties": { + "id": { + "description": "The ID of the request that initiated the event.", + "type": "string" + }, + "addr": { + "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.", + "type": "string" + }, + "host": { + "description": "The externally accessible hostname of the registry instance, as specified by the http host header on incoming requests.", + "type": "string" + }, + "method": { + "description": "The request method that generated the event.", + "type": "string" + }, + "useragent": { + "description": "The user agent header of the request.", + "type": "string" + } + } + }, + "Resource": { + "description": "An Azure resource.", + "required": [ + "location" + ], + "properties": { + "id": { + "description": "The resource ID.", "type": "string", - "x-ms-enum": { - "name": "PolicyStatus", - "modelAsString": true + "readOnly": true + }, + "name": { + "description": "The name of the resource.", + "type": "string", + "readOnly": true + }, + "type": { + "description": "The type of the resource.", + "type": "string", + "readOnly": true + }, + "location": { + "description": "The location of the resource. This cannot be changed after the resource is created.", + "type": "string", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "tags": { + "description": "The tags of the resource.", + "type": "object", + "additionalProperties": { + "type": "string" } + }, + "systemData": { + "description": "Metadata pertaining to creation and last modification of the resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/SystemData" + } + ], + "readOnly": true } - } + }, + "x-ms-azure-resource": true }, "RetentionPolicy": { "description": "The retention policy for a container registry.", @@ -6857,581 +7585,444 @@ } } }, - "ExportPolicy": { - "description": "The export policy for a container registry.", + "ScopeMap": { + "description": "An object that represents a scope map for a container registry.", "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProxyResource" + } + ], "properties": { - "status": { - "description": "The value that indicates whether the policy is enabled or not.", - "default": "enabled", - "enum": [ - "enabled", - "disabled" + "properties": { + "allOf": [ + { + "$ref": "#/definitions/ScopeMapProperties" + } ], - "type": "string", - "x-ms-enum": { - "name": "ExportPolicyStatus", - "modelAsString": true - } + "x-ms-client-flatten": true } } }, - "SoftDeletePolicy": { - "description": "The soft delete policy for a container registry", + "ScopeMapListResult": { + "description": "The result of a request to list scope maps for a container registry.", "type": "object", "properties": { - "retentionDays": { - "format": "int32", - "description": "The number of days after which a soft-deleted item is permanently deleted.", - "default": 7, - "type": "integer" - }, - "lastUpdatedTime": { - "format": "date-time", - "description": "The timestamp when the policy was last updated.", - "type": "string", - "readOnly": true - }, - "status": { - "description": "The value that indicates whether the policy is enabled or not.", - "default": "disabled", - "enum": [ - "enabled", - "disabled" - ], - "type": "string", - "x-ms-enum": { - "name": "PolicyStatus", - "modelAsString": true + "value": { + "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.", + "type": "array", + "items": { + "$ref": "#/definitions/ScopeMap" } + }, + "nextLink": { + "description": "The URI that can be used to request the next list of scope maps.", + "type": "string" } } }, - "KeyVaultProperties": { + "ScopeMapProperties": { + "description": "The properties of a scope map.", + "required": [ + "actions" + ], "type": "object", "properties": { - "keyIdentifier": { - "description": "Key vault uri to access the encryption key.", + "description": { + "description": "The user friendly description of the scope map.", "type": "string" }, - "versionedKeyIdentifier": { - "description": "The fully qualified key identifier that includes the version of the key that is actually used for encryption.", + "type": { + "description": "The type of the scope map. E.g. BuildIn scope map.", "type": "string", "readOnly": true }, - "identity": { - "description": "The client id of the identity which will be used to access key vault.", - "type": "string" + "creationDate": { + "format": "date-time", + "description": "The creation date of scope map.", + "type": "string", + "readOnly": true }, - "keyRotationEnabled": { - "description": "Auto key rotation status for a CMK enabled registry.", - "type": "boolean", - "readOnly": true - }, - "lastKeyRotationTimestamp": { - "format": "date-time", - "description": "Timestamp of the last successful key rotation.", + "provisioningState": { + "description": "Provisioning state of the resource.", + "enum": [ + "Creating", + "Updating", + "Deleting", + "Succeeded", + "Failed", + "Canceled" + ], "type": "string", - "readOnly": true + "readOnly": true, + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": true + } + }, + "actions": { + "description": "The list of scoped permissions for registry artifacts.\r\nE.g. repositories/repository-name/content/read,\r\nrepositories/repository-name/metadata/write", + "type": "array", + "items": { + "type": "string" + } } } }, - "RegistryUpdateParameters": { - "description": "The parameters for updating a container registry.", + "ScopeMapPropertiesUpdateParameters": { + "description": "The update parameters for scope map properties.", "type": "object", "properties": { - "identity": { - "$ref": "#/definitions/IdentityProperties", - "description": "The identity of the container registry." + "description": { + "description": "The user friendly description of the scope map.", + "type": "string" }, - "tags": { - "description": "The tags for the container registry.", - "type": "object", - "additionalProperties": { + "actions": { + "description": "The list of scope permissions for registry artifacts.\r\nE.g. repositories/repository-name/pull, \r\nrepositories/repository-name/delete", + "type": "array", + "items": { "type": "string" } - }, - "sku": { - "$ref": "#/definitions/Sku", - "description": "The SKU of the container registry." - }, + } + } + }, + "ScopeMapUpdateParameters": { + "description": "The properties for updating the scope map.", + "type": "object", + "properties": { "properties": { - "$ref": "#/definitions/RegistryPropertiesUpdateParameters", - "description": "The properties that the container registry will be updated with.", + "allOf": [ + { + "$ref": "#/definitions/ScopeMapPropertiesUpdateParameters" + } + ], "x-ms-client-flatten": true } } }, - "RegistryPropertiesUpdateParameters": { - "description": "The parameters for updating the properties of a container registry.", + "Sku": { + "description": "The SKU of a container registry.", + "required": [ + "name" + ], "type": "object", "properties": { - "adminUserEnabled": { - "description": "The value that indicates whether the admin user is enabled.", - "type": "boolean" - }, - "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": { - "description": "Enable a single data endpoint per region for serving data.", - "type": "boolean" - }, - "publicNetworkAccess": { - "description": "Whether or not public network access is allowed for the container registry.", - "enum": [ - "Enabled", - "Disabled" - ], - "type": "string", - "x-ms-enum": { - "name": "PublicNetworkAccess", - "modelAsString": true - } - }, - "networkRuleBypassOptions": { - "description": "Whether to allow trusted Azure services to access a network restricted registry.", - "default": "AzureServices", - "enum": [ - "AzureServices", - "None" - ], - "type": "string", - "x-ms-enum": { - "name": "NetworkRuleBypassOptions", - "modelAsString": true - } - }, - "networkRuleBypassAllowedForTasks": { - "description": "Whether to allow ACR Tasks service to access a network restricted registry.", - "type": "boolean" - }, - "anonymousPullEnabled": { - "description": "Enables registry-wide pull from unauthenticated clients.", - "type": "boolean" - }, - "metadataSearch": { - "description": "Determines whether registry artifacts are indexed for metadata search.", - "default": "Disabled", + "name": { + "description": "The SKU name of the container registry. Required for registry creation.", "enum": [ - "Enabled", - "Disabled" + "Classic", + "Basic", + "Standard", + "Premium" ], "type": "string", "x-ms-enum": { - "name": "MetadataSearch", + "name": "SkuName", "modelAsString": true } }, - "roleAssignmentMode": { - "description": "Determines registry role assignment mode.", + "tier": { + "description": "The SKU tier based on the SKU name.", "enum": [ - "AbacRepositoryPermissions", - "LegacyRegistryPermissions" + "Classic", + "Basic", + "Standard", + "Premium" ], "type": "string", + "readOnly": true, "x-ms-enum": { - "name": "RoleAssignmentMode", + "name": "SkuTier", "modelAsString": true } } } }, - "RegistryUsageListResult": { - "description": "The result of a request to get container registry quota usages.", - "type": "object", - "properties": { - "value": { - "description": "The list of container registry quota usages.", - "type": "array", - "items": { - "$ref": "#/definitions/RegistryUsage" - }, - "x-ms-identifiers": [ - "name" - ] - } - } - }, - "RegistryUsage": { - "description": "The quota usage for a container registry.", + "SoftDeletePolicy": { + "description": "The soft delete policy for a container registry", "type": "object", "properties": { - "name": { - "description": "The name of the usage.", - "type": "string" - }, - "limit": { - "format": "int64", - "description": "The limit of the usage.", + "retentionDays": { + "format": "int32", + "description": "The number of days after which a soft-deleted item is permanently deleted.", + "default": 7, "type": "integer" }, - "currentValue": { - "format": "int64", - "description": "The current value of the usage.", - "type": "integer" + "lastUpdatedTime": { + "format": "date-time", + "description": "The timestamp when the policy was last updated.", + "type": "string", + "readOnly": true }, - "unit": { - "description": "The unit of measurement.", + "status": { + "description": "The value that indicates whether the policy is enabled or not.", + "default": "disabled", "enum": [ - "Count", - "Bytes" + "enabled", + "disabled" ], "type": "string", "x-ms-enum": { - "name": "RegistryUsageUnit", + "name": "PolicyStatus", "modelAsString": true } } } }, - "PrivateLinkResourceListResult": { - "description": "The result of a request to list private link resources for a container registry.", + "Source": { + "description": "The registry node that generated the event. Put differently, while the actor initiates the event, the source generates it.", "type": "object", "properties": { - "value": { - "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.", - "type": "array", - "items": { - "$ref": "#/definitions/PrivateLinkResource" - } + "addr": { + "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.", + "type": "string" }, - "nextLink": { - "description": "The URI that can be used to request the next list of private link resources.", + "instanceID": { + "description": "The running instance of an application. Changes after each restart.", "type": "string" } } }, - "PrivateLinkResource": { - "description": "A resource that supports private link capabilities.", + "Status": { + "description": "The status of an Azure resource at the time the operation was called.", "type": "object", "properties": { - "type": { - "description": "The resource type is private link resource.", + "displayStatus": { + "description": "The short label for the status.", "type": "string", "readOnly": true }, - "id": { - "description": "The resource ID.", - "type": "string" - }, - "name": { - "description": "The name of the resource.", - "type": "string" + "message": { + "description": "The detailed message for the status, including alerts and error messages.", + "type": "string", + "readOnly": true }, - "properties": { - "$ref": "#/definitions/PrivateLinkResourceProperties", - "description": "A resource that supports private link capabilities.", - "x-ms-client-flatten": true + "timestamp": { + "format": "date-time", + "description": "The timestamp when the status was changed to the current value.", + "type": "string", + "readOnly": true } } }, - "PrivateLinkResourceProperties": { - "description": "The properties of a private link resource.", + "StatusDetailProperties": { + "description": "The status detail properties of the connected registry.", "type": "object", "properties": { - "groupId": { - "description": "The private link resource group id.", - "type": "string" + "type": { + "description": "The component of the connected registry corresponding to the status.", + "type": "string", + "readOnly": true }, - "requiredMembers": { - "description": "The private link resource required member names.", - "type": "array", - "items": { - "type": "string" - } + "code": { + "description": "The code of the status.", + "type": "string", + "readOnly": true }, - "requiredZoneNames": { - "description": "The private link resource Private link DNS zone name.", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "RegistryListCredentialsResult": { - "description": "The response from the ListCredentials operation.", - "type": "object", - "properties": { - "username": { - "description": "The username for a container registry.", - "type": "string" + "description": { + "description": "The description of the status.", + "type": "string", + "readOnly": true }, - "passwords": { - "description": "The list of passwords for a container registry.", - "type": "array", - "items": { - "$ref": "#/definitions/RegistryPassword" - }, - "x-ms-identifiers": [] - } - } - }, - "RegistryPassword": { - "description": "The login password for the container registry.", - "type": "object", - "properties": { - "name": { - "description": "The password name.", - "enum": [ - "password", - "password2" - ], + "timestamp": { + "format": "date-time", + "description": "The timestamp of the status.", "type": "string", - "x-ms-enum": { - "name": "PasswordName", - "modelAsString": false - } + "readOnly": true }, - "value": { - "description": "The password value.", - "type": "string" + "correlationId": { + "description": "The correlation ID of the status.", + "type": "string", + "readOnly": true } } }, - "RegenerateCredentialParameters": { - "description": "The parameters used to regenerate the login credential.", + "StorageAccountProperties": { + "description": "The properties of a storage account for a container registry. Only applicable to Classic SKU.", "required": [ - "name" + "id" ], "type": "object", "properties": { - "name": { - "description": "Specifies name of the password which should be regenerated -- password or password2.", - "enum": [ - "password", - "password2" - ], - "type": "string", - "x-ms-enum": { - "name": "PasswordName", - "modelAsString": false - } + "id": { + "description": "The resource ID of the storage account.", + "type": "string" } } }, - "ReplicationListResult": { - "description": "The result of a request to list replications for a container registry.", + "SyncProperties": { + "description": "The sync properties of the connected registry with its parent.", + "required": [ + "messageTtl", + "tokenId" + ], "type": "object", "properties": { - "value": { - "description": "The list of replications. Since this list may be incomplete, the nextLink field should be used to request the next list of replications.", - "type": "array", - "items": { - "$ref": "#/definitions/Replication" - } + "tokenId": { + "description": "The resource ID of the ACR token used to authenticate the connected registry to its parent during sync.", + "type": "string" }, - "nextLink": { - "description": "The URI that can be used to request the next list of replications.", + "schedule": { + "description": "The cron expression indicating the schedule that the connected registry will sync with its parent.", + "type": "string" + }, + "syncWindow": { + "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.", + "type": "string" + }, + "messageTtl": { + "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.", "type": "string" + }, + "lastSyncTime": { + "format": "date-time", + "description": "The last time a sync occurred between the connected registry and its parent.", + "type": "string", + "readOnly": true + }, + "gatewayEndpoint": { + "description": "The gateway endpoint used by the connected registry to communicate with its parent.", + "type": "string", + "readOnly": true } } }, - "Replication": { - "description": "An object that represents a replication for a container registry.", + "SyncUpdateProperties": { + "description": "The parameters for updating the sync properties of the connected registry with its parent.", "type": "object", - "allOf": [ - { - "$ref": "#/definitions/Resource" - } - ], "properties": { - "properties": { - "$ref": "#/definitions/ReplicationProperties", - "description": "The properties of the replication.", - "x-ms-client-flatten": true + "schedule": { + "description": "The cron expression indicating the schedule that the connected registry will sync with its parent.", + "type": "string" + }, + "syncWindow": { + "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.", + "type": "string" + }, + "messageTtl": { + "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.", + "type": "string" } } }, - "ReplicationProperties": { - "description": "The properties of a replication.", + "SystemData": { + "description": "Metadata pertaining to creation and last modification of the resource.", "type": "object", "properties": { - "provisioningState": { - "description": "The provisioning state of the replication at the time the operation was called.", + "createdBy": { + "description": "The identity that created the resource.", + "type": "string" + }, + "createdByType": { + "description": "The type of identity that created the resource.", "enum": [ - "Creating", - "Updating", - "Deleting", - "Succeeded", - "Failed", - "Canceled" + "User", + "Application", + "ManagedIdentity", + "Key" ], "type": "string", - "readOnly": true, "x-ms-enum": { - "name": "ProvisioningState", + "name": "createdByType", "modelAsString": true } }, - "status": { - "$ref": "#/definitions/Status", - "description": "The status of the replication at the time the operation was called.", - "readOnly": true + "createdAt": { + "format": "date-time", + "description": "The timestamp of resource creation (UTC).", + "type": "string" }, - "regionEndpointEnabled": { - "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, - "type": "boolean" + "lastModifiedBy": { + "description": "The identity that last modified the resource.", + "type": "string" }, - "zoneRedundancy": { - "description": "Whether or not zone redundancy is enabled for this container registry replication", - "default": "Disabled", + "lastModifiedByType": { + "description": "The type of identity that last modified the resource.", "enum": [ - "Enabled", - "Disabled" + "User", + "Application", + "ManagedIdentity", + "Key" ], "type": "string", "x-ms-enum": { - "name": "ZoneRedundancy", + "name": "lastModifiedByType", "modelAsString": true } + }, + "lastModifiedAt": { + "format": "date-time", + "description": "The timestamp of resource modification (UTC).", + "type": "string" } - } + }, + "readOnly": true }, - "ReplicationUpdateParameters": { - "description": "The parameters for updating a replication.", + "TagFilter": { "type": "object", "properties": { - "tags": { - "description": "The tags for the replication.", - "type": "object", - "additionalProperties": { - "type": "string" + "type": { + "description": "The language type of the filter. Allowed value is 'KQL'.", + "enum": [ + "kql" + ], + "type": "string", + "x-ms-enum": { + "name": "TagFilterType", + "modelAsString": true } }, - "properties": { - "$ref": "#/definitions/ReplicationUpdateParametersProperties", - "description": "The parameters for updating a replication's properties", - "x-ms-client-flatten": true + "query": { + "description": "The query to process with the source repository contents.", + "type": "string" } } }, - "ReplicationUpdateParametersProperties": { + "Target": { + "description": "The target of the event.", "type": "object", "properties": { - "regionEndpointEnabled": { - "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.", - "type": "boolean" - } - } - }, - "ScopeMapListResult": { - "description": "The result of a request to list scope maps for a container registry.", - "type": "object", - "properties": { - "value": { - "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.", - "type": "array", - "items": { - "$ref": "#/definitions/ScopeMap" - } - }, - "nextLink": { - "description": "The URI that can be used to request the next list of scope maps.", - "type": "string" - } - } - }, - "ScopeMap": { - "description": "An object that represents a scope map for a container registry.", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/ProxyResource" - } - ], - "properties": { - "properties": { - "$ref": "#/definitions/ScopeMapProperties", - "description": "The properties of the scope map.", - "x-ms-client-flatten": true - } - } - }, - "ScopeMapProperties": { - "description": "The properties of a scope map.", - "required": [ - "actions" - ], - "type": "object", - "properties": { - "description": { - "description": "The user friendly description of the scope map.", - "type": "string" - }, - "type": { - "description": "The type of the scope map. E.g. BuildIn scope map.", - "type": "string", - "readOnly": true - }, - "creationDate": { - "format": "date-time", - "description": "The creation date of scope map.", - "type": "string", - "readOnly": true - }, - "provisioningState": { - "description": "Provisioning state of the resource.", - "enum": [ - "Creating", - "Updating", - "Deleting", - "Succeeded", - "Failed", - "Canceled" - ], - "type": "string", - "readOnly": true, - "x-ms-enum": { - "name": "ProvisioningState", - "modelAsString": true - } - }, - "actions": { - "description": "The list of scoped permissions for registry artifacts.\r\nE.g. repositories/repository-name/content/read,\r\nrepositories/repository-name/metadata/write", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "ScopeMapUpdateParameters": { - "description": "The properties for updating the scope map.", - "type": "object", - "properties": { - "properties": { - "$ref": "#/definitions/ScopeMapPropertiesUpdateParameters", - "description": "The update parameters for scope map properties.", - "x-ms-client-flatten": true - } - } - }, - "ScopeMapPropertiesUpdateParameters": { - "description": "The update parameters for scope map properties.", - "type": "object", - "properties": { - "description": { - "description": "The user friendly description of the scope map.", - "type": "string" - }, - "actions": { - "description": "The list of scope permissions for registry artifacts.\r\nE.g. repositories/repository-name/pull, \r\nrepositories/repository-name/delete", - "type": "array", - "items": { - "type": "string" - } + "mediaType": { + "description": "The MIME type of the referenced object.", + "type": "string" + }, + "size": { + "format": "int64", + "description": "The number of bytes of the content. Same as Length field.", + "type": "integer" + }, + "digest": { + "description": "The digest of the content, as defined by the Registry V2 HTTP API Specification.", + "type": "string" + }, + "length": { + "format": "int64", + "description": "The number of bytes of the content. Same as Size field.", + "type": "integer" + }, + "repository": { + "description": "The repository name.", + "type": "string" + }, + "url": { + "description": "The direct URL to the content.", + "type": "string" + }, + "tag": { + "description": "The tag name.", + "type": "string" + }, + "name": { + "description": "The name of the artifact.", + "type": "string" + }, + "version": { + "description": "The version of the artifact.", + "type": "string" } } }, @@ -7476,26 +8067,7 @@ } }, "certificate": { - "$ref": "#/definitions/TlsCertificateProperties", - "description": "The certificate used to configure HTTPS for the login server.", - "readOnly": true - } - } - }, - "TokenListResult": { - "description": "The result of a request to list tokens for a container registry.", - "type": "object", - "properties": { - "value": { - "description": "The list of tokens. Since this list may be incomplete, the nextLink field should be used to request the next list of tokens.", - "type": "array", - "items": { - "$ref": "#/definitions/Token" - } - }, - "nextLink": { - "description": "The URI that can be used to request the next list of tokens.", - "type": "string" + "$ref": "#/definitions/TlsCertificateProperties" } } }, @@ -7509,58 +8081,42 @@ ], "properties": { "properties": { - "$ref": "#/definitions/TokenProperties", - "description": "The properties of the token.", + "allOf": [ + { + "$ref": "#/definitions/TokenProperties" + } + ], "x-ms-client-flatten": true } } }, - "TokenProperties": { - "description": "The properties of a token.", + "TokenCertificate": { + "description": "The properties of a certificate used for authenticating a token.", "type": "object", "properties": { - "creationDate": { - "format": "date-time", - "description": "The creation date of scope map.", - "type": "string", - "readOnly": true - }, - "provisioningState": { - "description": "Provisioning state of the resource.", + "name": { "enum": [ - "Creating", - "Updating", - "Deleting", - "Succeeded", - "Failed", - "Canceled" + "certificate1", + "certificate2" ], "type": "string", - "readOnly": true, "x-ms-enum": { - "name": "ProvisioningState", + "name": "TokenCertificateName", "modelAsString": true } }, - "scopeMapId": { - "description": "The resource ID of the scope map to which the token will be associated with.", + "expiry": { + "format": "date-time", + "description": "The expiry datetime of the certificate.", "type": "string" }, - "credentials": { - "$ref": "#/definitions/TokenCredentialsProperties", - "description": "The credentials that can be used for authenticating the token." + "thumbprint": { + "description": "The thumbprint of the certificate.", + "type": "string" }, - "status": { - "description": "The status of the token example enabled or disabled.", - "enum": [ - "enabled", - "disabled" - ], - "type": "string", - "x-ms-enum": { - "name": "TokenStatus", - "modelAsString": true - } + "encodedPemCertificate": { + "description": "Base 64 encoded string of the public certificate1 in PEM format that will be used for authenticating the token.", + "type": "string" } } }, @@ -7569,63 +8125,38 @@ "type": "object", "properties": { "certificates": { + "description": "The list of certificates configured with the token.", "type": "array", "items": { "$ref": "#/definitions/TokenCertificate" }, "x-ms-identifiers": [ - "thumbprint" + "name" ] }, "passwords": { + "description": "The list of passwords generated for the token.", "type": "array", "items": { "$ref": "#/definitions/TokenPassword" }, - "x-ms-identifiers": [] - } - } - }, - "ActiveDirectoryObject": { - "description": "The Active Directory Object that will be used for authenticating the token of a container registry.", - "type": "object", - "properties": { - "objectId": { - "description": "The user/group/application object ID for Active Directory Object that will be used for authenticating the token of a container registry.", - "type": "string" - }, - "tenantId": { - "description": "The tenant ID of user/group/application object Active Directory Object that will be used for authenticating the token of a container registry.", - "type": "string" + "x-ms-identifiers": [ ] } } }, - "TokenCertificate": { - "description": "The properties of a certificate used for authenticating a token.", + "TokenListResult": { + "description": "The result of a request to list tokens for a container registry.", "type": "object", "properties": { - "name": { - "enum": [ - "certificate1", - "certificate2" - ], - "type": "string", - "x-ms-enum": { - "name": "TokenCertificateName", - "modelAsString": true + "value": { + "description": "The list of tokens. Since this list may be incomplete, the nextLink field should be used to request the next list of tokens.", + "type": "array", + "items": { + "$ref": "#/definitions/Token" } }, - "expiry": { - "format": "date-time", - "description": "The expiry datetime of the certificate.", - "type": "string" - }, - "thumbprint": { - "description": "The thumbprint of the certificate.", - "type": "string" - }, - "encodedPemCertificate": { - "description": "Base 64 encoded string of the public certificate1 in PEM format that will be used for authenticating the token.", + "nextLink": { + "description": "The URI that can be used to request the next list of tokens.", "type": "string" } } @@ -7663,25 +8194,40 @@ } } }, - "TokenUpdateParameters": { - "description": "The parameters for updating a token.", - "type": "object", - "properties": { - "properties": { - "$ref": "#/definitions/TokenUpdateProperties", - "description": "The properties of the token update parameters.", - "x-ms-client-flatten": true - } - } - }, - "TokenUpdateProperties": { - "description": "The parameters for updating token properties.", + "TokenProperties": { + "description": "The properties of a token.", "type": "object", "properties": { + "creationDate": { + "format": "date-time", + "description": "The creation date of scope map.", + "type": "string", + "readOnly": true + }, + "provisioningState": { + "description": "Provisioning state of the resource.", + "enum": [ + "Creating", + "Updating", + "Deleting", + "Succeeded", + "Failed", + "Canceled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": true + } + }, "scopeMapId": { "description": "The resource ID of the scope map to which the token will be associated with.", "type": "string" }, + "credentials": { + "$ref": "#/definitions/TokenCredentialsProperties" + }, "status": { "description": "The status of the token example enabled or disabled.", "enum": [ @@ -7693,583 +8239,354 @@ "name": "TokenStatus", "modelAsString": true } - }, - "credentials": { - "$ref": "#/definitions/TokenCredentialsProperties", - "description": "The credentials that can be used for authenticating the token." } } }, - "GenerateCredentialsParameters": { - "description": "The parameters used to generate credentials for a specified token or user of a container registry.", + "TokenUpdateParameters": { + "description": "The parameters for updating a token.", "type": "object", "properties": { - "tokenId": { - "description": "The resource ID of the token for which credentials have to be generated.", - "type": "string" - }, - "expiry": { - "format": "date-time", - "description": "The expiry date of the generated credentials after which the credentials become invalid.", - "type": "string" - }, - "name": { - "description": "Specifies name of the password which should be regenerated if any -- password1 or password2.", - "enum": [ - "password1", - "password2" + "properties": { + "allOf": [ + { + "$ref": "#/definitions/TokenUpdateProperties" + } ], - "type": "string", - "x-ms-enum": { - "name": "TokenPasswordName", - "modelAsString": true - } + "x-ms-client-flatten": true } } }, - "GenerateCredentialsResult": { - "description": "The response from the GenerateCredentials operation.", + "TokenUpdateProperties": { + "description": "The parameters for updating token properties.", "type": "object", "properties": { - "username": { - "description": "The username for a container registry.", + "scopeMapId": { + "description": "The resource ID of the scope map to which the token will be associated with.", "type": "string" }, - "passwords": { - "description": "The list of passwords for a container registry.", - "type": "array", - "items": { - "$ref": "#/definitions/TokenPassword" - }, - "x-ms-identifiers": [] - } - } - }, - "WebhookListResult": { - "description": "The result of a request to list webhooks for a container registry.", - "type": "object", - "properties": { - "value": { - "description": "The list of webhooks. Since this list may be incomplete, the nextLink field should be used to request the next list of webhooks.", - "type": "array", - "items": { - "$ref": "#/definitions/Webhook" - } - }, - "nextLink": { - "description": "The URI that can be used to request the next list of webhooks.", - "type": "string" - } - } - }, - "Webhook": { - "description": "An object that represents a webhook for a container registry.", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/Resource" - } - ], - "properties": { - "properties": { - "$ref": "#/definitions/WebhookProperties", - "description": "The properties of the webhook.", - "x-ms-client-flatten": true - } - } - }, - "WebhookProperties": { - "description": "The properties of a webhook.", - "required": [ - "actions" - ], - "type": "object", - "properties": { "status": { - "description": "The status of the webhook at the time the operation was called.", + "description": "The status of the token example enabled or disabled.", "enum": [ "enabled", "disabled" ], "type": "string", "x-ms-enum": { - "name": "WebhookStatus", - "modelAsString": true - } - }, - "scope": { - "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.", - "type": "string" - }, - "actions": { - "description": "The list of actions that trigger the webhook to post notifications.", - "type": "array", - "items": { - "enum": [ - "push", - "delete", - "quarantine", - "chart_push", - "chart_delete" - ], - "type": "string", - "x-ms-enum": { - "name": "WebhookAction", - "modelAsString": true - } - } - }, - "provisioningState": { - "description": "The provisioning state of the webhook at the time the operation was called.", - "enum": [ - "Creating", - "Updating", - "Deleting", - "Succeeded", - "Failed", - "Canceled" - ], - "type": "string", - "readOnly": true, - "x-ms-enum": { - "name": "ProvisioningState", + "name": "TokenStatus", "modelAsString": true } - } - } - }, - "WebhookCreateParameters": { - "description": "The parameters for creating a webhook.", - "required": [ - "location" - ], - "type": "object", - "properties": { - "tags": { - "description": "The tags for the webhook.", - "type": "object", - "additionalProperties": { - "type": "string" - } }, - "location": { - "description": "The location of the webhook. This cannot be changed after the resource is created.", - "type": "string" - }, - "properties": { - "$ref": "#/definitions/WebhookPropertiesCreateParameters", - "description": "The properties that the webhook will be created with.", - "x-ms-client-flatten": true + "credentials": { + "$ref": "#/definitions/TokenCredentialsProperties" } } }, - "WebhookPropertiesCreateParameters": { - "description": "The parameters for creating the properties of a webhook.", - "required": [ - "serviceUri", - "actions" - ], + "TrustPolicy": { + "description": "The content trust policy for a container registry.", "type": "object", "properties": { - "serviceUri": { - "description": "The service URI for the webhook to post notifications.", - "type": "string", - "x-ms-secret": true - }, - "customHeaders": { - "description": "Custom headers that will be added to the webhook notifications.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-ms-secret": true - }, - "status": { - "description": "The status of the webhook at the time the operation was called.", + "type": { + "description": "The type of trust policy.", + "default": "Notary", "enum": [ - "enabled", - "disabled" + "Notary" ], "type": "string", "x-ms-enum": { - "name": "WebhookStatus", + "name": "TrustPolicyType", "modelAsString": true } }, - "scope": { - "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.", - "type": "string" - }, - "actions": { - "description": "The list of actions that trigger the webhook to post notifications.", - "type": "array", - "items": { - "enum": [ - "push", - "delete", - "quarantine", - "chart_push", - "chart_delete" - ], - "type": "string", - "x-ms-enum": { - "name": "WebhookAction", - "modelAsString": true - } - } - } - } - }, - "WebhookUpdateParameters": { - "description": "The parameters for updating a webhook.", - "type": "object", - "properties": { - "tags": { - "description": "The tags for the webhook.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "properties": { - "$ref": "#/definitions/WebhookPropertiesUpdateParameters", - "description": "The properties that the webhook will be updated with.", - "x-ms-client-flatten": true - } - } - }, - "WebhookPropertiesUpdateParameters": { - "description": "The parameters for updating the properties of a webhook.", - "type": "object", - "properties": { - "serviceUri": { - "description": "The service URI for the webhook to post notifications.", - "type": "string", - "x-ms-secret": true - }, - "customHeaders": { - "description": "Custom headers that will be added to the webhook notifications.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-ms-secret": true - }, "status": { - "description": "The status of the webhook at the time the operation was called.", + "description": "The value that indicates whether the policy is enabled or not.", + "default": "disabled", "enum": [ "enabled", "disabled" ], "type": "string", "x-ms-enum": { - "name": "WebhookStatus", + "name": "PolicyStatus", "modelAsString": true } - }, - "scope": { - "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.", - "type": "string" - }, - "actions": { - "description": "The list of actions that trigger the webhook to post notifications.", - "type": "array", - "items": { - "enum": [ - "push", - "delete", - "quarantine", - "chart_push", - "chart_delete" - ], - "type": "string", - "x-ms-enum": { - "name": "WebhookAction", - "modelAsString": true - } - } - } - } - }, - "EventInfo": { - "description": "The basic information of an event.", - "type": "object", - "properties": { - "id": { - "description": "The event ID.", - "type": "string" } } }, - "EventListResult": { - "description": "The result of a request to list events for a webhook.", + "UserIdentityProperties": { "type": "object", "properties": { - "value": { - "description": "The list of events. Since this list may be incomplete, the nextLink field should be used to request the next list of events.", - "type": "array", - "items": { - "$ref": "#/definitions/Event" - } + "principalId": { + "description": "The principal id of user assigned identity.", + "type": "string", + "readOnly": true }, - "nextLink": { - "description": "The URI that can be used to request the next list of events.", - "type": "string" + "clientId": { + "description": "The client id of user assigned identity.", + "type": "string", + "readOnly": true } } }, - "Event": { - "description": "The event for a webhook.", + "Webhook": { + "description": "An object that represents a webhook for a container registry.", "type": "object", "allOf": [ { - "$ref": "#/definitions/EventInfo" + "$ref": "#/definitions/Resource" } ], "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." - } - } - }, - "EventRequestMessage": { - "description": "The event request message sent to the service URI.", - "type": "object", - "properties": { - "content": { - "$ref": "#/definitions/EventContent", - "description": "The content of the event request message." - }, - "headers": { - "description": "The headers of the event request message.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "method": { - "description": "The HTTP method used to send the event request message.", - "type": "string" - }, - "requestUri": { - "description": "The URI used to send the event request message.", - "type": "string" - }, - "version": { - "description": "The HTTP message version.", - "type": "string" + "properties": { + "allOf": [ + { + "$ref": "#/definitions/WebhookProperties" + } + ], + "x-ms-client-flatten": true } } }, - "EventResponseMessage": { - "description": "The event response message received from the service URI.", + "WebhookCreateParameters": { + "description": "The parameters for creating a webhook.", + "required": [ + "location" + ], "type": "object", "properties": { - "content": { - "description": "The content of the event response message.", - "type": "string" - }, - "headers": { - "description": "The headers of the event response message.", + "tags": { + "description": "The tags for the webhook.", "type": "object", "additionalProperties": { "type": "string" } }, - "reasonPhrase": { - "description": "The reason phrase of the event response message.", - "type": "string" - }, - "statusCode": { - "description": "The status code of the event response message.", - "type": "string" - }, - "version": { - "description": "The HTTP message version.", - "type": "string" - } - } - }, - "EventContent": { - "description": "The content of the event request message.", - "type": "object", - "properties": { - "id": { - "description": "The event ID.", - "type": "string" - }, - "timestamp": { - "format": "date-time", - "description": "The time at which the event occurred.", - "type": "string" - }, - "action": { - "description": "The action that encompasses the provided event.", + "location": { + "description": "The location of the webhook. This cannot be changed after the resource is created.", "type": "string" }, - "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." - } - } - }, - "TagFilter": { - "description": "Specifies a query to filter tags in the upstream repository. Tags are user-defined labels for OCI artifacts or images. This enables selection of content based on tag values.", - "type": "object", - "properties": { - "type": { - "description": "The language type of the filter. Allowed value is 'KQL'.", - "enum": [ - "KQL" + "properties": { + "allOf": [ + { + "$ref": "#/definitions/WebhookPropertiesCreateParameters" + } ], - "type": "string", - "x-ms-enum": { - "name": "TagFilterType", - "modelAsString": true - } - }, - "query": { - "description": "The query to process with the source repository contents.", - "type": "string" - } - } - }, - "Target": { - "description": "The target of the event.", - "type": "object", - "properties": { - "mediaType": { - "description": "The MIME type of the referenced object.", - "type": "string" - }, - "size": { - "format": "int64", - "description": "The number of bytes of the content. Same as Length field.", - "type": "integer" - }, - "digest": { - "description": "The digest of the content, as defined by the Registry V2 HTTP API Specification.", - "type": "string" - }, - "length": { - "format": "int64", - "description": "The number of bytes of the content. Same as Size field.", - "type": "integer" - }, - "repository": { - "description": "The repository name.", - "type": "string" - }, - "url": { - "description": "The direct URL to the content.", - "type": "string" - }, - "tag": { - "description": "The tag name.", - "type": "string" - }, - "name": { - "description": "The name of the artifact.", - "type": "string" - }, - "version": { - "description": "The version of the artifact.", - "type": "string" - } - } - }, - "Request": { - "description": "The request that generated the event.", - "type": "object", - "properties": { - "id": { - "description": "The ID of the request that initiated the event.", - "type": "string" - }, - "addr": { - "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.", - "type": "string" - }, - "host": { - "description": "The externally accessible hostname of the registry instance, as specified by the http host header on incoming requests.", - "type": "string" - }, - "method": { - "description": "The request method that generated the event.", - "type": "string" - }, - "useragent": { - "description": "The user agent header of the request.", - "type": "string" + "x-ms-client-flatten": true } } }, - "Actor": { - "description": "The agent that initiated the event. For most situations, this could be from the authorization context of the request.", + "WebhookListResult": { + "description": "The result of a request to list webhooks for a container registry.", "type": "object", "properties": { - "name": { - "description": "The subject or username associated with the request context that generated the event.", + "value": { + "description": "The list of webhooks. Since this list may be incomplete, the nextLink field should be used to request the next list of webhooks.", + "type": "array", + "items": { + "$ref": "#/definitions/Webhook" + } + }, + "nextLink": { + "description": "The URI that can be used to request the next list of webhooks.", "type": "string" } } }, - "Source": { - "description": "The registry node that generated the event. Put differently, while the actor initiates the event, the source generates it.", + "WebhookProperties": { + "description": "The properties of a webhook.", + "required": [ + "actions" + ], "type": "object", "properties": { - "addr": { - "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.", - "type": "string" + "status": { + "description": "The status of the webhook at the time the operation was called.", + "enum": [ + "enabled", + "disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "WebhookStatus", + "modelAsString": true + } }, - "instanceID": { - "description": "The running instance of an application. Changes after each restart.", + "scope": { + "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.", "type": "string" + }, + "actions": { + "description": "The list of actions that trigger the webhook to post notifications.", + "type": "array", + "items": { + "enum": [ + "push", + "delete", + "quarantine", + "chart_push", + "chart_delete" + ], + "type": "string", + "x-ms-enum": { + "name": "WebhookAction", + "modelAsString": true + } + } + }, + "provisioningState": { + "description": "The provisioning state of the webhook at the time the operation was called.", + "enum": [ + "Creating", + "Updating", + "Deleting", + "Succeeded", + "Failed", + "Canceled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": true + } } } }, - "CallbackConfig": { - "description": "The configuration of service URI and custom headers for the webhook.", + "WebhookPropertiesCreateParameters": { + "description": "The parameters for creating the properties of a webhook.", "required": [ + "actions", "serviceUri" ], "type": "object", "properties": { "serviceUri": { "description": "The service URI for the webhook to post notifications.", + "type": "string", + "x-ms-secret": true + }, + "customHeaders": { + "description": "Custom headers that will be added to the webhook notifications.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-ms-secret": true + }, + "status": { + "description": "The status of the webhook at the time the operation was called.", + "enum": [ + "enabled", + "disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "WebhookStatus", + "modelAsString": true + } + }, + "scope": { + "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.", "type": "string" }, + "actions": { + "description": "The list of actions that trigger the webhook to post notifications.", + "type": "array", + "items": { + "enum": [ + "push", + "delete", + "quarantine", + "chart_push", + "chart_delete" + ], + "type": "string", + "x-ms-enum": { + "name": "WebhookAction", + "modelAsString": true + } + } + } + } + }, + "WebhookPropertiesUpdateParameters": { + "description": "The parameters for updating the properties of a webhook.", + "type": "object", + "properties": { + "serviceUri": { + "description": "The service URI for the webhook to post notifications.", + "type": "string", + "x-ms-secret": true + }, "customHeaders": { "description": "Custom headers that will be added to the webhook notifications.", "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-ms-secret": true + }, + "status": { + "description": "The status of the webhook at the time the operation was called.", + "enum": [ + "enabled", + "disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "WebhookStatus", + "modelAsString": true + } + }, + "scope": { + "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.", + "type": "string" + }, + "actions": { + "description": "The list of actions that trigger the webhook to post notifications.", + "type": "array", + "items": { + "enum": [ + "push", + "delete", + "quarantine", + "chart_push", + "chart_delete" + ], + "type": "string", + "x-ms-enum": { + "name": "WebhookAction", + "modelAsString": true + } + } + } + } + }, + "WebhookUpdateParameters": { + "description": "The parameters for updating a webhook.", + "type": "object", + "properties": { + "tags": { + "description": "The tags for the webhook.", + "type": "object", "additionalProperties": { "type": "string" } + }, + "properties": { + "allOf": [ + { + "$ref": "#/definitions/WebhookPropertiesUpdateParameters" + } + ], + "x-ms-client-flatten": true } } } }, "parameters": { "RegistryNameParameter": { - "name": "registryName", "in": "path", + "name": "registryName", "description": "The name of the container registry.", "required": true, "type": "string", @@ -8279,8 +8596,8 @@ "x-ms-parameter-location": "method" }, "WebhookNameParameter": { - "name": "webhookName", "in": "path", + "name": "webhookName", "description": "The name of the webhook.", "required": true, "type": "string", @@ -8290,8 +8607,8 @@ "x-ms-parameter-location": "method" }, "ReplicationNameParameter": { - "name": "replicationName", "in": "path", + "name": "replicationName", "description": "The name of the replication.", "required": true, "type": "string", @@ -8301,8 +8618,8 @@ "x-ms-parameter-location": "method" }, "ScopeMapNameParameter": { - "name": "scopeMapName", "in": "path", + "name": "scopeMapName", "description": "The name of the scope map.", "required": true, "type": "string", @@ -8312,8 +8629,8 @@ "x-ms-parameter-location": "method" }, "TokenNameParameter": { - "name": "tokenName", "in": "path", + "name": "tokenName", "description": "The name of the token.", "required": true, "type": "string", @@ -8323,24 +8640,24 @@ "x-ms-parameter-location": "method" }, "PrivateEndpointConnectionNameParameter": { - "name": "privateEndpointConnectionName", "in": "path", + "name": "privateEndpointConnectionName", "description": "The name of the private endpoint connection.", "required": true, "type": "string", "x-ms-parameter-location": "method" }, "GroupNameParameter": { - "name": "groupName", "in": "path", + "name": "groupName", "description": "The name of the private link resource.", "required": true, "type": "string", "x-ms-parameter-location": "method" }, "ExportPipelineNameParameter": { - "name": "exportPipelineName", "in": "path", + "name": "exportPipelineName", "description": "The name of the export pipeline.", "required": true, "type": "string", @@ -8350,8 +8667,8 @@ "x-ms-parameter-location": "method" }, "ImportPipelineNameParameter": { - "name": "importPipelineName", "in": "path", + "name": "importPipelineName", "description": "The name of the import pipeline.", "required": true, "type": "string", @@ -8361,8 +8678,8 @@ "x-ms-parameter-location": "method" }, "PipelineRunNameParameter": { - "name": "pipelineRunName", "in": "path", + "name": "pipelineRunName", "description": "The name of the pipeline run.", "required": true, "type": "string", @@ -8386,75 +8703,74 @@ "in": "query", "name": "$filter", "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", "x-ms-parameter-location": "method" }, - "PackageTypeParameter": { - "name": "packageType", + "CredentialSetNameParameter": { "in": "path", - "description": "The type of the package resource.", + "name": "credentialSetName", + "description": "The name of the credential set.", "required": true, "type": "string", "maxLength": 50, - "minLength": 3, - "pattern": "^[a-zA-Z]*$", + "minLength": 5, + "pattern": "^[a-zA-Z0-9-]*$", "x-ms-parameter-location": "method" }, - "ArchiveNameParameter": { - "name": "archiveName", + "CacheRuleNameParameter": { "in": "path", - "description": "The name of the archive resource.", + "name": "cacheRuleName", + "description": "The name of the cache rule.", "required": true, "type": "string", - "maxLength": 200, + "maxLength": 50, "minLength": 5, "pattern": "^[a-zA-Z0-9-]*$", "x-ms-parameter-location": "method" }, - "ArchiveVersionNameParameter": { - "name": "archiveVersionName", + "PackageTypeParameter": { "in": "path", - "description": "The name of the archive version resource.", + "name": "packageType", + "description": "The type of the repository resource.", "required": true, "type": "string", - "maxLength": 200, - "minLength": 5, - "pattern": "^[a-zA-Z0-9-]*$", + "maxLength": 50, + "minLength": 3, + "pattern": "^[a-zA-Z]*$", "x-ms-parameter-location": "method" }, - "CredentialSetNameParameter": { - "name": "credentialSetName", + "ArchiveNameParameter": { "in": "path", - "description": "The name of the credential set.", + "name": "archiveName", + "description": "The name of the archive resource.", "required": true, "type": "string", - "maxLength": 50, + "maxLength": 200, "minLength": 5, - "pattern": "^[a-zA-Z0-9-]*$", + "pattern": "^[a-zA-Z0-9]*$", "x-ms-parameter-location": "method" }, - "CacheRuleNameParameter": { - "name": "cacheRuleName", + "ArchiveVersionNameParameter": { "in": "path", - "description": "The name of the cache rule.", + "name": "archiveVersionName", + "description": "The name of the archive version resource.", "required": true, "type": "string", - "maxLength": 50, + "maxLength": 200, "minLength": 5, - "pattern": "^[a-zA-Z0-9-]*$", + "pattern": "^[a-zA-Z0-9]*$", "x-ms-parameter-location": "method" } }, "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" - } + }, + "description": "Azure Active Directory OAuth2 Flow" } }, "security": [ @@ -8464,4 +8780,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ArchiveCreate.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ArchiveCreate.json deleted file mode 100644 index a8238edc97c..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ArchiveCreate.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ArchiveDelete.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ArchiveDelete.json deleted file mode 100644 index b5af6d05127..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ArchiveDelete.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ArchiveGet.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ArchiveGet.json deleted file mode 100644 index 7f544720fb6..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ArchiveGet.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ArchiveList.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ArchiveList.json deleted file mode 100644 index ca56ece4c5b..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ArchiveList.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "packageType": "myPackageType" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "string", - "name": "string", - "type": "string", - "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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ArchiveUpdate.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ArchiveUpdate.json deleted file mode 100644 index bf7c2611e29..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ArchiveUpdate.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ArchiveVersionCreate.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ArchiveVersionCreate.json deleted file mode 100644 index b74e11ca775..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ArchiveVersionCreate.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ArchiveVersionDelete.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ArchiveVersionDelete.json deleted file mode 100644 index 5a185e048f1..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ArchiveVersionDelete.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ArchiveVersionGet.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ArchiveVersionGet.json deleted file mode 100644 index 3fe0d97b5ed..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ArchiveVersionGet.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ArchiveVersionList.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ArchiveVersionList.json deleted file mode 100644 index 0197900d24a..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ArchiveVersionList.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "packageType": "myPackageType", - "archiveName": "myArchiveName" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "string", - "name": "string", - "type": "string", - "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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CacheRuleCreate.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CacheRuleCreate.json deleted file mode 100644 index a3322ac814c..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CacheRuleCreate.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "cacheRuleName": "myCacheRule", - "cacheRuleCreateParameters": { - "properties": { - "sourceRepository": "mcr.microsoft.com/hello-world", - "targetRepository": "cached-mcr/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", - "properties": { - "sourceRepository": "mcr.microsoft.com/hello-world", - "targetRepository": "cached-mcr/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=2025-09-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": { - "sourceRepository": "mcr.microsoft.com/hello-world", - "targetRepository": "cached-mcr/hello-world", - "creationDate": "2022-11-07T18:20:33.8374968+00:00", - "provisioningState": "Creating" - } - } - } - } -} diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CacheRuleCreateArtifactSync.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CacheRuleCreateArtifactSync.json deleted file mode 100644 index cf37e5f50ca..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CacheRuleCreateArtifactSync.json +++ /dev/null @@ -1,139 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "cacheRuleName": "myCacheRule", - "cacheRuleCreateParameters": { - "properties": { - "sourceRepository": "mcr.microsoft.com/azure-cli", - "targetRepository": "cached-mar/azure-cli", - "syncMode": "ActiveSync", - "artifactSyncFilters": { - "tags": { - "type": "KQL", - "query": "Tags | where Name startswith '2';" - }, - "platforms": { - "type": "array", - "values": [ - "linux/amd64", - "linux/arm64" - ] - }, - "imageTypes": { - "type": "include", - "values": [ - "application/vnd.oci.image.manifest.v1+json", - "application/vnd.oci.image.index.v1+json", - "application/vnd.docker.distribution.manifest.v2+json", - "application/vnd.docker.distribution.manifest.list.v2+json" - ] - }, - "artifactTypes": { - "type": "include", - "values": [ - "application/vnd.cncf.notary.signature", - "application/vnd.aquasec.trivy.report+json", - "application/vnd.cncf.helm.chart.v1.tar+gzip" - ] - } - } - } - } - }, - "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": { - "sourceRepository": "mcr.microsoft.com/azure-cli", - "targetRepository": "cached-mar/azure-cli", - "syncMode": "ActiveSync", - "artifactSyncFilters": { - "tags": { - "type": "KQL", - "query": "Tags | where Name startswith '2';" - }, - "platforms": { - "type": "array", - "values": [ - "linux/amd64", - "linux/arm64" - ] - }, - "imageTypes": { - "type": "include", - "values": [ - "application/vnd.oci.image.manifest.v1+json", - "application/vnd.oci.image.index.v1+json", - "application/vnd.docker.distribution.manifest.v2+json", - "application/vnd.docker.distribution.manifest.list.v2+json" - ] - }, - "artifactTypes": { - "type": "include", - "values": [ - "application/vnd.cncf.notary.signature", - "application/vnd.aquasec.trivy.report+json", - "application/vnd.cncf.helm.chart.v1.tar+gzip" - ] - } - }, - "creationDate": "2025-09-01T00:00:00.0000000+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=2025-09-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": { - "sourceRepository": "mcr.microsoft.com/azure-cli", - "targetRepository": "cached-mar/azure-cli", - "syncMode": "ActiveSync", - "artifactSyncFilters": { - "tags": { - "type": "KQL", - "query": "Tags | where Name startswith '2';" - }, - "platforms": { - "type": "array", - "values": [ - "linux/amd64", - "linux/arm64" - ] - }, - "imageTypes": { - "type": "include", - "values": [ - "application/vnd.oci.image.manifest.v1+json", - "application/vnd.oci.image.index.v1+json", - "application/vnd.docker.distribution.manifest.v2+json", - "application/vnd.docker.distribution.manifest.list.v2+json" - ] - }, - "artifactTypes": { - "type": "include", - "values": [ - "application/vnd.cncf.notary.signature", - "application/vnd.aquasec.trivy.report+json", - "application/vnd.cncf.helm.chart.v1.tar+gzip" - ] - } - }, - "creationDate": "2025-09-01T00:00:00.0000000+00:00", - "provisioningState": "Creating" - } - } - } - } -} diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CacheRuleCreateCredentialSetAuthentication.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CacheRuleCreateCredentialSetAuthentication.json deleted file mode 100644 index a1aef1f3073..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CacheRuleCreateCredentialSetAuthentication.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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=2025-09-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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CacheRuleCreateSyncReferrers.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CacheRuleCreateSyncReferrers.json deleted file mode 100644 index b199576eae6..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CacheRuleCreateSyncReferrers.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "cacheRuleName": "myCacheRule", - "cacheRuleCreateParameters": { - "properties": { - "sourceRepository": "mcr.microsoft.com/azure-cli", - "targetRepository": "cached-mar/azure-cli", - "syncReferrers": "Enabled", - "syncMode": "ActiveSync" - } - } - }, - "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": { - "sourceRepository": "mcr.microsoft.com/azure-cli", - "targetRepository": "cached-mar/azure-cli", - "syncReferrers": "Enabled", - "syncMode": "ActiveSync", - "creationDate": "2025-09-01T00:00:00.0000000+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=2025-09-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": { - "sourceRepository": "mcr.microsoft.com/azure-cli", - "targetRepository": "cached-mar/azure-cli", - "syncReferrers": "Enabled", - "syncMode": "ActiveSync", - "creationDate": "2025-09-01T00:00:00.0000000+00:00", - "provisioningState": "Creating" - } - } - } - } -} diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CacheRuleCreateUserAssignedMIAuthentication.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CacheRuleCreateUserAssignedMIAuthentication.json deleted file mode 100644 index 387512fc358..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CacheRuleCreateUserAssignedMIAuthentication.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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=2025-09-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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CacheRuleDelete.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CacheRuleDelete.json deleted file mode 100644 index 9dfe27402ba..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CacheRuleDelete.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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=2025-09-01-preview" - } - }, - "204": {} - } -} diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CacheRuleGet.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CacheRuleGet.json deleted file mode 100644 index a35aae9f527..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CacheRuleGet.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CacheRuleList.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CacheRuleList.json deleted file mode 100644 index 280b8d34103..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CacheRuleList.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CacheRuleUpdate.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CacheRuleUpdate.json deleted file mode 100644 index b74039c400b..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CacheRuleUpdate.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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=2025-09-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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CacheRuleUpdateArtifactSync.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CacheRuleUpdateArtifactSync.json deleted file mode 100644 index 9af412117ca..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CacheRuleUpdateArtifactSync.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "cacheRuleName": "myCacheRule", - "cacheRuleUpdateParameters": { - "properties": { - "syncMode": "ActiveSync", - "artifactSyncFilters": { - "tags": { - "type": "KQL", - "query": "Tags | where Name startswith '2';" - }, - "platforms": { - "type": "array", - "values": [ - "linux/amd64", - "linux/arm64" - ] - }, - "imageTypes": { - "type": "include", - "values": [ - "application/vnd.oci.image.manifest.v1+json", - "application/vnd.oci.image.index.v1+json", - "application/vnd.docker.distribution.manifest.v2+json", - "application/vnd.docker.distribution.manifest.list.v2+json" - ] - }, - "artifactTypes": { - "type": "include", - "values": [ - "application/vnd.cncf.notary.signature", - "application/vnd.aquasec.trivy.report+json", - "application/vnd.cncf.helm.chart.v1.tar+gzip" - ] - } - } - } - } - }, - "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": { - "sourceRepository": "mcr.microsoft.com/azure-cli", - "targetRepository": "cached-mar/azure-cli", - "syncMode": "ActiveSync", - "artifactSyncFilters": { - "tags": { - "type": "KQL", - "query": "Tags | where Name startswith '2';" - }, - "platforms": { - "type": "array", - "values": [ - "linux/amd64", - "linux/arm64" - ] - }, - "imageTypes": { - "type": "include", - "values": [ - "application/vnd.oci.image.manifest.v1+json", - "application/vnd.oci.image.index.v1+json", - "application/vnd.docker.distribution.manifest.v2+json", - "application/vnd.docker.distribution.manifest.list.v2+json" - ] - }, - "artifactTypes": { - "type": "include", - "values": [ - "application/vnd.cncf.notary.signature", - "application/vnd.aquasec.trivy.report+json", - "application/vnd.cncf.helm.chart.v1.tar+gzip" - ] - } - }, - "creationDate": "2025-09-01T00:00:00.0000000+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=2025-09-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": { - "sourceRepository": "mcr.microsoft.com/azure-cli", - "targetRepository": "cached-mar/azure-cli", - "syncMode": "ActiveSync", - "artifactSyncFilters": { - "tags": { - "type": "KQL", - "query": "Tags | where Name startswith '2';" - }, - "platforms": { - "type": "array", - "values": [ - "linux/amd64", - "linux/arm64" - ] - }, - "imageTypes": { - "type": "include", - "values": [ - "application/vnd.oci.image.manifest.v1+json", - "application/vnd.oci.image.index.v1+json", - "application/vnd.docker.distribution.manifest.v2+json", - "application/vnd.docker.distribution.manifest.list.v2+json" - ] - }, - "artifactTypes": { - "type": "include", - "values": [ - "application/vnd.cncf.notary.signature", - "application/vnd.aquasec.trivy.report+json", - "application/vnd.cncf.helm.chart.v1.tar+gzip" - ] - } - }, - "creationDate": "2025-09-01T00:00:00.0000000+00:00", - "provisioningState": "Updating" - } - } - } - } -} diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CacheRuleUpdateCredentialSetAuthentication.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CacheRuleUpdateCredentialSetAuthentication.json deleted file mode 100644 index b74039c400b..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CacheRuleUpdateCredentialSetAuthentication.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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=2025-09-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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CacheRuleUpdateRemoveMIAuthentication.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CacheRuleUpdateRemoveMIAuthentication.json deleted file mode 100644 index e5443bf0752..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CacheRuleUpdateRemoveMIAuthentication.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "cacheRuleName": "myCacheRule", - "cacheRuleUpdateParameters": { - "identity": { - "type": "None" - } - } - }, - "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": "None" - }, - "properties": { - "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=2025-09-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": "None" - }, - "properties": { - "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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CacheRuleUpdateSyncReferrers.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CacheRuleUpdateSyncReferrers.json deleted file mode 100644 index b7b3973261e..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CacheRuleUpdateSyncReferrers.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "cacheRuleName": "myCacheRule", - "cacheRuleUpdateParameters": { - "properties": { - "syncReferrers": "Enabled", - "syncMode": "ActiveSync" - } - } - }, - "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": { - "sourceRepository": "mcr.microsoft.com/azure-cli", - "targetRepository": "cached-mar/azure-cli", - "syncReferrers": "Enabled", - "syncMode": "ActiveSync", - "creationDate": "2025-09-01T00:00:00.0000000+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=2025-09-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": { - "sourceRepository": "mcr.microsoft.com/azure-cli", - "targetRepository": "cached-mar/azure-cli", - "syncReferrers": "Enabled", - "syncMode": "ActiveSync", - "creationDate": "2025-09-01T00:00:00.0000000+00:00", - "provisioningState": "Updating" - } - } - } - } -} diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CacheRuleUpdateUserAssignedMIAuthentication.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CacheRuleUpdateUserAssignedMIAuthentication.json deleted file mode 100644 index 8ccb5606725..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CacheRuleUpdateUserAssignedMIAuthentication.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "cacheRuleName": "myCacheRule", - "cacheRuleUpdateParameters": { - "identity": { - "type": "UserAssigned", - "userAssignedIdentities": { - "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myUserAssignedIdentity": {} - } - } - } - }, - "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/identity2": { - "clientId": "d3ce1bc2-f7d7-4a5b-9979-950f4e57680e", - "principalId": "b6p9f58b-6fbf-4efd-a7e0-fvd46911a466" - } - } - }, - "properties": { - "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=2025-09-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/identity2": { - "clientId": "d3ce1bc2-f7d7-4a5b-9979-950f4e57680e", - "principalId": "b6p9f58b-6fbf-4efd-a7e0-fvd46911a466" - } - } - }, - "properties": { - "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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CheckCacheRuleArtifactSyncEstimate.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CheckCacheRuleArtifactSyncEstimate.json deleted file mode 100644 index da00e82ab83..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CheckCacheRuleArtifactSyncEstimate.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "cacheRuleParameters": { - "properties": { - "sourceRepository": "mcr.microsoft.com/azure-cli", - "targetRepository": "mcr/azure-cli", - "syncMode": "ActiveSync", - "artifactSyncFilters": { - "tags": { - "type": "KQL", - "query": "Tags | where Name contains 'mariner'" - } - } - } - } - }, - "responses": { - "200": { - "body": { - "name": "azure-cli", - "totalCount": 189, - "filteredCount": 6, - "results": [ - { - "name": "2.54.0-cbl-mariner2.0" - }, - { - "name": "2.54.0-cbl-mariner2.0-amd64" - }, - { - "name": "2.54.0-cbl-mariner2.0-arm64" - }, - { - "name": "cbl-mariner2.0" - }, - { - "name": "cbl-mariner2.0-amd64" - }, - { - "name": "cbl-mariner2.0-arm64" - } - ] - } - } - } -} diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ConnectedRegistryCreate.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ConnectedRegistryCreate.json deleted file mode 100644 index 10b270a3314..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ConnectedRegistryCreate.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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=2025-09-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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ConnectedRegistryDeactivate.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ConnectedRegistryDeactivate.json deleted file mode 100644 index fb929eca6c3..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ConnectedRegistryDeactivate.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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=2025-09-01-preview" - } - } - } -} diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ConnectedRegistryDelete.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ConnectedRegistryDelete.json deleted file mode 100644 index 00e50f03919..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ConnectedRegistryDelete.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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=2025-09-01-preview" - } - }, - "204": {} - } -} diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ConnectedRegistryGet.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ConnectedRegistryGet.json deleted file mode 100644 index 38a4f3d2663..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ConnectedRegistryGet.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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 * * *" - } - } - } - } - } -} diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ConnectedRegistryList.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ConnectedRegistryList.json deleted file mode 100644 index a63ca22aba6..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ConnectedRegistryList.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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 * * *" - } - } - } - ] - } - } - } -} diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ConnectedRegistryResync.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ConnectedRegistryResync.json deleted file mode 100644 index 149388910cc..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ConnectedRegistryResync.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "myResourceGroup", - "registryName": "myRegistry", - "connectedRegistryName": "myConnectedRegistry" - }, - "responses": { - "200": {} - } -} diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ConnectedRegistryUpdate.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ConnectedRegistryUpdate.json deleted file mode 100644 index e604b0cc4e5..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ConnectedRegistryUpdate.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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 * * *" - } - } - } - }, - "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=2025-09-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 * * *" - } - } - } - } - } -} diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CredentialSetCreate.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CredentialSetCreate.json deleted file mode 100644 index 98126504df6..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CredentialSetCreate.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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", - "type": "KeyVaultSecrets", - "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=2025-09-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", - "type": "KeyVaultSecrets", - "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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CredentialSetDelete.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CredentialSetDelete.json deleted file mode 100644 index 870d7a92115..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CredentialSetDelete.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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=2025-09-01-preview" - } - }, - "204": {} - } -} diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CredentialSetGet.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CredentialSetGet.json deleted file mode 100644 index e2602642e62..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CredentialSetGet.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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", - "type": "KeyVaultSecrets", - "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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CredentialSetList.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CredentialSetList.json deleted file mode 100644 index 330ef5f10cf..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CredentialSetList.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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", - "type": "KeyVaultSecrets", - "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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CredentialSetUpdate.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CredentialSetUpdate.json deleted file mode 100644 index 6e479e666f4..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/CredentialSetUpdate.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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", - "type": "KeyVaultSecrets", - "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=2025-09-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", - "type": "KeyVaultSecrets", - "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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ExportPipelineCreate.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ExportPipelineCreate.json deleted file mode 100644 index 1bd63e42d0b..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ExportPipelineCreate.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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" - }, - "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" - }, - "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=2025-09-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" - }, - "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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ExportPipelineDelete.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ExportPipelineDelete.json deleted file mode 100644 index 062f909c26f..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ExportPipelineDelete.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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=2025-09-01-preview" - } - }, - "204": {} - } -} diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ExportPipelineGet.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ExportPipelineGet.json deleted file mode 100644 index 5cd99307bee..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ExportPipelineGet.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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" - }, - "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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ExportPipelineList.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ExportPipelineList.json deleted file mode 100644 index 43cdaf67ccc..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ExportPipelineList.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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" - }, - "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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ImportImageByManifestDigest.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ImportImageByManifestDigest.json deleted file mode 100644 index a2cd6b6c1a7..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ImportImageByManifestDigest.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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=2025-09-01-preview" - } - } - } -} diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ImportImageByTag.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ImportImageByTag.json deleted file mode 100644 index d8fcc6e240c..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ImportImageByTag.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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=2025-09-01-preview" - } - } - } -} diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ImportImageFromPublicRegistry.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ImportImageFromPublicRegistry.json deleted file mode 100644 index 8863c2eaca9..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ImportImageFromPublicRegistry.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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=2025-09-01-preview" - } - } - } -} diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ImportPipelineCreate.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ImportPipelineCreate.json deleted file mode 100644 index 057c1a5877b..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ImportPipelineCreate.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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" - }, - "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" - }, - "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=2025-09-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" - }, - "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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ImportPipelineDelete.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ImportPipelineDelete.json deleted file mode 100644 index 35772ec9508..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ImportPipelineDelete.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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=2025-09-01-preview" - } - }, - "204": {} - } -} diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ImportPipelineGet.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ImportPipelineGet.json deleted file mode 100644 index 39218303027..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ImportPipelineGet.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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" - }, - "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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ImportPipelineList.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ImportPipelineList.json deleted file mode 100644 index 9f22ec44884..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ImportPipelineList.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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" - }, - "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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/OperationList.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/OperationList.json deleted file mode 100644 index 52c498bdd23..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/OperationList.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/PipelineRunCreate_Export.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/PipelineRunCreate_Export.json deleted file mode 100644 index aa4af35bb90..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/PipelineRunCreate_Export.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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" - } - }, - "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=2025-09-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" - } - }, - "provisioningState": "Succeeded" - } - } - } - } -} diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/PipelineRunCreate_Import.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/PipelineRunCreate_Import.json deleted file mode 100644 index 0a8500d6fc8..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/PipelineRunCreate_Import.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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" - }, - "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=2025-09-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" - }, - "catalogDigest": "sha256@" - }, - "provisioningState": "Succeeded" - } - } - } - } -} diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/PipelineRunDelete.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/PipelineRunDelete.json deleted file mode 100644 index 2504ac34391..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/PipelineRunDelete.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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=2025-09-01-preview" - } - }, - "204": {} - } -} diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/PipelineRunGet.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/PipelineRunGet.json deleted file mode 100644 index 77b535ce2e5..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/PipelineRunGet.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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" - } - }, - "provisioningState": "Succeeded" - } - } - } - } -} diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/PipelineRunList.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/PipelineRunList.json deleted file mode 100644 index cf74afa4b8c..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/PipelineRunList.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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" - } - }, - "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" - }, - "catalogDigest": "sha256@" - }, - "provisioningState": "Succeeded" - } - } - ] - } - } - } -} diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/PrivateEndpointConnectionCreateOrUpdate.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/PrivateEndpointConnectionCreateOrUpdate.json deleted file mode 100644 index ffc5df425fe..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/PrivateEndpointConnectionCreateOrUpdate.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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=2025-09-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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/PrivateEndpointConnectionDelete.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/PrivateEndpointConnectionDelete.json deleted file mode 100644 index 0375995e02a..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/PrivateEndpointConnectionDelete.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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=2025-09-01-preview" - } - }, - "204": {} - } -} diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/PrivateEndpointConnectionGet.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/PrivateEndpointConnectionGet.json deleted file mode 100644 index 62948bb86e1..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/PrivateEndpointConnectionGet.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/PrivateEndpointConnectionList.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/PrivateEndpointConnectionList.json deleted file mode 100644 index bf9cc72b303..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/PrivateEndpointConnectionList.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryCheckNameAvailable.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryCheckNameAvailable.json deleted file mode 100644 index e9e6aff485e..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryCheckNameAvailable.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryCheckNameNotAvailable.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryCheckNameNotAvailable.json deleted file mode 100644 index 49d3a17a3f0..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryCheckNameNotAvailable.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryCreate.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryCreate.json deleted file mode 100644 index 5ecf49bff38..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryCreate.json +++ /dev/null @@ -1,136 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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-test.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" - } - } - }, - "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-test.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" - } - } - } - } -} diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryCreateAbac.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryCreateAbac.json deleted file mode 100644 index 76a40b5d903..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryCreateAbac.json +++ /dev/null @@ -1,136 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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-test.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" - } - } - }, - "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-test.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" - } - } - } - } -} diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryCreateDomainNameLabelScope.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryCreateDomainNameLabelScope.json deleted file mode 100644 index 74d3188b5cd..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryCreateDomainNameLabelScope.json +++ /dev/null @@ -1,136 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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-test.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" - } - } - }, - "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-test.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" - } - } - } - } -} diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryCreateZoneRedundant.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryCreateZoneRedundant.json deleted file mode 100644 index d02ceb81c55..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryCreateZoneRedundant.json +++ /dev/null @@ -1,139 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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-test.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" - } - } - }, - "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=2025-09-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-test.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" - } - } - } - } -} diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryDelete.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryDelete.json deleted file mode 100644 index fe9f57c2122..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryDelete.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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=2025-09-01-preview" - } - }, - "204": {} - } -} diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryGenerateCredentials.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryGenerateCredentials.json deleted file mode 100644 index 2c4bb72b3cf..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryGenerateCredentials.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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=2025-09-01-preview" - } - } - } -} diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryGet.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryGet.json deleted file mode 100644 index 409fc40fdc0..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryGet.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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-test.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" - } - } - } - } -} diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryGetPrivateLinkResource.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryGetPrivateLinkResource.json deleted file mode 100644 index 43836d0d3da..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryGetPrivateLinkResource.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryList.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryList.json deleted file mode 100644 index 731f31fb578..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryList.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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-test.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" - } - } - ] - } - } - } -} diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryListByResourceGroup.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryListByResourceGroup.json deleted file mode 100644 index 10192bc5174..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryListByResourceGroup.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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-test.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" - } - } - ] - } - } - } -} diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryListCredentials.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryListCredentials.json deleted file mode 100644 index a54a69c63e0..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryListCredentials.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryListPrivateLinkResources.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryListPrivateLinkResources.json deleted file mode 100644 index edc26106d48..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryListPrivateLinkResources.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryListUsages.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryListUsages.json deleted file mode 100644 index 7608c84e785..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryListUsages.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryRegenerateCredential.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryRegenerateCredential.json deleted file mode 100644 index eb851516701..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryRegenerateCredential.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryUpdate.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryUpdate.json deleted file mode 100644 index ee6c1e45bb8..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/RegistryUpdate.json +++ /dev/null @@ -1,139 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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-test.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" - } - } - }, - "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=2025-09-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-test.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" - } - } - } - } -} diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ReplicationCreate.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ReplicationCreate.json deleted file mode 100644 index fc870811dde..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ReplicationCreate.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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=2025-09-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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ReplicationCreateZoneRedundant.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ReplicationCreateZoneRedundant.json deleted file mode 100644 index ead6915cbaf..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ReplicationCreateZoneRedundant.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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=2025-09-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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ReplicationDelete.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ReplicationDelete.json deleted file mode 100644 index 46ed0476ce1..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ReplicationDelete.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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=2025-09-01-preview" - } - }, - "204": {} - } -} diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ReplicationGet.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ReplicationGet.json deleted file mode 100644 index 5c55c0c2e77..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ReplicationGet.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ReplicationList.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ReplicationList.json deleted file mode 100644 index 22d1bb63b09..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ReplicationList.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ReplicationUpdate.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ReplicationUpdate.json deleted file mode 100644 index f96fed6047a..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ReplicationUpdate.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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=2025-09-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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ScopeMapCreate.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ScopeMapCreate.json deleted file mode 100644 index 5679194bc7c..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ScopeMapCreate.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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=2025-09-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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ScopeMapDelete.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ScopeMapDelete.json deleted file mode 100644 index ca7b34d0422..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ScopeMapDelete.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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=2025-09-01-preview" - } - }, - "204": {} - } -} diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ScopeMapGet.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ScopeMapGet.json deleted file mode 100644 index a4f651a4509..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ScopeMapGet.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ScopeMapList.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ScopeMapList.json deleted file mode 100644 index f0e48c0ce1c..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ScopeMapList.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ScopeMapUpdate.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ScopeMapUpdate.json deleted file mode 100644 index e03a0d889bf..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/ScopeMapUpdate.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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=2025-09-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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/TokenCreate.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/TokenCreate.json deleted file mode 100644 index be9d4558f15..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/TokenCreate.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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=2025-09-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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/TokenDelete.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/TokenDelete.json deleted file mode 100644 index 7ea5ea0b5a3..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/TokenDelete.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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=2025-09-01-preview" - } - }, - "204": {} - } -} diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/TokenGet.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/TokenGet.json deleted file mode 100644 index b9c07af857e..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/TokenGet.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/TokenList.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/TokenList.json deleted file mode 100644 index c60e08e49eb..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/TokenList.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/TokenUpdate.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/TokenUpdate.json deleted file mode 100644 index bea97841472..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/TokenUpdate.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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=2025-09-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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/WebhookCreate.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/WebhookCreate.json deleted file mode 100644 index a5657222106..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/WebhookCreate.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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=2025-09-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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/WebhookDelete.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/WebhookDelete.json deleted file mode 100644 index 151776a3816..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/WebhookDelete.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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=2025-09-01-preview" - } - }, - "204": {} - } -} diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/WebhookGet.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/WebhookGet.json deleted file mode 100644 index 4560167da65..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/WebhookGet.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/WebhookGetCallbackConfig.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/WebhookGetCallbackConfig.json deleted file mode 100644 index 9be97432576..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/WebhookGetCallbackConfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/WebhookList.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/WebhookList.json deleted file mode 100644 index 382397672c8..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/WebhookList.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/WebhookListEvents.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/WebhookListEvents.json deleted file mode 100644 index 0c8014e1915..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/WebhookListEvents.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/WebhookPing.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/WebhookPing.json deleted file mode 100644 index 3f759e50cd7..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/WebhookPing.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/WebhookUpdate.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/WebhookUpdate.json deleted file mode 100644 index df3138ee427..00000000000 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/examples/WebhookUpdate.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "parameters": { - "api-version": "2025-09-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=2025-09-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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/apiview-properties.json b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/apiview-properties.json index 52631d7bf0e..f4e1a2697b0 100644 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/apiview-properties.json +++ b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/apiview-properties.json @@ -10,7 +10,9 @@ "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.ArchiveUpdateParametersProperties": null, "container_registry_management_client.models.ArchiveVersion": null, + "container_registry_management_client.models.ArchiveVersionPropertiesAutoGenerated": null, "container_registry_management_client.models.ArchiveVersionProperties": null, "container_registry_management_client.models.ArtifactSyncEstimateResult": null, "container_registry_management_client.models.ArtifactSyncFilterProperties": null, @@ -19,19 +21,26 @@ "container_registry_management_client.models.AzureADAuthenticationAsArmPolicy": null, "container_registry_management_client.models.CacheRule": null, "container_registry_management_client.models.CacheRuleArtifactSyncEstimateResult": null, + "container_registry_management_client.models.CacheRulePropertiesAutoGenerated": null, "container_registry_management_client.models.CacheRuleProperties": null, + "container_registry_management_client.models.CacheRuleSyncParameters": null, "container_registry_management_client.models.CacheRuleUpdateParameters": null, "container_registry_management_client.models.CacheRuleUpdateProperties": null, + "container_registry_management_client.models.CacheRuleUpdateParametersProperties": null, "container_registry_management_client.models.CallbackConfig": null, "container_registry_management_client.models.ConnectedRegistry": null, + "container_registry_management_client.models.ConnectedRegistryPropertiesAutoGenerated": 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.ConnectedRegistryUpdateParametersProperties": null, "container_registry_management_client.models.CredentialHealth": null, "container_registry_management_client.models.CredentialSet": null, + "container_registry_management_client.models.CredentialSetPropertiesAutoGenerated": 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.CredentialSetUpdateParametersProperties": null, "container_registry_management_client.models.DebianArchivePackageSourceProperties": null, "container_registry_management_client.models.DebianArchiveProperties": null, "container_registry_management_client.models.EncryptionProperty": null, @@ -44,6 +53,7 @@ "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.ExportPipelinePropertiesAutoGenerated": null, "container_registry_management_client.models.ExportPipelineProperties": null, "container_registry_management_client.models.ExportPipelineTargetProperties": null, "container_registry_management_client.models.ExportPolicy": null, @@ -54,6 +64,7 @@ "container_registry_management_client.models.ImageTypeFilter": null, "container_registry_management_client.models.ImportImageParameters": null, "container_registry_management_client.models.ImportPipeline": null, + "container_registry_management_client.models.ImportPipelinePropertiesAutoGenerated": null, "container_registry_management_client.models.ImportPipelineProperties": null, "container_registry_management_client.models.ImportPipelineSourceProperties": null, "container_registry_management_client.models.ImportSource": null, @@ -64,17 +75,19 @@ "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.OperationPropertiesDefinition": null, + "container_registry_management_client.models.OperationDefinitionProperties": 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.PackageType": null, "container_registry_management_client.models.ParentProperties": null, "container_registry_management_client.models.PipelineRun": null, + "container_registry_management_client.models.PipelineRunPropertiesAutoGenerated": 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.PipelineRunPropertiesResponse": null, + "container_registry_management_client.models.PipelineRunRequest": null, "container_registry_management_client.models.PipelineRunSourceProperties": null, "container_registry_management_client.models.PipelineRunTargetProperties": null, "container_registry_management_client.models.PipelineSourceTriggerDescriptor": null, @@ -85,11 +98,15 @@ "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.PrivateEndpointConnectionPropertiesAutoGenerated": null, "container_registry_management_client.models.PrivateEndpointConnectionProperties": null, "container_registry_management_client.models.PrivateLinkResource": null, + "container_registry_management_client.models.PrivateLinkResourcePropertiesAutoGenerated": 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.SystemData": null, + "container_registry_management_client.models.ProxyResourceSystemData": null, "container_registry_management_client.models.QuarantinePolicy": null, "container_registry_management_client.models.RegenerateCredentialParameters": null, "container_registry_management_client.models.Resource": null, @@ -98,30 +115,38 @@ "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.RegistryPropertiesAutoGenerated": null, "container_registry_management_client.models.RegistryProperties": null, + "container_registry_management_client.models.Status": null, + "container_registry_management_client.models.RegistryPropertiesStatus": null, "container_registry_management_client.models.RegistryPropertiesUpdateParameters": null, "container_registry_management_client.models.RegistryUpdateParameters": null, + "container_registry_management_client.models.RegistryUpdateParametersProperties": 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.ReplicationPropertiesAutoGenerated": null, "container_registry_management_client.models.ReplicationProperties": null, + "container_registry_management_client.models.ReplicationPropertiesStatus": null, "container_registry_management_client.models.ReplicationUpdateParameters": null, + "container_registry_management_client.models.ReplicationUpdateParametersPropertiesAutoGenerated": null, "container_registry_management_client.models.ReplicationUpdateParametersProperties": null, "container_registry_management_client.models.Request": null, + "container_registry_management_client.models.ResourceSystemData": null, "container_registry_management_client.models.RetentionPolicy": null, "container_registry_management_client.models.ScopeMap": null, + "container_registry_management_client.models.ScopeMapPropertiesAutoGenerated": 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.ScopeMapUpdateParametersProperties": 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.StorageAccountProperties": 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.TagFilter": null, "container_registry_management_client.models.Target": null, "container_registry_management_client.models.TlsCertificateProperties": null, @@ -130,28 +155,33 @@ "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.TokenPropertiesAutoGenerated": 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.TokenUpdateParametersProperties": 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.WebhookCreateParametersProperties": null, + "container_registry_management_client.models.WebhookPropertiesAutoGenerated": null, + "container_registry_management_client.models.WebhookProperties": null, "container_registry_management_client.models.WebhookPropertiesUpdateParameters": null, "container_registry_management_client.models.WebhookUpdateParameters": null, + "container_registry_management_client.models.WebhookUpdateParametersProperties": null, "container_registry_management_client.models.CreatedByType": null, "container_registry_management_client.models.LastModifiedByType": null, "container_registry_management_client.models.PackageSourceType": null, "container_registry_management_client.models.ProvisioningState": null, "container_registry_management_client.models.ResourceIdentityType": null, - "container_registry_management_client.models.CacheRuleSyncMode": null, + "container_registry_management_client.models.SyncMode": null, + "container_registry_management_client.models.ReferrersSyncStatus": null, "container_registry_management_client.models.TagFilterType": null, "container_registry_management_client.models.PlatformFilterType": null, "container_registry_management_client.models.ImageTypeFilterType": null, "container_registry_management_client.models.ArtifactTypeFilterType": null, - "container_registry_management_client.models.ReferrersSyncStatus": null, "container_registry_management_client.models.ConnectedRegistryMode": null, "container_registry_management_client.models.ConnectionState": null, "container_registry_management_client.models.ActivationStatus": null, @@ -160,7 +190,6 @@ "container_registry_management_client.models.LogLevel": null, "container_registry_management_client.models.AuditLogStatus": null, "container_registry_management_client.models.CredentialName": null, - "container_registry_management_client.models.CredentialType": null, "container_registry_management_client.models.CredentialHealthStatus": null, "container_registry_management_client.models.PipelineOptions": null, "container_registry_management_client.models.PipelineSourceType": null, @@ -182,44 +211,76 @@ "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.RegistryUsageUnit": null, + "container_registry_management_client.models.AutoGeneratedDomainNameLabelScope": null, "container_registry_management_client.models.PasswordName": null, + "container_registry_management_client.models.RegistryUsageUnit": null, "container_registry_management_client.models.TokenCertificateName": null, "container_registry_management_client.models.TokenPasswordName": 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.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.begin_delete": null, - "container_registry_management_client.aio.operations.ArchivesOperations.begin_delete": null, "container_registry_management_client.operations.ArchivesOperations.update": null, "container_registry_management_client.aio.operations.ArchivesOperations.update": null, - "container_registry_management_client.operations.ArchiveVersionsOperations.list": null, - "container_registry_management_client.aio.operations.ArchiveVersionsOperations.list": 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.ArchivesOperations.list": null, + "container_registry_management_client.aio.operations.ArchivesOperations.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.CacheRulesOperations.list": null, - "container_registry_management_client.aio.operations.CacheRulesOperations.list": null, + "container_registry_management_client.operations.ArchiveVersionsOperations.list": null, + "container_registry_management_client.aio.operations.ArchiveVersionsOperations.list": null, + "container_registry_management_client.operations.RegistriesOperations.check_cache_rule_artifact_sync_estimate": null, + "container_registry_management_client.aio.operations.RegistriesOperations.check_cache_rule_artifact_sync_estimate": 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.check_name_availability": null, + "container_registry_management_client.aio.operations.RegistriesOperations.check_name_availability": 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.list_by_resource_group": null, + "container_registry_management_client.aio.operations.RegistriesOperations.list_by_resource_group": 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_credentials": null, + "container_registry_management_client.aio.operations.RegistriesOperations.list_credentials": 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.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.begin_generate_credentials": null, + "container_registry_management_client.aio.operations.RegistriesOperations.begin_generate_credentials": 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_delete": null, - "container_registry_management_client.aio.operations.CacheRulesOperations.begin_delete": 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.CacheRulesOperations.list": null, + "container_registry_management_client.aio.operations.CacheRulesOperations.list": null, + "container_registry_management_client.operations.CacheRulesOperations.sync_cache_rule": null, + "container_registry_management_client.aio.operations.CacheRulesOperations.sync_cache_rule": 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, @@ -234,125 +295,95 @@ "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_delete": null, - "container_registry_management_client.aio.operations.CredentialSetsOperations.begin_delete": 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.ExportPipelinesOperations.list": null, - "container_registry_management_client.aio.operations.ExportPipelinesOperations.list": 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.CredentialSetsOperations.list": null, + "container_registry_management_client.aio.operations.CredentialSetsOperations.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.RegistriesOperations.begin_import_image": null, - "container_registry_management_client.aio.operations.RegistriesOperations.begin_import_image": 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_delete": null, - "container_registry_management_client.aio.operations.RegistriesOperations.begin_delete": 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.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.check_cache_rule_artifact_sync_estimate": null, - "container_registry_management_client.aio.operations.RegistriesOperations.check_cache_rule_artifact_sync_estimate": 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.regenerate_credential": null, - "container_registry_management_client.aio.operations.RegistriesOperations.regenerate_credential": 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.ImportPipelinesOperations.list": null, - "container_registry_management_client.aio.operations.ImportPipelinesOperations.list": null, + "container_registry_management_client.operations.ExportPipelinesOperations.list": null, + "container_registry_management_client.aio.operations.ExportPipelinesOperations.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.ImportPipelinesOperations.list": null, + "container_registry_management_client.aio.operations.ImportPipelinesOperations.list": null, "container_registry_management_client.operations.Operations.list": null, "container_registry_management_client.aio.operations.Operations.list": 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.PipelineRunsOperations.list": null, + "container_registry_management_client.aio.operations.PipelineRunsOperations.list": 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.get": null, + "container_registry_management_client.aio.operations.PrivateEndpointConnectionsOperations.get": 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.PrivateEndpointConnectionsOperations.list": null, + "container_registry_management_client.aio.operations.PrivateEndpointConnectionsOperations.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_delete": null, - "container_registry_management_client.aio.operations.ReplicationsOperations.begin_delete": 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.ScopeMapsOperations.list": null, - "container_registry_management_client.aio.operations.ScopeMapsOperations.list": 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.ReplicationsOperations.list": null, + "container_registry_management_client.aio.operations.ReplicationsOperations.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_delete": null, - "container_registry_management_client.aio.operations.ScopeMapsOperations.begin_delete": 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.TokensOperations.list": null, - "container_registry_management_client.aio.operations.TokensOperations.list": 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.ScopeMapsOperations.list": null, + "container_registry_management_client.aio.operations.ScopeMapsOperations.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_delete": null, - "container_registry_management_client.aio.operations.TokensOperations.begin_delete": 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.WebhooksOperations.list": null, - "container_registry_management_client.aio.operations.WebhooksOperations.list": 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.TokensOperations.list": null, + "container_registry_management_client.aio.operations.TokensOperations.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_delete": null, - "container_registry_management_client.aio.operations.WebhooksOperations.begin_delete": 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.list": null, + "container_registry_management_client.aio.operations.WebhooksOperations.list": null, "container_registry_management_client.operations.WebhooksOperations.ping": null, "container_registry_management_client.aio.operations.WebhooksOperations.ping": 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.get_callback_config": null, - "container_registry_management_client.aio.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 } } \ No newline at end of file diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/__init__.py b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/__init__.py index f13d622b99f..42a0aa5c247 100644 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/__init__.py +++ b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/__init__.py @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.8, generator: @autorest/python@6.40.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. # -------------------------------------------------------------------------- # pylint: disable=wrong-import-position diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/_client.py b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/_client.py index 69b69ecc0fa..e018457a72a 100644 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/_client.py +++ b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/_client.py @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.8, generator: @autorest/python@6.40.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. # -------------------------------------------------------------------------- @@ -45,6 +45,8 @@ class ContainerRegistryManagementClient: # pylint: disable=too-many-instance-at :ivar archive_versions: ArchiveVersionsOperations operations :vartype archive_versions: container_registry_management_client.operations.ArchiveVersionsOperations + :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 @@ -56,8 +58,6 @@ class ContainerRegistryManagementClient: # pylint: disable=too-many-instance-at :ivar export_pipelines: ExportPipelinesOperations operations :vartype export_pipelines: container_registry_management_client.operations.ExportPipelinesOperations - :ivar registries: RegistriesOperations operations - :vartype registries: container_registry_management_client.operations.RegistriesOperations :ivar import_pipelines: ImportPipelinesOperations operations :vartype import_pipelines: container_registry_management_client.operations.ImportPipelinesOperations @@ -98,7 +98,7 @@ def __init__( **kwargs: Any ) -> None: self._config = ContainerRegistryManagementClientConfiguration( - credential=credential, subscription_id=subscription_id, **kwargs + credential=credential,subscription_id=subscription_id,**kwargs ) _policies = kwargs.pop("policies", None) @@ -129,6 +129,7 @@ def __init__( self.archive_versions = ArchiveVersionsOperations( 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 @@ -137,7 +138,6 @@ def __init__( self.export_pipelines = ExportPipelinesOperations( self._client, self._config, self._serialize, self._deserialize ) - self.registries = RegistriesOperations(self._client, self._config, self._serialize, self._deserialize) self.import_pipelines = ImportPipelinesOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/_configuration.py b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/_configuration.py index 36ef0756d9c..3fb404e1469 100644 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/_configuration.py +++ b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/_configuration.py @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.8, generator: @autorest/python@6.40.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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/_utils/__init__.py b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/_utils/__init__.py index a7a135eb5f3..2566f510b64 100644 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/_utils/__init__.py +++ b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/_utils/__init__.py @@ -1,4 +1,4 @@ # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.8, generator: @autorest/python@6.40.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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/_utils/serialization.py b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/_utils/serialization.py index fa96b9ed598..74d041d57ca 100644 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/_utils/serialization.py +++ b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/_utils/serialization.py @@ -1,7 +1,7 @@ # 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.40.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. # -------------------------------------------------------------------------- @@ -785,7 +785,7 @@ def serialize_data(self, data, data_type, **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, data.__class__) + 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) @@ -819,13 +819,20 @@ def serialize_basic(cls, data, data_type, **kwargs): :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) - return eval(data_type)(data) # nosec # pylint: disable=eval-used + 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): @@ -1755,7 +1762,7 @@ def deserialize_basic(self, attr, data_type): # pylint: disable=too-many-return :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. + :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 @@ -1781,7 +1788,11 @@ def deserialize_basic(self, attr, data_type): # pylint: disable=too-many-return if data_type == "str": return self.deserialize_unicode(attr) - return eval(data_type)(attr) # nosec # pylint: disable=eval-used + 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): diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/aio/__init__.py b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/aio/__init__.py index f13d622b99f..42a0aa5c247 100644 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/aio/__init__.py +++ b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/aio/__init__.py @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.8, generator: @autorest/python@6.40.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. # -------------------------------------------------------------------------- # pylint: disable=wrong-import-position diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/aio/_client.py b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/aio/_client.py index e6a67458faa..e888fc5bb3f 100644 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/aio/_client.py +++ b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/aio/_client.py @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.8, generator: @autorest/python@6.40.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. # -------------------------------------------------------------------------- @@ -45,6 +45,8 @@ class ContainerRegistryManagementClient: # pylint: disable=too-many-instance-at :ivar archive_versions: ArchiveVersionsOperations operations :vartype archive_versions: container_registry_management_client.aio.operations.ArchiveVersionsOperations + :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 @@ -56,8 +58,6 @@ class ContainerRegistryManagementClient: # pylint: disable=too-many-instance-at :ivar export_pipelines: ExportPipelinesOperations operations :vartype export_pipelines: container_registry_management_client.aio.operations.ExportPipelinesOperations - :ivar registries: RegistriesOperations operations - :vartype registries: container_registry_management_client.aio.operations.RegistriesOperations :ivar import_pipelines: ImportPipelinesOperations operations :vartype import_pipelines: container_registry_management_client.aio.operations.ImportPipelinesOperations @@ -131,6 +131,7 @@ def __init__( self.archive_versions = ArchiveVersionsOperations( 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 @@ -139,7 +140,6 @@ def __init__( self.export_pipelines = ExportPipelinesOperations( self._client, self._config, self._serialize, self._deserialize ) - self.registries = RegistriesOperations(self._client, self._config, self._serialize, self._deserialize) self.import_pipelines = ImportPipelinesOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/aio/_configuration.py b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/aio/_configuration.py index 5ecf2d2842b..1575735b4ec 100644 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/aio/_configuration.py +++ b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/aio/_configuration.py @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.8, generator: @autorest/python@6.40.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/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/aio/operations/__init__.py b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/aio/operations/__init__.py index e6985603118..58e246b3c38 100644 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/aio/operations/__init__.py +++ b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/aio/operations/__init__.py @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.8, generator: @autorest/python@6.40.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. # -------------------------------------------------------------------------- # pylint: disable=wrong-import-position @@ -12,11 +12,11 @@ from ._operations import ArchivesOperations # type: ignore from ._operations import ArchiveVersionsOperations # 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 RegistriesOperations # type: ignore from ._operations import ImportPipelinesOperations # type: ignore from ._operations import Operations # type: ignore from ._operations import PipelineRunsOperations # type: ignore @@ -33,11 +33,11 @@ __all__ = [ "ArchivesOperations", "ArchiveVersionsOperations", + "RegistriesOperations", "CacheRulesOperations", "ConnectedRegistriesOperations", "CredentialSetsOperations", "ExportPipelinesOperations", - "RegistriesOperations", "ImportPipelinesOperations", "Operations", "PipelineRunsOperations", diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/aio/operations/_operations.py b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/aio/operations/_operations.py index 1f6716d9dcf..cda365abef0 100644 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/aio/operations/_operations.py +++ b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/aio/operations/_operations.py @@ -1,7 +1,7 @@ # pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.8, generator: @autorest/python@6.40.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. # -------------------------------------------------------------------------- from collections.abc import MutableMapping @@ -45,6 +45,7 @@ build_cache_rules_delete_request, build_cache_rules_get_request, build_cache_rules_list_request, + build_cache_rules_sync_cache_rule_request, build_cache_rules_update_request, build_connected_registries_create_request, build_connected_registries_deactivate_request, @@ -142,95 +143,6 @@ def __init__(self, *args, **kwargs) -> None: 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 type of the package resource. 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 @@ -242,7 +154,7 @@ async def get( :type resource_group_name: str :param registry_name: The name of the container registry. Required. :type registry_name: str - :param package_type: The type of the package resource. Required. + :param package_type: The type of the repository resource. Required. :type package_type: str :param archive_name: The name of the archive resource. Required. :type archive_name: str @@ -284,7 +196,10 @@ async def get( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("Archive", pipeline_response.http_response) @@ -353,7 +268,10 @@ async def _create_initial( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -388,7 +306,7 @@ async def begin_create( :type resource_group_name: str :param registry_name: The name of the container registry. Required. :type registry_name: str - :param package_type: The type of the package resource. Required. + :param package_type: The type of the repository resource. Required. :type package_type: str :param archive_name: The name of the archive resource. Required. :type archive_name: str @@ -422,7 +340,7 @@ async def begin_create( :type resource_group_name: str :param registry_name: The name of the container registry. Required. :type registry_name: str - :param package_type: The type of the package resource. Required. + :param package_type: The type of the repository resource. Required. :type package_type: str :param archive_name: The name of the archive resource. Required. :type archive_name: str @@ -454,7 +372,7 @@ async def begin_create( :type resource_group_name: str :param registry_name: The name of the container registry. Required. :type registry_name: str - :param package_type: The type of the package resource. Required. + :param package_type: The type of the repository resource. Required. :type package_type: str :param archive_name: The name of the archive resource. Required. :type archive_name: str @@ -517,123 +435,6 @@ def get_long_running_output(pipeline_response): 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, **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")) - - 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 type of the package resource. 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 - @overload async def update( self, @@ -653,7 +454,7 @@ async def update( :type resource_group_name: str :param registry_name: The name of the container registry. Required. :type registry_name: str - :param package_type: The type of the package resource. Required. + :param package_type: The type of the repository resource. Required. :type package_type: str :param archive_name: The name of the archive resource. Required. :type archive_name: str @@ -687,7 +488,7 @@ async def update( :type resource_group_name: str :param registry_name: The name of the container registry. Required. :type registry_name: str - :param package_type: The type of the package resource. Required. + :param package_type: The type of the repository resource. Required. :type package_type: str :param archive_name: The name of the archive resource. Required. :type archive_name: str @@ -718,7 +519,7 @@ async def update( :type resource_group_name: str :param registry_name: The name of the container registry. Required. :type registry_name: str - :param package_type: The type of the package resource. Required. + :param package_type: The type of the repository resource. Required. :type package_type: str :param archive_name: The name of the archive resource. Required. :type archive_name: str @@ -776,7 +577,10 @@ async def update( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("Archive", pipeline_response.http_response) @@ -786,54 +590,149 @@ async def update( return deserialized # 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( + async def _delete_initial( 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 type of the package resource. 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) - + ) -> 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")) + + 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 type of the repository resource. 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 + + @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 type of the repository resource. 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, @@ -845,11 +744,10 @@ def list( def prepare_request(next_link=None): if not next_link: - _request = build_archive_versions_list_request( + _request = build_archives_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, @@ -876,7 +774,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = self._deserialize( - _models._models.ArchiveVersionListResult, pipeline_response # pylint: disable=protected-access + _models._models.ArchiveListResult, pipeline_response # pylint: disable=protected-access ) list_of_elem = deserialized.value if cls: @@ -894,13 +792,38 @@ async def get_next(next_link=None): 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) + 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 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_async async def get( self, @@ -918,7 +841,7 @@ async def get( :type resource_group_name: str :param registry_name: The name of the container registry. Required. :type registry_name: str - :param package_type: The type of the package resource. Required. + :param package_type: The type of the repository resource. Required. :type package_type: str :param archive_name: The name of the archive resource. Required. :type archive_name: str @@ -963,7 +886,10 @@ async def get( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("ArchiveVersion", pipeline_response.http_response) @@ -1021,7 +947,10 @@ async def _create_initial( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -1054,7 +983,7 @@ async def begin_create( :type resource_group_name: str :param registry_name: The name of the container registry. Required. :type registry_name: str - :param package_type: The type of the package resource. Required. + :param package_type: The type of the repository resource. Required. :type package_type: str :param archive_name: The name of the archive resource. Required. :type archive_name: str @@ -1161,7 +1090,10 @@ async def _delete_initial( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -1192,7 +1124,7 @@ async def begin_delete( :type resource_group_name: str :param registry_name: The name of the container registry. Required. :type registry_name: str - :param package_type: The type of the package resource. Required. + :param package_type: The type of the repository resource. Required. :type package_type: str :param archive_name: The name of the archive resource. Required. :type archive_name: str @@ -1246,46 +1178,31 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- ) return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # 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. + 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 - :return: An iterator like instance of CacheRule + :param package_type: The type of the repository resource. 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.CacheRule] + ~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.CacheRulesListResult] = kwargs.pop("cls", None) + cls: ClsType[_models._models.ArchiveVersionListResult] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -1298,9 +1215,11 @@ def list(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> A def prepare_request(next_link=None): if not next_link: - _request = build_cache_rules_list_request( + _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, @@ -1327,7 +1246,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = self._deserialize( - _models._models.CacheRulesListResult, pipeline_response # pylint: disable=protected-access + _models._models.ArchiveVersionListResult, pipeline_response # pylint: disable=protected-access ) list_of_elem = deserialized.value if cls: @@ -1345,28 +1264,116 @@ async def get_next(next_link=None): 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) + 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. + +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_cache_rule_artifact_sync_estimate( + self, + resource_group_name: str, + registry_name: str, + cache_rule_parameters: _models.CacheRule, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CacheRuleArtifactSyncEstimateResult: + """Checks the contents of an upstream repository and executes the query of a cache rule's artifact + sync scope filter. :param resource_group_name: The name of the resource group. The name 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 + :param cache_rule_parameters: The cache rule resource. Required. + :type cache_rule_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: CacheRuleArtifactSyncEstimateResult + :rtype: ~container_registry_management_client.models.CacheRuleArtifactSyncEstimateResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def check_cache_rule_artifact_sync_estimate( + self, + resource_group_name: str, + registry_name: str, + cache_rule_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CacheRuleArtifactSyncEstimateResult: + """Checks the contents of an upstream repository and executes the query of a cache rule's artifact + sync scope filter. + + :param resource_group_name: The name of the resource group. The name 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_parameters: The cache rule resource. Required. + :type cache_rule_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: CacheRuleArtifactSyncEstimateResult + :rtype: ~container_registry_management_client.models.CacheRuleArtifactSyncEstimateResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def check_cache_rule_artifact_sync_estimate( + self, + resource_group_name: str, + registry_name: str, + cache_rule_parameters: Union[_models.CacheRule, IO[bytes]], + **kwargs: Any + ) -> _models.CacheRuleArtifactSyncEstimateResult: + """Checks the contents of an upstream repository and executes the query of a cache rule's artifact + sync scope filter. + + :param resource_group_name: The name of the resource group. The name 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_parameters: The cache rule resource. Is either a CacheRule type or a + IO[bytes] type. Required. + :type cache_rule_parameters: ~container_registry_management_client.models.CacheRule or + IO[bytes] + :return: CacheRuleArtifactSyncEstimateResult + :rtype: ~container_registry_management_client.models.CacheRuleArtifactSyncEstimateResult :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -1377,17 +1384,28 @@ async def get( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.CacheRule] = kwargs.pop("cls", None) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CacheRuleArtifactSyncEstimateResult] = kwargs.pop("cls", None) - _request = build_cache_rules_get_request( + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(cache_rule_parameters, (IOBase, bytes)): + _content = cache_rule_parameters + else: + _json = self._serialize.body(cache_rule_parameters, "CacheRule") + + _request = build_registries_check_cache_rule_artifact_sync_estimate_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, ) @@ -1402,22 +1420,24 @@ async def get( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize("CacheRule", pipeline_response.http_response) + deserialized = self._deserialize("CacheRuleArtifactSyncEstimateResult", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - async def _create_initial( + async def _import_image_initial( self, resource_group_name: str, registry_name: str, - cache_rule_name: str, - cache_rule_create_parameters: Union[_models.CacheRule, IO[bytes]], + parameters: Union[_models.ImportImageParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -1437,15 +1457,14 @@ async def _create_initial( content_type = content_type or "application/json" _json = None _content = None - if isinstance(cache_rule_create_parameters, (IOBase, bytes)): - _content = cache_rule_create_parameters + if isinstance(parameters, (IOBase, bytes)): + _content = parameters else: - _json = self._serialize.body(cache_rule_create_parameters, "CacheRule") + _json = self._serialize.body(parameters, "ImportImageParameters") - _request = build_cache_rules_create_request( + _request = build_registries_import_image_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, @@ -1463,20 +1482,17 @@ async def _create_initial( response = pipeline_response.http_response - if response.status_code not in [200, 201]: + 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) + raise HttpResponseError(response=response) response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) deserialized = response.iter_bytes() @@ -1486,108 +1502,97 @@ async def _create_initial( return deserialized # type: ignore @overload - async def begin_create( + async def begin_import_image( self, resource_group_name: str, registry_name: str, - cache_rule_name: str, - cache_rule_create_parameters: _models.CacheRule, + parameters: _models.ImportImageParameters, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.CacheRule]: - """Creates a cache rule for a container registry with the specified parameters. + ) -> 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 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 + :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 CacheRule - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.CacheRule] + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - async def begin_create( + async def begin_import_image( self, resource_group_name: str, registry_name: str, - cache_rule_name: str, - cache_rule_create_parameters: IO[bytes], + 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. + ) -> 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 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] + :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 CacheRule - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.CacheRule] + :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_create( + async def begin_import_image( self, resource_group_name: str, registry_name: str, - cache_rule_name: str, - cache_rule_create_parameters: Union[_models.CacheRule, IO[bytes]], + parameters: Union[_models.ImportImageParameters, IO[bytes]], **kwargs: Any - ) -> AsyncLROPoller[_models.CacheRule]: - """Creates a cache rule for a container registry with the specified parameters. + ) -> 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 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 + :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 CacheRule - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.CacheRule] + :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[_models.CacheRule] = kwargs.pop("cls", 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._create_initial( + raw_result = await self._import_image_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, + parameters=parameters, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, @@ -1597,35 +1602,84 @@ async def begin_create( 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) + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: AsyncPollingMethod = cast( AsyncPollingMethod, - AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + 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.CacheRule].from_continuation_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[_models.CacheRule]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) + return AsyncLROPoller[None](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]: + @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 object containing information for the availability + request. 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 object containing information for the availability + request. 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 object containing information for the availability + request. 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, @@ -1634,115 +1688,105 @@ async def _delete_initial( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.RegistryNameStatus] = 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, + 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 = True + _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 [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + 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) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + raise HttpResponseError(response=response) - deserialized = response.iter_bytes() + deserialized = self._deserialize("RegistryNameStatus", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore + return cls(pipeline_response, deserialized, {}) # 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. + 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 - :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] + :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[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) + cls: ClsType[_models.Registry] = kwargs.pop("cls", None) - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore + _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) - 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 + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) - 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 + 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) + raise HttpResponseError(response=response) + + 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, @@ -1761,15 +1805,14 @@ async def _update_initial( content_type = content_type or "application/json" _json = None _content = None - if isinstance(cache_rule_update_parameters, (IOBase, bytes)): - _content = cache_rule_update_parameters + if isinstance(registry, (IOBase, bytes)): + _content = registry else: - _json = self._serialize.body(cache_rule_update_parameters, "CacheRuleUpdateParameters") + _json = self._serialize.body(registry, "Registry") - _request = build_cache_rules_update_request( + _request = build_registries_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, @@ -1793,8 +1836,7 @@ async def _update_initial( 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) + raise HttpResponseError(response=response) response_headers = {} if response.status_code == 201: @@ -1810,109 +1852,93 @@ async def _update_initial( return deserialized # type: ignore @overload - async def begin_update( + async def begin_create( self, resource_group_name: str, registry_name: str, - cache_rule_name: str, - cache_rule_update_parameters: _models.CacheRuleUpdateParameters, + registry: _models.Registry, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.CacheRule]: - """Updates a cache rule for a container registry with the specified parameters. + ) -> 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 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 + :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 CacheRule + :return: An instance of AsyncLROPoller that returns Registry :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.CacheRule] + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Registry] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - async def begin_update( + async def begin_create( self, resource_group_name: str, registry_name: str, - cache_rule_name: str, - cache_rule_update_parameters: IO[bytes], + registry: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.CacheRule]: - """Updates a cache rule for a container registry with the specified parameters. + ) -> 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 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] + :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 CacheRule + :return: An instance of AsyncLROPoller that returns Registry :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.CacheRule] + ~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, - 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. + 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 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 + :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.CacheRule] + ~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.CacheRule] = kwargs.pop("cls", 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( + raw_result = await self._create_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, + registry=registry, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, @@ -1923,7 +1949,7 @@ async def begin_update( kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CacheRule", pipeline_response.http_response) + deserialized = self._deserialize("Registry", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -1938,132 +1964,48 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller[_models.CacheRule].from_continuation_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.CacheRule]( + 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 {}) -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. - """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} - models = _models + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - 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") + 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") - @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( + _request = build_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, @@ -2087,8 +2029,7 @@ async def _create_initial( 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) + raise HttpResponseError(response=response) response_headers = {} if response.status_code == 201: @@ -2104,111 +2045,99 @@ async def _create_initial( return deserialized # type: ignore @overload - async def begin_create( + async def begin_update( self, resource_group_name: str, registry_name: str, - connected_registry_name: str, - connected_registry_create_parameters: _models.ConnectedRegistry, + registry_update_parameters: _models.RegistryUpdateParameters, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.ConnectedRegistry]: - """Creates a connected registry for a container registry with the specified parameters. + ) -> 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 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 + :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 ConnectedRegistry + :return: An instance of AsyncLROPoller that returns Registry :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.ConnectedRegistry] + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Registry] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - async def begin_create( + async def begin_update( self, resource_group_name: str, registry_name: str, - connected_registry_name: str, - connected_registry_create_parameters: IO[bytes], + registry_update_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. + ) -> 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 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] + :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 ConnectedRegistry + :return: An instance of AsyncLROPoller that returns Registry :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.ConnectedRegistry] + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Registry] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async - async def begin_create( + async def begin_update( self, resource_group_name: str, registry_name: str, - connected_registry_name: str, - connected_registry_create_parameters: Union[_models.ConnectedRegistry, IO[bytes]], + registry_update_parameters: Union[_models.RegistryUpdateParameters, IO[bytes]], **kwargs: Any - ) -> AsyncLROPoller[_models.ConnectedRegistry]: - """Creates a connected registry for a container registry with the specified parameters. + ) -> 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 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 + :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.ConnectedRegistry] + ~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.ConnectedRegistry] = kwargs.pop("cls", 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( + raw_result = await self._update_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, + registry_update_parameters=registry_update_parameters, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, @@ -2219,7 +2148,7 @@ async def begin_create( kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ConnectedRegistry", pipeline_response.http_response) + deserialized = self._deserialize("Registry", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -2234,23 +2163,18 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller[_models.ConnectedRegistry].from_continuation_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.ConnectedRegistry]( + 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, - connected_registry_name: str, - connected_registry_update_parameters: Union[_models.ConnectedRegistryUpdateParameters, IO[bytes]], - **kwargs: Any + async def _delete_initial( + self, resource_group_name: str, registry_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -2260,29 +2184,16 @@ async def _update_initial( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = 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( + _request = build_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, - content_type=content_type, api_version=self._config.api_version, - json=_json, - content=_content, headers=_headers, params=_params, ) @@ -2295,20 +2206,17 @@ async def _update_initial( response = pipeline_response.http_response - if response.status_code not in [200, 201]: + 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) + raise HttpResponseError(response=response) response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) deserialized = response.iter_bytes() @@ -2317,220 +2225,21 @@ async def _update_initial( 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. + @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 - :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] + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] :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")) - - 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 {} + _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) @@ -2540,7 +2249,6 @@ async def begin_delete( 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, @@ -2572,30 +2280,21 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @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. + 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 - :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 + :return: An iterator like instance of Registry :rtype: - ~azure.core.async_paging.AsyncItemPaged[~container_registry_management_client.models.ConnectedRegistry] + ~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.ConnectedRegistryListResult] = kwargs.pop("cls", None) + cls: ClsType[_models._models.RegistryListResult] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -2608,11 +2307,9 @@ def list( def prepare_request(next_link=None): if not next_link: - _request = build_connected_registries_list_request( + _request = build_registries_list_by_resource_group_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, @@ -2638,7 +2335,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = self._deserialize( - _models._models.ConnectedRegistryListResult, pipeline_response # pylint: disable=protected-access + _models._models.RegistryListResult, pipeline_response # pylint: disable=protected-access ) list_of_elem = deserialized.value if cls: @@ -2656,16 +2353,26 @@ async def get_next(next_link=None): 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) + raise HttpResponseError(response=response) return pipeline_response return AsyncItemPaged(get_next, extract_data) - async def _deactivate_initial( - self, resource_group_name: str, registry_name: str, connected_registry_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: + @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, @@ -2674,248 +2381,37 @@ async def _deactivate_initial( } 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) + def prepare_request(next_link=None): + if not next_link: - _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) + _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) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) + 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) - 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")) - - 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 - ) -> None: - """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: None - :rtype: None - :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[None] = 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) - - if cls: - return cls(pipeline_response, None, {}) # 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 + return _request async def extract_data(pipeline_response): deserialized = self._deserialize( - _models._models.CredentialSetListResult, pipeline_response # pylint: disable=protected-access + _models._models.RegistryListResult, pipeline_response # pylint: disable=protected-access ) list_of_elem = deserialized.value if cls: @@ -2933,28 +2429,25 @@ async def get_next(next_link=None): 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) + raise HttpResponseError(response=response) 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. + 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 - :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 + :return: RegistryListCredentialsResult + :rtype: ~container_registry_management_client.models.RegistryListCredentialsResult :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -2968,12 +2461,11 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.CredentialSet] = kwargs.pop("cls", None) + cls: ClsType[_models.RegistryListCredentialsResult] = kwargs.pop("cls", None) - _request = build_credential_sets_get_request( + _request = build_registries_list_credentials_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, @@ -2990,233 +2482,96 @@ async def get( 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) + raise HttpResponseError(response=response) - deserialized = self._deserialize("CredentialSet", pipeline_response.http_response) + deserialized = self._deserialize("RegistryListCredentialsResult", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - async def _create_initial( + @overload + async def regenerate_credential( self, resource_group_name: str, registry_name: str, - credential_set_name: str, - credential_set_create_parameters: Union[_models.CredentialSet, IO[bytes]], + regenerate_credential_parameters: _models.RegenerateCredentialParameters, + *, + content_type: str = "application/json", **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") - ) - - 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. + ) -> _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 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 + :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: An instance of AsyncLROPoller that returns CredentialSet - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.CredentialSet] + :return: RegistryListCredentialsResult + :rtype: ~container_registry_management_client.models.RegistryListCredentialsResult :raises ~azure.core.exceptions.HttpResponseError: """ @overload - async def begin_create( + async def regenerate_credential( self, resource_group_name: str, registry_name: str, - credential_set_name: str, - credential_set_create_parameters: IO[bytes], + regenerate_credential_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. + ) -> _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 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] + :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: An instance of AsyncLROPoller that returns CredentialSet - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.CredentialSet] + :return: RegistryListCredentialsResult + :rtype: ~container_registry_management_client.models.RegistryListCredentialsResult :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async - async def begin_create( + async def regenerate_credential( self, resource_group_name: str, registry_name: str, - credential_set_name: str, - credential_set_create_parameters: Union[_models.CredentialSet, IO[bytes]], + regenerate_credential_parameters: Union[_models.RegenerateCredentialParameters, IO[bytes]], **kwargs: Any - ) -> AsyncLROPoller[_models.CredentialSet]: - """Creates a credential set for a container registry with the specified parameters. + ) -> _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 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] + :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: """ - _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 _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, @@ -3225,114 +2580,260 @@ async def _delete_initial( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.RegistryListCredentialsResult] = kwargs.pop("cls", None) - _request = build_credential_sets_delete_request( + 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, - 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 + _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 [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + 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) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + raise HttpResponseError(response=response) - deserialized = response.iter_bytes() + deserialized = self._deserialize("RegistryListCredentialsResult", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore + return cls(pipeline_response, deserialized, {}) # 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. + 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 - :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] + :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[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) + cls: ClsType[_models.RegistryUsageListResult] = kwargs.pop("cls", None) - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + _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) + raise HttpResponseError(response=response) + + 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: - return cls(pipeline_response, None, {}) # type: ignore + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, - AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs), + 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 ) - 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, + 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) + raise HttpResponseError(response=response) + + 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 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, ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + raise HttpResponseError(response=response, model=error) - async def _update_initial( + deserialized = self._deserialize("PrivateLinkResource", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _generate_credentials_initial( self, resource_group_name: str, registry_name: str, - credential_set_name: str, - credential_set_update_parameters: Union[_models.CredentialSetUpdateParameters, IO[bytes]], + generate_credentials_parameters: Union[_models.GenerateCredentialsParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -3352,15 +2853,14 @@ async def _update_initial( content_type = content_type or "application/json" _json = None _content = None - if isinstance(credential_set_update_parameters, (IOBase, bytes)): - _content = credential_set_update_parameters + if isinstance(generate_credentials_parameters, (IOBase, bytes)): + _content = generate_credentials_parameters else: - _json = self._serialize.body(credential_set_update_parameters, "CredentialSetUpdateParameters") + _json = self._serialize.body(generate_credentials_parameters, "GenerateCredentialsParameters") - _request = build_credential_sets_update_request( + _request = build_registries_generate_credentials_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, @@ -3378,20 +2878,21 @@ async def _update_initial( response = pipeline_response.http_response - if response.status_code not in [200, 201]: + 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) + 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") - ) + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) deserialized = response.iter_bytes() @@ -3401,111 +2902,99 @@ async def _update_initial( return deserialized # type: ignore @overload - async def begin_update( + async def begin_generate_credentials( self, resource_group_name: str, registry_name: str, - credential_set_name: str, - credential_set_update_parameters: _models.CredentialSetUpdateParameters, + generate_credentials_parameters: _models.GenerateCredentialsParameters, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.CredentialSet]: - """Updates a credential set for a container registry with the specified parameters. + ) -> 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 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 + :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 CredentialSet + :return: An instance of AsyncLROPoller that returns GenerateCredentialsResult :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.CredentialSet] + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.GenerateCredentialsResult] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - async def begin_update( + async def begin_generate_credentials( self, resource_group_name: str, registry_name: str, - credential_set_name: str, - credential_set_update_parameters: IO[bytes], + generate_credentials_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. + ) -> 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 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] + :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 CredentialSet + :return: An instance of AsyncLROPoller that returns GenerateCredentialsResult :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.CredentialSet] + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.GenerateCredentialsResult] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async - async def begin_update( + async def begin_generate_credentials( self, resource_group_name: str, registry_name: str, - credential_set_name: str, - credential_set_update_parameters: Union[_models.CredentialSetUpdateParameters, IO[bytes]], + generate_credentials_parameters: Union[_models.GenerateCredentialsParameters, IO[bytes]], **kwargs: Any - ) -> AsyncLROPoller[_models.CredentialSet]: - """Updates a credential set for a container registry with the specified parameters. + ) -> 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 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 + :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.CredentialSet] + ~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.CredentialSet] = kwargs.pop("cls", 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._update_initial( + raw_result = await self._generate_credentials_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, + generate_credentials_parameters=generate_credentials_parameters, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, @@ -3516,7 +3005,7 @@ async def begin_update( kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CredentialSet", pipeline_response.http_response) + deserialized = self._deserialize("GenerateCredentialsResult", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -3524,32 +3013,32 @@ def get_long_running_output(pipeline_response): if polling is True: polling_method: AsyncPollingMethod = cast( AsyncPollingMethod, - AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + 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.CredentialSet].from_continuation_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.CredentialSet]( + return AsyncLROPoller[_models.GenerateCredentialsResult]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) -class ExportPipelinesOperations: +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:`export_pipelines` attribute. + :attr:`cache_rules` attribute. """ models = _models @@ -3563,107 +3052,21 @@ def __init__(self, *args, **kwargs) -> None: 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. + 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 export_pipeline_name: The name of the export pipeline. Required. - :type export_pipeline_name: str - :return: ExportPipeline - :rtype: ~container_registry_management_client.models.ExportPipeline + :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 = { @@ -3677,12 +3080,12 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.ExportPipeline] = kwargs.pop("cls", None) + cls: ClsType[_models.CacheRule] = kwargs.pop("cls", None) - _request = build_export_pipelines_get_request( + _request = build_cache_rules_get_request( resource_group_name=resource_group_name, registry_name=registry_name, - export_pipeline_name=export_pipeline_name, + cache_rule_name=cache_rule_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -3699,10 +3102,13 @@ async def get( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize("ExportPipeline", pipeline_response.http_response) + deserialized = self._deserialize("CacheRule", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -3713,8 +3119,8 @@ 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]], + cache_rule_name: str, + cache_rule_create_parameters: Union[_models.CacheRule, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -3734,15 +3140,15 @@ async def _create_initial( content_type = content_type or "application/json" _json = None _content = None - if isinstance(export_pipeline_create_parameters, (IOBase, bytes)): - _content = export_pipeline_create_parameters + if isinstance(cache_rule_create_parameters, (IOBase, bytes)): + _content = cache_rule_create_parameters else: - _json = self._serialize.body(export_pipeline_create_parameters, "ExportPipeline") + _json = self._serialize.body(cache_rule_create_parameters, "CacheRule") - _request = build_export_pipelines_create_request( + _request = build_cache_rules_create_request( resource_group_name=resource_group_name, registry_name=registry_name, - export_pipeline_name=export_pipeline_name, + cache_rule_name=cache_rule_name, subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -3766,7 +3172,10 @@ async def _create_initial( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -3787,31 +3196,29 @@ async def begin_create( self, resource_group_name: str, registry_name: str, - export_pipeline_name: str, - export_pipeline_create_parameters: _models.ExportPipeline, + cache_rule_name: str, + cache_rule_create_parameters: _models.CacheRule, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.ExportPipeline]: - """Creates an export pipeline for a container registry with the specified parameters. + ) -> 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 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 + :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 ExportPipeline + :return: An instance of AsyncLROPoller that returns CacheRule :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.ExportPipeline] + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.CacheRule] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -3820,30 +3227,29 @@ async def begin_create( self, resource_group_name: str, registry_name: str, - export_pipeline_name: str, - export_pipeline_create_parameters: IO[bytes], + cache_rule_name: str, + cache_rule_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. + ) -> 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 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] + :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 ExportPipeline + :return: An instance of AsyncLROPoller that returns CacheRule :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.ExportPipeline] + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.CacheRule] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -3852,33 +3258,33 @@ 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]], + cache_rule_name: str, + cache_rule_create_parameters: Union[_models.CacheRule, IO[bytes]], **kwargs: Any - ) -> AsyncLROPoller[_models.ExportPipeline]: - """Creates an export pipeline for a container registry with the specified parameters. + ) -> 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 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 + :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.ExportPipeline] + ~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.ExportPipeline] = kwargs.pop("cls", 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) @@ -3886,8 +3292,8 @@ async def begin_create( 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, + 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, @@ -3898,7 +3304,7 @@ async def begin_create( kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ExportPipeline", pipeline_response.http_response) + deserialized = self._deserialize("CacheRule", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -3913,18 +3319,666 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller[_models.ExportPipeline].from_continuation_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.ExportPipeline]( + 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, export_pipeline_name: str, **kwargs: Any + 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") + ) + + 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")) + + 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 + + @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) + + @overload + async def sync_cache_rule( + self, + resource_group_name: str, + registry_name: str, + cache_rule_name: str, + sync_tag_parameters: _models.CacheRuleSyncParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> None: + """sync_cache_rule. + + :param resource_group_name: The name of the resource group. The name 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 sync_tag_parameters: Required. + :type sync_tag_parameters: ~container_registry_management_client.models.CacheRuleSyncParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def sync_cache_rule( + self, + resource_group_name: str, + registry_name: str, + cache_rule_name: str, + sync_tag_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> None: + """sync_cache_rule. + + :param resource_group_name: The name of the resource group. The name 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 sync_tag_parameters: Required. + :type sync_tag_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: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def sync_cache_rule( + self, + resource_group_name: str, + registry_name: str, + cache_rule_name: str, + sync_tag_parameters: Union[_models.CacheRuleSyncParameters, IO[bytes]], + **kwargs: Any + ) -> None: + """sync_cache_rule. + + :param resource_group_name: The name of the resource group. The name 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 sync_tag_parameters: Is either a CacheRuleSyncParameters type or a IO[bytes] type. + Required. + :type sync_tag_parameters: ~container_registry_management_client.models.CacheRuleSyncParameters + or IO[bytes] + :return: None + :rtype: None + :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[None] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(sync_tag_parameters, (IOBase, bytes)): + _content = sync_tag_parameters + else: + _json = self._serialize.body(sync_tag_parameters, "CacheRuleSyncParameters") + + _request = build_cache_rules_sync_cache_rule_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 = 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) + + if cls: + return cls(pipeline_response, None, {}) # 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_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, @@ -3934,17 +3988,29 @@ async def _delete_initial( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) 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) - _request = build_export_pipelines_delete_request( + 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, - export_pipeline_name=export_pipeline_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, ) @@ -3957,18 +4023,23 @@ async def _delete_initial( response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: + 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) + 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")) + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) deserialized = response.iter_bytes() @@ -3977,35 +4048,113 @@ async def _delete_initial( 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_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. + 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 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] + :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 = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - cls: ClsType[None] = kwargs.pop("cls", None) + 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._delete_initial( + raw_result = await self._create_initial( resource_group_name=resource_group_name, registry_name=registry_name, - export_pipeline_name=export_pipeline_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, @@ -4014,55 +4163,38 @@ async def begin_delete( 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 + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("ConnectedRegistry", pipeline_response.http_response) if cls: - return cls(pipeline_response, None, {}) # type: ignore + 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), + 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[None].from_continuation_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[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - -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") + return AsyncLROPoller[_models.ConnectedRegistry]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - 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") - async def _import_image_initial( + async def _update_initial( self, resource_group_name: str, registry_name: str, - parameters: Union[_models.ImportImageParameters, IO[bytes]], + connected_registry_name: str, + connected_registry_update_parameters: Union[_models.ConnectedRegistryUpdateParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -4082,14 +4214,15 @@ async def _import_image_initial( content_type = content_type or "application/json" _json = None _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters + if isinstance(connected_registry_update_parameters, (IOBase, bytes)): + _content = connected_registry_update_parameters else: - _json = self._serialize.body(parameters, "ImportImageParameters") + _json = self._serialize.body(connected_registry_update_parameters, "ConnectedRegistryUpdateParameters") - _request = build_registries_import_image_request( + _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, @@ -4107,17 +4240,23 @@ async def _import_image_initial( response = pipeline_response.http_response - if response.status_code not in [200, 202]: + 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) - raise HttpResponseError(response=response) + 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")) + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) deserialized = response.iter_bytes() @@ -4127,97 +4266,111 @@ async def _import_image_initial( return deserialized # type: ignore @overload - async def begin_import_image( + async def begin_update( self, resource_group_name: str, registry_name: str, - parameters: _models.ImportImageParameters, + connected_registry_name: str, + connected_registry_update_parameters: _models.ConnectedRegistryUpdateParameters, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[None]: - """Copies an image to this container registry from the specified container registry. + ) -> 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 parameters: The parameters specifying the image to copy and the source container - registry. Required. - :type parameters: ~container_registry_management_client.models.ImportImageParameters + :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 None - :rtype: ~azure.core.polling.AsyncLROPoller[None] + :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_import_image( + async def begin_update( self, resource_group_name: str, registry_name: str, - parameters: IO[bytes], + connected_registry_name: str, + connected_registry_update_parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[None]: - """Copies an image to this container registry from the specified container registry. + ) -> 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 parameters: The parameters specifying the image to copy and the source container - registry. Required. - :type parameters: IO[bytes] + :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 None - :rtype: ~azure.core.polling.AsyncLROPoller[None] + :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_import_image( + async def begin_update( self, resource_group_name: str, registry_name: str, - parameters: Union[_models.ImportImageParameters, IO[bytes]], + connected_registry_name: str, + connected_registry_update_parameters: Union[_models.ConnectedRegistryUpdateParameters, IO[bytes]], **kwargs: Any - ) -> AsyncLROPoller[None]: - """Copies an image to this container registry from the specified container registry. + ) -> 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 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] + :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[None] = kwargs.pop("cls", 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._import_image_initial( + raw_result = await self._update_initial( resource_group_name=resource_group_name, registry_name=registry_name, - parameters=parameters, + 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, @@ -4227,84 +4380,35 @@ async def begin_import_image( 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 + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("ConnectedRegistry", pipeline_response.http_response) if cls: - return cls(pipeline_response, None, {}) # type: ignore + 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), + 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[None].from_continuation_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[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @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 object containing information for the availability - request. 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 object containing information for the availability - request. 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. + return AsyncLROPoller[_models.ConnectedRegistry]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - :param registry_name_check_request: The object containing information for the availability - request. 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: - """ + 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, @@ -4313,141 +4417,136 @@ async def check_name_availability( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = 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") + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_registries_check_name_availability_request( + _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, - 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 + _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]: + 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) - raise HttpResponseError(response=response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize("RegistryNameStatus", pipeline_response.http_response) + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # 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. + @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. - :return: An iterator like instance of Registry - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~container_registry_management_client.models.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[_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 + 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 ) - 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) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) - async def get_next(next_link=None): - _request = prepare_request(next_link) + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "location"}, **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) - raise HttpResponseError(response=response) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) + 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 - 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. + 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 - :return: An iterator like instance of Registry + :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.Registry] + ~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.RegistryListResult] = kwargs.pop("cls", None) + cls: ClsType[_models._models.ConnectedRegistryListResult] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -4460,9 +4559,11 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy def prepare_request(next_link=None): if not next_link: - _request = build_registries_list_by_resource_group_request( + _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, @@ -4488,7 +4589,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = self._deserialize( - _models._models.RegistryListResult, pipeline_response # pylint: disable=protected-access + _models._models.ConnectedRegistryListResult, pipeline_response # pylint: disable=protected-access ) list_of_elem = deserialized.value if cls: @@ -4506,23 +4607,147 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) return pipeline_response return AsyncItemPaged(get_next, extract_data) + 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")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + @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. + 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 - :return: Registry - :rtype: ~container_registry_management_client.models.Registry + :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 = { @@ -4536,11 +4761,12 @@ async def get(self, resource_group_name: str, registry_name: str, **kwargs: Any) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.Registry] = kwargs.pop("cls", None) + cls: ClsType[_models.ConnectedRegistry] = kwargs.pop("cls", None) - _request = build_registries_get_request( + _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, @@ -4557,9 +4783,98 @@ async def get(self, resource_group_name: str, registry_name: str, **kwargs: Any) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize("Registry", pipeline_response.http_response) + 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_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 @@ -4567,7 +4882,12 @@ async def get(self, resource_group_name: str, registry_name: str, **kwargs: Any) return deserialized # type: ignore async def _create_initial( - self, resource_group_name: str, registry_name: str, registry: Union[_models.Registry, IO[bytes]], **kwargs: Any + 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, @@ -4586,14 +4906,15 @@ async def _create_initial( content_type = content_type or "application/json" _json = None _content = None - if isinstance(registry, (IOBase, bytes)): - _content = registry + if isinstance(credential_set_create_parameters, (IOBase, bytes)): + _content = credential_set_create_parameters else: - _json = self._serialize.body(registry, "Registry") + _json = self._serialize.body(credential_set_create_parameters, "CredentialSet") - _request = build_registries_create_request( + _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, @@ -4617,7 +4938,11 @@ async def _create_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) response_headers = {} if response.status_code == 201: @@ -4637,26 +4962,31 @@ async def begin_create( self, resource_group_name: str, registry_name: str, - registry: _models.Registry, + credential_set_name: str, + credential_set_create_parameters: _models.CredentialSet, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.Registry]: - """Creates a container registry with the specified parameters. + ) -> 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 registry: The parameters for creating a container registry. Required. - :type registry: ~container_registry_management_client.models.Registry + :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 Registry + :return: An instance of AsyncLROPoller that returns CredentialSet :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Registry] + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.CredentialSet] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -4665,53 +4995,65 @@ async def begin_create( self, resource_group_name: str, registry_name: str, - registry: IO[bytes], + credential_set_name: str, + credential_set_create_parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.Registry]: - """Creates a container registry with the specified parameters. + ) -> 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 registry: The parameters for creating a container registry. Required. - :type registry: IO[bytes] + :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 Registry + :return: An instance of AsyncLROPoller that returns CredentialSet :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Registry] + ~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, registry: Union[_models.Registry, IO[bytes]], **kwargs: Any - ) -> AsyncLROPoller[_models.Registry]: - """Creates a container registry with the specified parameters. + 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 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 + :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.Registry] + ~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.Registry] = kwargs.pop("cls", 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) @@ -4719,7 +5061,8 @@ async def begin_create( raw_result = await self._create_initial( resource_group_name=resource_group_name, registry_name=registry_name, - registry=registry, + 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, @@ -4730,7 +5073,7 @@ async def begin_create( kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Registry", pipeline_response.http_response) + deserialized = self._deserialize("CredentialSet", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -4745,127 +5088,22 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller[_models.Registry].from_continuation_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.Registry]( + 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, **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) - raise HttpResponseError(response=response) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - 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 _update_initial( self, resource_group_name: str, registry_name: str, - registry_update_parameters: Union[_models.RegistryUpdateParameters, IO[bytes]], + credential_set_name: str, + credential_set_update_parameters: Union[_models.CredentialSetUpdateParameters, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -4885,14 +5123,15 @@ async def _update_initial( content_type = content_type or "application/json" _json = None _content = None - if isinstance(registry_update_parameters, (IOBase, bytes)): - _content = registry_update_parameters + if isinstance(credential_set_update_parameters, (IOBase, bytes)): + _content = credential_set_update_parameters else: - _json = self._serialize.body(registry_update_parameters, "RegistryUpdateParameters") + _json = self._serialize.body(credential_set_update_parameters, "CredentialSetUpdateParameters") - _request = build_registries_update_request( + _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, @@ -4916,7 +5155,11 @@ async def _update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) response_headers = {} if response.status_code == 201: @@ -4936,27 +5179,31 @@ async def begin_update( self, resource_group_name: str, registry_name: str, - registry_update_parameters: _models.RegistryUpdateParameters, + credential_set_name: str, + credential_set_update_parameters: _models.CredentialSetUpdateParameters, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.Registry]: - """Updates a container registry with the specified parameters. + ) -> 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 registry_update_parameters: The parameters for updating a container registry. Required. - :type registry_update_parameters: - ~container_registry_management_client.models.RegistryUpdateParameters + :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 Registry + :return: An instance of AsyncLROPoller that returns CredentialSet :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Registry] + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.CredentialSet] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -4965,26 +5212,30 @@ async def begin_update( self, resource_group_name: str, registry_name: str, - registry_update_parameters: IO[bytes], + credential_set_name: str, + credential_set_update_parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.Registry]: - """Updates a container registry with the specified parameters. + ) -> 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 registry_update_parameters: The parameters for updating a container registry. Required. - :type registry_update_parameters: IO[bytes] + :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 Registry + :return: An instance of AsyncLROPoller that returns CredentialSet :rtype: - ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.Registry] + ~azure.core.polling.AsyncLROPoller[~container_registry_management_client.models.CredentialSet] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -4993,30 +5244,33 @@ async def begin_update( self, resource_group_name: str, registry_name: str, - registry_update_parameters: Union[_models.RegistryUpdateParameters, IO[bytes]], + credential_set_name: str, + credential_set_update_parameters: Union[_models.CredentialSetUpdateParameters, IO[bytes]], **kwargs: Any - ) -> AsyncLROPoller[_models.Registry]: - """Updates a container registry with the specified parameters. + ) -> 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 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 + :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.Registry] + ~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.Registry] = kwargs.pop("cls", 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) @@ -5024,7 +5278,8 @@ async def begin_update( raw_result = await self._update_initial( resource_group_name=resource_group_name, registry_name=registry_name, - registry_update_parameters=registry_update_parameters, + 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, @@ -5035,7 +5290,7 @@ async def begin_update( kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Registry", pipeline_response.http_response) + deserialized = self._deserialize("CredentialSet", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -5050,31 +5305,19 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller[_models.Registry].from_continuation_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.Registry]( + return AsyncLROPoller[_models.CredentialSet]( self._client, raw_result, get_long_running_output, polling_method # 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: - """ + 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, @@ -5086,11 +5329,12 @@ async def list_usages( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.RegistryUsageListResult] = kwargs.pop("cls", None) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_registries_list_usages_request( + _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, @@ -5098,44 +5342,115 @@ async def list_usages( ) _request.url = self._client.format_url(_request.url) - _stream = False + _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]: + 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) - raise HttpResponseError(response=response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize("RegistryUsageListResult", pipeline_response.http_response) + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + 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 + @distributed_trace - def list_private_link_resources( + def list( self, resource_group_name: str, registry_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.PrivateLinkResource"]: - """Lists the private link resources for a container registry. + ) -> 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 PrivateLinkResource + :return: An iterator like instance of CredentialSet :rtype: - ~azure.core.async_paging.AsyncItemPaged[~container_registry_management_client.models.PrivateLinkResource] + ~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.PrivateLinkResourceListResult] = kwargs.pop("cls", None) + cls: ClsType[_models._models.CredentialSetListResult] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -5148,7 +5463,7 @@ def list_private_link_resources( def prepare_request(next_link=None): if not next_link: - _request = build_registries_list_private_link_resources_request( + _request = build_credential_sets_list_request( resource_group_name=resource_group_name, registry_name=registry_name, subscription_id=self._config.subscription_id, @@ -5177,7 +5492,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = self._deserialize( - _models._models.PrivateLinkResourceListResult, pipeline_response # pylint: disable=protected-access + _models._models.CredentialSetListResult, pipeline_response # pylint: disable=protected-access ) list_of_elem = deserialized.value if cls: @@ -5195,150 +5510,53 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) + 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 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 check_cache_rule_artifact_sync_estimate( - self, - resource_group_name: str, - registry_name: str, - cache_rule_parameters: _models.CacheRule, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CacheRuleArtifactSyncEstimateResult: - """Checks the upstream repository for artifacts that match the cache rule's sync scope filter and - estimates the number of artifacts that would be synchronized if the rule is applied. - :param resource_group_name: The name of the resource group. The name 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_parameters: The cache rule resource. Required. - :type cache_rule_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: CacheRuleArtifactSyncEstimateResult - :rtype: ~container_registry_management_client.models.CacheRuleArtifactSyncEstimateResult - :raises ~azure.core.exceptions.HttpResponseError: - """ +class ExportPipelinesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - @overload - async def check_cache_rule_artifact_sync_estimate( - self, - resource_group_name: str, - registry_name: str, - cache_rule_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CacheRuleArtifactSyncEstimateResult: - """Checks the upstream repository for artifacts that match the cache rule's sync scope filter and - estimates the number of artifacts that would be synchronized if the rule is applied. + Instead, you should access the following operations through + :class:`~container_registry_management_client.aio.ContainerRegistryManagementClient`'s + :attr:`export_pipelines` attribute. + """ - :param resource_group_name: The name of the resource group. The name 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_parameters: The cache rule resource. Required. - :type cache_rule_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: CacheRuleArtifactSyncEstimateResult - :rtype: ~container_registry_management_client.models.CacheRuleArtifactSyncEstimateResult - :raises ~azure.core.exceptions.HttpResponseError: - """ + models = _models - @distributed_trace_async - async def check_cache_rule_artifact_sync_estimate( - self, - resource_group_name: str, - registry_name: str, - cache_rule_parameters: Union[_models.CacheRule, IO[bytes]], - **kwargs: Any - ) -> _models.CacheRuleArtifactSyncEstimateResult: - """Checks the upstream repository for artifacts that match the cache rule's sync scope filter and - estimates the number of artifacts that would be synchronized if the rule is applied. + 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_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 cache_rule_parameters: The cache rule resource. Is either a CacheRule type or a - IO[bytes] type. Required. - :type cache_rule_parameters: ~container_registry_management_client.models.CacheRule or - IO[bytes] - :return: CacheRuleArtifactSyncEstimateResult - :rtype: ~container_registry_management_client.models.CacheRuleArtifactSyncEstimateResult + :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 = { @@ -5349,28 +5567,17 @@ async def check_cache_rule_artifact_sync_estimate( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = 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.CacheRuleArtifactSyncEstimateResult] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(cache_rule_parameters, (IOBase, bytes)): - _content = cache_rule_parameters - else: - _json = self._serialize.body(cache_rule_parameters, "CacheRule") + cls: ClsType[_models.ExportPipeline] = kwargs.pop("cls", None) - _request = build_registries_check_cache_rule_artifact_sync_estimate_request( + _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, - content_type=content_type, api_version=self._config.api_version, - json=_json, - content=_content, headers=_headers, params=_params, ) @@ -5385,31 +5592,27 @@ async def check_cache_rule_artifact_sync_estimate( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize("CacheRuleArtifactSyncEstimateResult", pipeline_response.http_response) + deserialized = self._deserialize("ExportPipeline", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # 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: - """ + 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, @@ -5418,179 +5621,209 @@ async def list_credentials( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.RegistryListCredentialsResult] = kwargs.pop("cls", None) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_registries_list_credentials_request( + 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 = False + _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]: + 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) - raise HttpResponseError(response=response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize("RegistryListCredentialsResult", pipeline_response.http_response) + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + + deserialized = response.iter_bytes() if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore @overload - async def regenerate_credential( + async def begin_create( self, resource_group_name: str, registry_name: str, - regenerate_credential_parameters: _models.RegenerateCredentialParameters, + export_pipeline_name: str, + export_pipeline_create_parameters: _models.ExportPipeline, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.RegistryListCredentialsResult: - """Regenerates one of the login credentials for the specified container registry. + ) -> 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 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 + :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: RegistryListCredentialsResult - :rtype: ~container_registry_management_client.models.RegistryListCredentialsResult + :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 regenerate_credential( + async def begin_create( self, resource_group_name: str, registry_name: str, - regenerate_credential_parameters: IO[bytes], + export_pipeline_name: str, + export_pipeline_create_parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.RegistryListCredentialsResult: - """Regenerates one of the login credentials for the specified container registry. + ) -> 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 regenerate_credential_parameters: Specifies name of the password which should be - regenerated -- password or password2. Required. - :type regenerate_credential_parameters: IO[bytes] + :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: RegistryListCredentialsResult - :rtype: ~container_registry_management_client.models.RegistryListCredentialsResult + :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 regenerate_credential( + async def begin_create( self, resource_group_name: str, registry_name: str, - regenerate_credential_parameters: Union[_models.RegenerateCredentialParameters, IO[bytes]], + export_pipeline_name: str, + export_pipeline_create_parameters: Union[_models.ExportPipeline, IO[bytes]], **kwargs: Any - ) -> _models.RegistryListCredentialsResult: - """Regenerates one of the login credentials for the specified container registry. + ) -> 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 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 + :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: """ - 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) - raise HttpResponseError(response=response) - - deserialized = self._deserialize("RegistryListCredentialsResult", pipeline_response.http_response) + 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) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + 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 - return deserialized # type: ignore + 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 _generate_credentials_initial( - self, - resource_group_name: str, - registry_name: str, - generate_credentials_parameters: Union[_models.GenerateCredentialsParameters, IO[bytes]], - **kwargs: Any + 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, @@ -5600,28 +5833,17 @@ async def _generate_credentials_initial( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = 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( + _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, - content_type=content_type, api_version=self._config.api_version, - json=_json, - content=_content, headers=_headers, params=_params, ) @@ -5634,13 +5856,16 @@ async def _generate_credentials_initial( response = pipeline_response.http_response - if response.status_code not in [200, 202]: + 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -5654,101 +5879,35 @@ async def _generate_credentials_initial( 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. + 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 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] + :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 = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = 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) + 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._generate_credentials_initial( + raw_result = await self._delete_initial( resource_group_name=resource_group_name, registry_name=registry_name, - generate_credentials_parameters=generate_credentials_parameters, - content_type=content_type, + export_pipeline_name=export_pipeline_name, cls=lambda x, y, z: x, headers=_headers, params=_params, @@ -5757,11 +5916,9 @@ async def begin_generate_credentials( 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) + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: AsyncPollingMethod = cast( @@ -5773,58 +5930,34 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller[_models.GenerateCredentialsResult].from_continuation_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[_models.GenerateCredentialsResult]( - 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") + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @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. + ) -> 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 ImportPipeline + :return: An iterator like instance of ExportPipeline :rtype: - ~azure.core.async_paging.AsyncItemPaged[~container_registry_management_client.models.ImportPipeline] + ~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.ImportPipelineListResult] = kwargs.pop("cls", None) + cls: ClsType[_models._models.ExportPipelineListResult] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -5837,7 +5970,7 @@ def list( def prepare_request(next_link=None): if not next_link: - _request = build_import_pipelines_list_request( + _request = build_export_pipelines_list_request( resource_group_name=resource_group_name, registry_name=registry_name, subscription_id=self._config.subscription_id, @@ -5866,7 +5999,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = self._deserialize( - _models._models.ImportPipelineListResult, pipeline_response # pylint: disable=protected-access + _models._models.ExportPipelineListResult, pipeline_response # pylint: disable=protected-access ) list_of_elem = deserialized.value if cls: @@ -5884,13 +6017,38 @@ async def get_next(next_link=None): 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) + 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 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_async async def get( self, resource_group_name: str, registry_name: str, import_pipeline_name: str, **kwargs: Any @@ -5941,7 +6099,10 @@ async def get( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("ImportPipeline", pipeline_response.http_response) @@ -6008,7 +6169,10 @@ async def _create_initial( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -6205,7 +6369,10 @@ async def _delete_initial( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -6278,41 +6445,26 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- ) return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - -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"]: - """Lists all of the available Azure Container Registry REST API operations. + def list( + self, resource_group_name: str, registry_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.ImportPipeline"]: + """Lists all import pipelines for the specified container registry. - :return: An iterator like instance of OperationDefinition + :param resource_group_name: The name of the resource group. The 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.OperationDefinition] + ~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.OperationListResult] = kwargs.pop("cls", None) + cls: ClsType[_models._models.ImportPipelineListResult] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -6325,7 +6477,10 @@ def list(self, **kwargs: Any) -> AsyncItemPaged["_models.OperationDefinition"]: def prepare_request(next_link=None): if not next_link: - _request = build_operations_list_request( + _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, @@ -6351,7 +6506,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = self._deserialize( - _models._models.OperationListResult, pipeline_response # pylint: disable=protected-access + _models._models.ImportPipelineListResult, pipeline_response # pylint: disable=protected-access ) list_of_elem = deserialized.value if cls: @@ -6369,21 +6524,25 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) + 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 PipelineRunsOperations: +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:`pipeline_runs` attribute. + :attr:`operations` attribute. """ models = _models @@ -6398,25 +6557,18 @@ def __init__(self, *args, **kwargs) -> None: 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. + def list(self, **kwargs: Any) -> AsyncItemPaged["_models.OperationDefinition"]: + """Lists all of the available Azure Container Registry REST API operations. - :param resource_group_name: The name of the resource group. The 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 + :return: An iterator like instance of OperationDefinition :rtype: - ~azure.core.async_paging.AsyncItemPaged[~container_registry_management_client.models.PipelineRun] + ~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.PipelineRunListResult] = kwargs.pop("cls", None) + cls: ClsType[_models._models.OperationListResult] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -6429,10 +6581,7 @@ def list( 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, + _request = build_operations_list_request( api_version=self._config.api_version, headers=_headers, params=_params, @@ -6458,7 +6607,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = self._deserialize( - _models._models.PipelineRunListResult, pipeline_response # pylint: disable=protected-access + _models._models.OperationListResult, pipeline_response # pylint: disable=protected-access ) list_of_elem = deserialized.value if cls: @@ -6476,13 +6625,34 @@ async def get_next(next_link=None): 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) + raise HttpResponseError(response=response) return pipeline_response return AsyncItemPaged(get_next, extract_data) + +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_async async def get( self, resource_group_name: str, registry_name: str, pipeline_run_name: str, **kwargs: Any @@ -6533,7 +6703,10 @@ async def get( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("PipelineRun", pipeline_response.http_response) @@ -6600,7 +6773,10 @@ async def _create_initial( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -6794,7 +6970,10 @@ async def _delete_initial( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -6867,48 +7046,26 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- ) 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. + ) -> 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 PrivateEndpointConnection + :return: An iterator like instance of PipelineRun :rtype: - ~azure.core.async_paging.AsyncItemPaged[~container_registry_management_client.models.PrivateEndpointConnection] + ~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.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) + cls: ClsType[_models._models.PipelineRunListResult] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -6921,7 +7078,7 @@ def list( def prepare_request(next_link=None): if not next_link: - _request = build_private_endpoint_connections_list_request( + _request = build_pipeline_runs_list_request( resource_group_name=resource_group_name, registry_name=registry_name, subscription_id=self._config.subscription_id, @@ -6950,8 +7107,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = self._deserialize( - _models._models.PrivateEndpointConnectionListResult, # pylint: disable=protected-access - pipeline_response, + _models._models.PipelineRunListResult, pipeline_response # pylint: disable=protected-access ) list_of_elem = deserialized.value if cls: @@ -6969,70 +7125,37 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) + 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 {} +class PrivateEndpointConnectionsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) + Instead, you should access the following operations through + :class:`~container_registry_management_client.aio.ContainerRegistryManagementClient`'s + :attr:`private_endpoint_connections` attribute. + """ - _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) + models = _models - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs + 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") ) - - 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) - raise HttpResponseError(response=response) - - deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore + 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") async def _create_or_update_initial( self, @@ -7250,6 +7373,65 @@ def get_long_running_output(pipeline_response): self._client, raw_result, get_long_running_output, polling_method # type: ignore ) + @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) + raise HttpResponseError(response=response) + + deserialized = self._deserialize("PrivateEndpointConnection", 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, private_endpoint_connection_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: @@ -7362,48 +7544,26 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- ) 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. + ) -> 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 Replication + :return: An iterator like instance of PrivateEndpointConnection :rtype: - ~azure.core.async_paging.AsyncItemPaged[~container_registry_management_client.models.Replication] + ~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.ReplicationListResult] = kwargs.pop("cls", None) + cls: ClsType[_models._models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -7416,7 +7576,7 @@ def list( def prepare_request(next_link=None): if not next_link: - _request = build_replications_list_request( + _request = build_private_endpoint_connections_list_request( resource_group_name=resource_group_name, registry_name=registry_name, subscription_id=self._config.subscription_id, @@ -7445,7 +7605,8 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = self._deserialize( - _models._models.ReplicationListResult, pipeline_response # pylint: disable=protected-access + _models._models.PrivateEndpointConnectionListResult, # pylint: disable=protected-access + pipeline_response, ) list_of_elem = deserialized.value if cls: @@ -7469,6 +7630,28 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) + +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_async async def get( self, resource_group_name: str, registry_name: str, replication_name: str, **kwargs: Any @@ -7737,118 +7920,6 @@ def get_long_running_output(pipeline_response): 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) - raise HttpResponseError(response=response) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - 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 - async def _update_initial( self, resource_group_name: str, @@ -8020,12 +8091,128 @@ async def begin_update( 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( + 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) + raise HttpResponseError(response=response) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + 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, - replication_update_parameters=replication_update_parameters, - content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, @@ -8034,72 +8221,48 @@ async def begin_update( 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) + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: AsyncPollingMethod = cast( AsyncPollingMethod, - AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + 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.Replication].from_continuation_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[_models.Replication]( - 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") + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @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. + 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 ScopeMap + :return: An iterator like instance of Replication :rtype: - ~azure.core.async_paging.AsyncItemPaged[~container_registry_management_client.models.ScopeMap] + ~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.ScopeMapListResult] = kwargs.pop("cls", None) + cls: ClsType[_models._models.ReplicationListResult] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -8112,7 +8275,7 @@ def list(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> A def prepare_request(next_link=None): if not next_link: - _request = build_scope_maps_list_request( + _request = build_replications_list_request( resource_group_name=resource_group_name, registry_name=registry_name, subscription_id=self._config.subscription_id, @@ -8141,7 +8304,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = self._deserialize( - _models._models.ScopeMapListResult, pipeline_response # pylint: disable=protected-access + _models._models.ReplicationListResult, pipeline_response # pylint: disable=protected-access ) list_of_elem = deserialized.value if cls: @@ -8159,13 +8322,34 @@ async def get_next(next_link=None): 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) + raise HttpResponseError(response=response) return pipeline_response return AsyncItemPaged(get_next, extract_data) + +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_async async def get( self, resource_group_name: str, registry_name: str, scope_map_name: str, **kwargs: Any @@ -8216,7 +8400,10 @@ async def get( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("ScopeMap", pipeline_response.http_response) @@ -8283,7 +8470,10 @@ async def _create_initial( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -8313,189 +8503,64 @@ async def begin_create( """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 _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")) - - deserialized = response.iter_bytes() + 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: + """ - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore + @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. - return deserialized # type: ignore + :param resource_group_name: The name of the resource group. The name 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_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. + 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. @@ -8504,22 +8569,30 @@ async def begin_delete( :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] + :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 = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - cls: ClsType[None] = kwargs.pop("cls", None) + 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._delete_initial( + 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, @@ -8528,27 +8601,31 @@ async def begin_delete( 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 + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("ScopeMap", pipeline_response.http_response) if cls: - return cls(pipeline_response, None, {}) # type: ignore + 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), + 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[None].from_continuation_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[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + return AsyncLROPoller[_models.ScopeMap]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) async def _update_initial( self, @@ -8607,7 +8684,10 @@ async def _update_initial( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -8762,46 +8842,140 @@ def get_long_running_output(pipeline_response): 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 {}) -class TokensOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} - Instead, you should access the following operations through - :class:`~container_registry_management_client.aio.ContainerRegistryManagementClient`'s - :attr:`tokens` attribute. - """ + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - models = _models + _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) - 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") + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs ) - 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") + + 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")) + + 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 @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. + 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 Token + :return: An iterator like instance of ScopeMap :rtype: - ~azure.core.async_paging.AsyncItemPaged[~container_registry_management_client.models.Token] + ~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.TokenListResult] = kwargs.pop("cls", None) + cls: ClsType[_models._models.ScopeMapListResult] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -8814,7 +8988,7 @@ def list(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> A def prepare_request(next_link=None): if not next_link: - _request = build_tokens_list_request( + _request = build_scope_maps_list_request( resource_group_name=resource_group_name, registry_name=registry_name, subscription_id=self._config.subscription_id, @@ -8843,7 +9017,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = self._deserialize( - _models._models.TokenListResult, pipeline_response # pylint: disable=protected-access + _models._models.ScopeMapListResult, pipeline_response # pylint: disable=protected-access ) list_of_elem = deserialized.value if cls: @@ -8861,13 +9035,38 @@ async def get_next(next_link=None): 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) + 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 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_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. @@ -8916,7 +9115,10 @@ async def get(self, resource_group_name: str, registry_name: str, token_name: st 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("Token", pipeline_response.http_response) @@ -8983,7 +9185,10 @@ async def _create_initial( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -9133,119 +9338,6 @@ def get_long_running_output(pipeline_response): 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")) - - 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 - async def _update_initial( self, resource_group_name: str, @@ -9303,7 +9395,10 @@ async def _update_initial( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -9455,46 +9550,140 @@ def get_long_running_output(pipeline_response): 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 {}) -class WebhooksOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} - Instead, you should access the following operations through - :class:`~container_registry_management_client.aio.ContainerRegistryManagementClient`'s - :attr:`webhooks` attribute. - """ + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - models = _models + _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) - 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") + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs ) - 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") + + 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")) + + 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 @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. + 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 Webhook + :return: An iterator like instance of Token :rtype: - ~azure.core.async_paging.AsyncItemPaged[~container_registry_management_client.models.Webhook] + ~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.WebhookListResult] = kwargs.pop("cls", None) + cls: ClsType[_models._models.TokenListResult] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -9507,7 +9696,7 @@ def list(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> A def prepare_request(next_link=None): if not next_link: - _request = build_webhooks_list_request( + _request = build_tokens_list_request( resource_group_name=resource_group_name, registry_name=registry_name, subscription_id=self._config.subscription_id, @@ -9536,7 +9725,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = self._deserialize( - _models._models.WebhookListResult, pipeline_response # pylint: disable=protected-access + _models._models.TokenListResult, pipeline_response # pylint: disable=protected-access ) list_of_elem = deserialized.value if cls: @@ -9554,12 +9743,38 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) + 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 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_async async def get( self, resource_group_name: str, registry_name: str, webhook_name: str, **kwargs: Any @@ -9830,118 +10045,6 @@ def get_long_running_output(pipeline_response): 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) - raise HttpResponseError(response=response) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - 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 - async def _update_initial( self, resource_group_name: str, @@ -10078,15 +10181,139 @@ async def begin_update( """ @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. + 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) + raise HttpResponseError(response=response) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + 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. @@ -10095,30 +10322,22 @@ async def begin_update( :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] + :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 {}) + _headers = 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) + 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._update_initial( + raw_result = await self._delete_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, @@ -10127,31 +10346,110 @@ async def begin_update( 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) + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: AsyncPollingMethod = cast( AsyncPollingMethod, - AsyncLROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + 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.Webhook].from_continuation_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[_models.Webhook]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @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) + raise HttpResponseError(response=response) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) @distributed_trace_async async def ping( @@ -10212,6 +10510,65 @@ async def ping( return deserialized # 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) + raise HttpResponseError(response=response) + + 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 @@ -10299,62 +10656,3 @@ async def get_next(next_link=None): return pipeline_response return AsyncItemPaged(get_next, extract_data) - - @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) - raise HttpResponseError(response=response) - - deserialized = self._deserialize("CallbackConfig", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/models/__init__.py b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/models/__init__.py index e84cf5c7b2c..691f67b182b 100644 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/models/__init__.py +++ b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/models/__init__.py @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.8, generator: @autorest/python@6.40.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. # -------------------------------------------------------------------------- # pylint: disable=wrong-import-position @@ -19,9 +19,11 @@ ArchivePackageSourceProperties, ArchiveProperties, ArchiveUpdateParameters, + ArchiveUpdateParametersProperties, ArchiveUpdateProperties, ArchiveVersion, ArchiveVersionProperties, + ArchiveVersionPropertiesAutoGenerated, ArtifactSyncEstimateResult, ArtifactSyncFilterProperties, ArtifactTypeFilter, @@ -30,17 +32,24 @@ CacheRule, CacheRuleArtifactSyncEstimateResult, CacheRuleProperties, + CacheRulePropertiesAutoGenerated, + CacheRuleSyncParameters, CacheRuleUpdateParameters, + CacheRuleUpdateParametersProperties, CacheRuleUpdateProperties, CallbackConfig, ConnectedRegistry, ConnectedRegistryProperties, + ConnectedRegistryPropertiesAutoGenerated, ConnectedRegistryUpdateParameters, + ConnectedRegistryUpdateParametersProperties, ConnectedRegistryUpdateProperties, CredentialHealth, CredentialSet, CredentialSetProperties, + CredentialSetPropertiesAutoGenerated, CredentialSetUpdateParameters, + CredentialSetUpdateParametersProperties, CredentialSetUpdateProperties, DebianArchivePackageSourceProperties, DebianArchiveProperties, @@ -55,6 +64,7 @@ EventResponseMessage, ExportPipeline, ExportPipelineProperties, + ExportPipelinePropertiesAutoGenerated, ExportPipelineTargetProperties, ExportPolicy, GarbageCollectionProperties, @@ -66,6 +76,7 @@ ImportImageParameters, ImportPipeline, ImportPipelineProperties, + ImportPipelinePropertiesAutoGenerated, ImportPipelineSourceProperties, ImportSource, ImportSourceCredentials, @@ -74,15 +85,17 @@ LoginServerProperties, NetworkRuleSet, OperationDefinition, + OperationDefinitionProperties, OperationDisplayDefinition, OperationLogSpecificationDefinition, OperationMetricSpecificationDefinition, OperationPropertiesDefinition, OperationServiceSpecificationDefinition, - PackageType, ParentProperties, PipelineRun, PipelineRunProperties, + PipelineRunPropertiesAutoGenerated, + PipelineRunPropertiesResponse, PipelineRunRequest, PipelineRunResponse, PipelineRunSourceProperties, @@ -96,11 +109,14 @@ PrivateEndpoint, PrivateEndpointConnection, PrivateEndpointConnectionProperties, + PrivateEndpointConnectionPropertiesAutoGenerated, PrivateLinkResource, PrivateLinkResourceProperties, + PrivateLinkResourcePropertiesAutoGenerated, PrivateLinkServiceConnectionState, ProgressProperties, ProxyResource, + ProxyResourceSystemData, QuarantinePolicy, RegenerateCredentialParameters, Registry, @@ -109,21 +125,30 @@ RegistryNameStatus, RegistryPassword, RegistryProperties, + RegistryPropertiesAutoGenerated, + RegistryPropertiesStatus, RegistryPropertiesUpdateParameters, RegistryUpdateParameters, + RegistryUpdateParametersProperties, RegistryUsage, RegistryUsageListResult, Replication, ReplicationProperties, + ReplicationPropertiesAutoGenerated, + ReplicationPropertiesStatus, ReplicationUpdateParameters, ReplicationUpdateParametersProperties, + ReplicationUpdateParametersPropertiesAutoGenerated, Request, Resource, + ResourceSystemData, RetentionPolicy, ScopeMap, ScopeMapProperties, + ScopeMapPropertiesAutoGenerated, ScopeMapPropertiesUpdateParameters, ScopeMapUpdateParameters, + ScopeMapUpdateParametersProperties, Sku, SoftDeletePolicy, Source, @@ -142,16 +167,21 @@ TokenCredentialsProperties, TokenPassword, TokenProperties, + TokenPropertiesAutoGenerated, TokenUpdateParameters, + TokenUpdateParametersProperties, TokenUpdateProperties, TrustPolicy, UserIdentityProperties, Webhook, WebhookCreateParameters, + WebhookCreateParametersProperties, WebhookProperties, + WebhookPropertiesAutoGenerated, WebhookPropertiesCreateParameters, WebhookPropertiesUpdateParameters, WebhookUpdateParameters, + WebhookUpdateParametersProperties, ) from ._enums import ( # type: ignore @@ -162,7 +192,6 @@ AuditLogStatus, AutoGeneratedDomainNameLabelScope, AzureADAuthenticationAsArmPolicyStatus, - CacheRuleSyncMode, CertificateType, ConnectedRegistryMode, ConnectionState, @@ -170,7 +199,6 @@ CreatedByType, CredentialHealthStatus, CredentialName, - CredentialType, DefaultAction, EncryptionStatus, ExportPolicyStatus, @@ -196,6 +224,7 @@ RoleAssignmentMode, SkuName, SkuTier, + SyncMode, TagFilterType, TlsStatus, TokenCertificateName, @@ -219,9 +248,11 @@ "ArchivePackageSourceProperties", "ArchiveProperties", "ArchiveUpdateParameters", + "ArchiveUpdateParametersProperties", "ArchiveUpdateProperties", "ArchiveVersion", "ArchiveVersionProperties", + "ArchiveVersionPropertiesAutoGenerated", "ArtifactSyncEstimateResult", "ArtifactSyncFilterProperties", "ArtifactTypeFilter", @@ -230,17 +261,24 @@ "CacheRule", "CacheRuleArtifactSyncEstimateResult", "CacheRuleProperties", + "CacheRulePropertiesAutoGenerated", + "CacheRuleSyncParameters", "CacheRuleUpdateParameters", + "CacheRuleUpdateParametersProperties", "CacheRuleUpdateProperties", "CallbackConfig", "ConnectedRegistry", "ConnectedRegistryProperties", + "ConnectedRegistryPropertiesAutoGenerated", "ConnectedRegistryUpdateParameters", + "ConnectedRegistryUpdateParametersProperties", "ConnectedRegistryUpdateProperties", "CredentialHealth", "CredentialSet", "CredentialSetProperties", + "CredentialSetPropertiesAutoGenerated", "CredentialSetUpdateParameters", + "CredentialSetUpdateParametersProperties", "CredentialSetUpdateProperties", "DebianArchivePackageSourceProperties", "DebianArchiveProperties", @@ -255,6 +293,7 @@ "EventResponseMessage", "ExportPipeline", "ExportPipelineProperties", + "ExportPipelinePropertiesAutoGenerated", "ExportPipelineTargetProperties", "ExportPolicy", "GarbageCollectionProperties", @@ -266,6 +305,7 @@ "ImportImageParameters", "ImportPipeline", "ImportPipelineProperties", + "ImportPipelinePropertiesAutoGenerated", "ImportPipelineSourceProperties", "ImportSource", "ImportSourceCredentials", @@ -274,15 +314,17 @@ "LoginServerProperties", "NetworkRuleSet", "OperationDefinition", + "OperationDefinitionProperties", "OperationDisplayDefinition", "OperationLogSpecificationDefinition", "OperationMetricSpecificationDefinition", "OperationPropertiesDefinition", "OperationServiceSpecificationDefinition", - "PackageType", "ParentProperties", "PipelineRun", "PipelineRunProperties", + "PipelineRunPropertiesAutoGenerated", + "PipelineRunPropertiesResponse", "PipelineRunRequest", "PipelineRunResponse", "PipelineRunSourceProperties", @@ -296,11 +338,14 @@ "PrivateEndpoint", "PrivateEndpointConnection", "PrivateEndpointConnectionProperties", + "PrivateEndpointConnectionPropertiesAutoGenerated", "PrivateLinkResource", "PrivateLinkResourceProperties", + "PrivateLinkResourcePropertiesAutoGenerated", "PrivateLinkServiceConnectionState", "ProgressProperties", "ProxyResource", + "ProxyResourceSystemData", "QuarantinePolicy", "RegenerateCredentialParameters", "Registry", @@ -309,21 +354,30 @@ "RegistryNameStatus", "RegistryPassword", "RegistryProperties", + "RegistryPropertiesAutoGenerated", + "RegistryPropertiesStatus", "RegistryPropertiesUpdateParameters", "RegistryUpdateParameters", + "RegistryUpdateParametersProperties", "RegistryUsage", "RegistryUsageListResult", "Replication", "ReplicationProperties", + "ReplicationPropertiesAutoGenerated", + "ReplicationPropertiesStatus", "ReplicationUpdateParameters", "ReplicationUpdateParametersProperties", + "ReplicationUpdateParametersPropertiesAutoGenerated", "Request", "Resource", + "ResourceSystemData", "RetentionPolicy", "ScopeMap", "ScopeMapProperties", + "ScopeMapPropertiesAutoGenerated", "ScopeMapPropertiesUpdateParameters", "ScopeMapUpdateParameters", + "ScopeMapUpdateParametersProperties", "Sku", "SoftDeletePolicy", "Source", @@ -342,16 +396,21 @@ "TokenCredentialsProperties", "TokenPassword", "TokenProperties", + "TokenPropertiesAutoGenerated", "TokenUpdateParameters", + "TokenUpdateParametersProperties", "TokenUpdateProperties", "TrustPolicy", "UserIdentityProperties", "Webhook", "WebhookCreateParameters", + "WebhookCreateParametersProperties", "WebhookProperties", + "WebhookPropertiesAutoGenerated", "WebhookPropertiesCreateParameters", "WebhookPropertiesUpdateParameters", "WebhookUpdateParameters", + "WebhookUpdateParametersProperties", "Action", "ActionsRequired", "ActivationStatus", @@ -359,7 +418,6 @@ "AuditLogStatus", "AutoGeneratedDomainNameLabelScope", "AzureADAuthenticationAsArmPolicyStatus", - "CacheRuleSyncMode", "CertificateType", "ConnectedRegistryMode", "ConnectionState", @@ -367,7 +425,6 @@ "CreatedByType", "CredentialHealthStatus", "CredentialName", - "CredentialType", "DefaultAction", "EncryptionStatus", "ExportPolicyStatus", @@ -393,6 +450,7 @@ "RoleAssignmentMode", "SkuName", "SkuTier", + "SyncMode", "TagFilterType", "TlsStatus", "TokenCertificateName", diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/models/_enums.py b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/models/_enums.py index ae67fb50be1..17a891d0d1d 100644 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/models/_enums.py +++ b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/models/_enums.py @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.8, generator: @autorest/python@6.40.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. # -------------------------------------------------------------------------- @@ -61,17 +61,6 @@ class AzureADAuthenticationAsArmPolicyStatus(str, Enum, metaclass=CaseInsensitiv DISABLED = "disabled" -class CacheRuleSyncMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The sync mode of the cache rule that controls its synchronization behavior. PassiveSync - indicates the rule behaves as a pull-through cache, preserving upstream pull behavior. - ActiveSync indicates the rule actively synchronizes artifacts from the upstream repository - according to the configured artifact sync filters. - """ - - PASSIVE_SYNC = "PassiveSync" - ACTIVE_SYNC = "ActiveSync" - - class CertificateType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of certificate location.""" @@ -127,12 +116,6 @@ class CredentialName(str, Enum, metaclass=CaseInsensitiveEnumMeta): CREDENTIAL1 = "Credential1" -class CredentialType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The type of the credential.""" - - KEY_VAULT_SECRETS = "KeyVaultSecrets" - - class DefaultAction(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The default action of allow or deny when no other rules match.""" @@ -155,7 +138,7 @@ class ExportPolicyStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): class ImageTypeFilterType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The type of values. Allowed values are either 'include' or 'exclude'.""" + """ImageTypeFilterType.""" INCLUDE = "include" EXCLUDE = "exclude" @@ -210,7 +193,7 @@ class PackageSourceType(str, Enum, metaclass=CaseInsensitiveEnumMeta): class PasswordName(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The password name.""" + """Specifies name of the password which should be regenerated -- password or password2.""" PASSWORD = "password" PASSWORD2 = "password2" @@ -275,12 +258,10 @@ class PublicNetworkAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta): class ReferrersSyncStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Indicates whether OCI referrers are synchronized for artifacts matching the cache rule. Valid - values are 'Enabled' or 'Disabled'. - """ + """The status of syncing referrers. Valid values are 'Enabled' or 'Disabled'.""" - ENABLED = "Enabled" - DISABLED = "Disabled" + DISABLED = "disabled" + ENABLED = "enabled" class RegistryUsageUnit(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -324,10 +305,17 @@ class SkuTier(str, Enum, metaclass=CaseInsensitiveEnumMeta): PREMIUM = "Premium" +class SyncMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The sync mode.""" + + PASSIVE_SYNC = "passiveSync" + ACTIVE_SYNC = "activeSync" + + class TagFilterType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The language type of the filter. Allowed value is 'KQL'.""" - KQL = "KQL" + KQL = "kql" class TlsStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -345,7 +333,7 @@ class TokenCertificateName(str, Enum, metaclass=CaseInsensitiveEnumMeta): class TokenPasswordName(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The password name "password1" or "password2".""" + """Specifies name of the password which should be regenerated if any -- password1 or password2.""" PASSWORD1 = "password1" PASSWORD2 = "password2" diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/models/_models.py b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/models/_models.py index 5f3f3b9c423..1736e0b5801 100644 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/models/_models.py +++ b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/models/_models.py @@ -1,7 +1,7 @@ # 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.40.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. # -------------------------------------------------------------------------- @@ -107,7 +107,7 @@ class ProxyResource(_serialization.Model): :ivar type: The type of the resource. :vartype type: str :ivar system_data: Metadata pertaining to creation and last modification of the resource. - :vartype system_data: ~container_registry_management_client.models.SystemData + :vartype system_data: ~container_registry_management_client.models.ProxyResourceSystemData """ _validation = { @@ -121,7 +121,7 @@ class ProxyResource(_serialization.Model): "id": {"key": "id", "type": "str"}, "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, + "system_data": {"key": "systemData", "type": "ProxyResourceSystemData"}, } def __init__(self, **kwargs: Any) -> None: @@ -130,7 +130,7 @@ def __init__(self, **kwargs: Any) -> None: self.id: Optional[str] = None self.name: Optional[str] = None self.type: Optional[str] = None - self.system_data: Optional["_models.SystemData"] = None + self.system_data: Optional["_models.ProxyResourceSystemData"] = None class Archive(ProxyResource): @@ -145,8 +145,8 @@ class Archive(ProxyResource): :ivar type: The type of the resource. :vartype type: str :ivar system_data: Metadata pertaining to creation and last modification of the resource. - :vartype system_data: ~container_registry_management_client.models.SystemData - :ivar properties: The properties of the archive. + :vartype system_data: ~container_registry_management_client.models.ProxyResourceSystemData + :ivar properties: The properties of a archive. :vartype properties: ~container_registry_management_client.models.ArchiveProperties """ @@ -161,13 +161,13 @@ class Archive(ProxyResource): "id": {"key": "id", "type": "str"}, "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, + "system_data": {"key": "systemData", "type": "ProxyResourceSystemData"}, "properties": {"key": "properties", "type": "ArchiveProperties"}, } def __init__(self, *, properties: Optional["_models.ArchiveProperties"] = None, **kwargs: Any) -> None: """ - :keyword properties: The properties of the archive. + :keyword properties: The properties of a archive. :paramtype properties: ~container_registry_management_client.models.ArchiveProperties """ super().__init__(**kwargs) @@ -241,7 +241,7 @@ class ArchiveProperties(_serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar package_source: The package source of the archive. + :ivar package_source: The properties of the archive package source. :vartype package_source: ~container_registry_management_client.models.ArchivePackageSourceProperties :ivar published_version: The published version of the archive. @@ -279,7 +279,7 @@ def __init__( **kwargs: Any ) -> None: """ - :keyword package_source: The package source of the archive. + :keyword package_source: The properties of the archive package source. :paramtype package_source: ~container_registry_management_client.models.ArchivePackageSourceProperties :keyword published_version: The published version of the archive. @@ -298,18 +298,22 @@ def __init__( 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 + :ivar properties: + :vartype properties: + ~container_registry_management_client.models.ArchiveUpdateParametersProperties """ _attribute_map = { - "properties": {"key": "properties", "type": "ArchiveUpdateProperties"}, + "properties": {"key": "properties", "type": "ArchiveUpdateParametersProperties"}, } - def __init__(self, *, properties: Optional["_models.ArchiveUpdateProperties"] = None, **kwargs: Any) -> None: + def __init__( + self, *, properties: Optional["_models.ArchiveUpdateParametersProperties"] = None, **kwargs: Any + ) -> None: """ - :keyword properties: The properties of the connected registry update parameters. - :paramtype properties: ~container_registry_management_client.models.ArchiveUpdateProperties + :keyword properties: + :paramtype properties: + ~container_registry_management_client.models.ArchiveUpdateParametersProperties """ super().__init__(**kwargs) self.properties = properties @@ -335,6 +339,14 @@ def __init__(self, *, published_version: Optional[str] = None, **kwargs: Any) -> self.published_version = published_version +class ArchiveUpdateParametersProperties(ArchiveUpdateProperties): + """ArchiveUpdateParametersProperties. + + :ivar published_version: The published version of the archive. + :vartype published_version: str + """ + + class ArchiveVersion(ProxyResource): """An object that represents an export pipeline for a container registry. @@ -347,8 +359,8 @@ class ArchiveVersion(ProxyResource): :ivar type: The type of the resource. :vartype type: str :ivar system_data: Metadata pertaining to creation and last modification of the resource. - :vartype system_data: ~container_registry_management_client.models.SystemData - :ivar properties: The properties of the archive. + :vartype system_data: ~container_registry_management_client.models.ProxyResourceSystemData + :ivar properties: :vartype properties: ~container_registry_management_client.models.ArchiveVersionProperties """ @@ -363,13 +375,13 @@ class ArchiveVersion(ProxyResource): "id": {"key": "id", "type": "str"}, "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, + "system_data": {"key": "systemData", "type": "ProxyResourceSystemData"}, "properties": {"key": "properties", "type": "ArchiveVersionProperties"}, } def __init__(self, *, properties: Optional["_models.ArchiveVersionProperties"] = None, **kwargs: Any) -> None: """ - :keyword properties: The properties of the archive. + :keyword properties: :paramtype properties: ~container_registry_management_client.models.ArchiveVersionProperties """ super().__init__(**kwargs) @@ -406,7 +418,7 @@ def __init__( self.next_link = next_link -class ArchiveVersionProperties(_serialization.Model): +class ArchiveVersionPropertiesAutoGenerated(_serialization.Model): """The properties of an export pipeline. Variables are only populated by the server, and will be ignored when sending a request. @@ -441,6 +453,22 @@ def __init__(self, *, archive_version_error_message: Optional[str] = None, **kwa self.archive_version_error_message = archive_version_error_message +class ArchiveVersionProperties(ArchiveVersionPropertiesAutoGenerated): + """ArchiveVersionProperties. + + 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 + """ + + class ArtifactSyncEstimateResult(_serialization.Model): """The result of processing the artifact sync query. @@ -464,20 +492,13 @@ def __init__(self, *, name: Optional[str] = None, **kwargs: Any) -> None: class ArtifactSyncFilterProperties(_serialization.Model): """The filter properties of artifact sync. - :ivar tags: Specifies a query to filter tags in the upstream repository. Tags are user-defined - labels for OCI artifacts or images. This enables selection of content based on tag values. + :ivar tags: :vartype tags: ~container_registry_management_client.models.TagFilter - :ivar platforms: Specifies the platform attributes (such as operating system, architecture, and - variant) to include or exclude in the filter. This allows selection of OCI artifacts or images - that match specific platform requirements, such as linux/amd64 or windows/arm64. + :ivar platforms: :vartype platforms: ~container_registry_management_client.models.PlatformFilter - :ivar image_types: Specifies the types of OCI images to include or exclude in the filter. OCI - images are container images that follow the OCI image specification, typically used for running - containers. + :ivar image_types: :vartype image_types: ~container_registry_management_client.models.ImageTypeFilter - :ivar artifact_types: Specifies the types of OCI artifacts to include or exclude in the filter. - OCI artifacts can be images, Helm charts, SBOMs, signatures, or any content conforming to the - OCI artifact specification. + :ivar artifact_types: :vartype artifact_types: ~container_registry_management_client.models.ArtifactTypeFilter """ @@ -498,21 +519,13 @@ def __init__( **kwargs: Any ) -> None: """ - :keyword tags: Specifies a query to filter tags in the upstream repository. Tags are - user-defined labels for OCI artifacts or images. This enables selection of content based on tag - values. + :keyword tags: :paramtype tags: ~container_registry_management_client.models.TagFilter - :keyword platforms: Specifies the platform attributes (such as operating system, architecture, - and variant) to include or exclude in the filter. This allows selection of OCI artifacts or - images that match specific platform requirements, such as linux/amd64 or windows/arm64. + :keyword platforms: :paramtype platforms: ~container_registry_management_client.models.PlatformFilter - :keyword image_types: Specifies the types of OCI images to include or exclude in the filter. - OCI images are container images that follow the OCI image specification, typically used for - running containers. + :keyword image_types: :paramtype image_types: ~container_registry_management_client.models.ImageTypeFilter - :keyword artifact_types: Specifies the types of OCI artifacts to include or exclude in the - filter. OCI artifacts can be images, Helm charts, SBOMs, signatures, or any content conforming - to the OCI artifact specification. + :keyword artifact_types: :paramtype artifact_types: ~container_registry_management_client.models.ArtifactTypeFilter """ super().__init__(**kwargs) @@ -523,9 +536,7 @@ def __init__( class ArtifactTypeFilter(_serialization.Model): - """Specifies the types of OCI artifacts to include or exclude in the filter. OCI artifacts can be - images, Helm charts, SBOMs, signatures, or any content conforming to the OCI artifact - specification. + """ArtifactTypeFilter. :ivar type: The type of values. Allowed values are either 'include' or 'exclude'. Known values are: "include" and "exclude". @@ -561,27 +572,18 @@ def __init__( 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 type: The type of the credential. "KeyVaultSecrets" - :vartype type: str or ~container_registry_management_client.models.CredentialType :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. + :ivar credential_health: 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"}, - "type": {"key": "type", "type": "str"}, "username_secret_identifier": {"key": "usernameSecretIdentifier", "type": "str"}, "password_secret_identifier": {"key": "passwordSecretIdentifier", "type": "str"}, "credential_health": {"key": "credentialHealth", "type": "CredentialHealth"}, @@ -591,31 +593,30 @@ def __init__( self, *, name: Optional[Union[str, "_models.CredentialName"]] = None, - type: Optional[Union[str, "_models.CredentialType"]] = None, username_secret_identifier: Optional[str] = None, password_secret_identifier: Optional[str] = None, + credential_health: Optional["_models.CredentialHealth"] = None, **kwargs: Any ) -> None: """ :keyword name: The name of the credential. "Credential1" :paramtype name: str or ~container_registry_management_client.models.CredentialName - :keyword type: The type of the credential. "KeyVaultSecrets" - :paramtype type: str or ~container_registry_management_client.models.CredentialType :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 + :keyword credential_health: The health of the auth credential. + :paramtype credential_health: ~container_registry_management_client.models.CredentialHealth """ super().__init__(**kwargs) self.name = name - self.type = type self.username_secret_identifier = username_secret_identifier self.password_secret_identifier = password_secret_identifier - self.credential_health: Optional["_models.CredentialHealth"] = None + self.credential_health = credential_health class AzureADAuthenticationAsArmPolicy(_serialization.Model): - """The policy for using Azure Resource Manager audience token for a container registry. + """The policy for using ARM 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". @@ -652,10 +653,10 @@ class CacheRule(ProxyResource): :ivar type: The type of the resource. :vartype type: str :ivar system_data: Metadata pertaining to creation and last modification of the resource. - :vartype system_data: ~container_registry_management_client.models.SystemData - :ivar identity: Managed Identity associated with the resource. + :vartype system_data: ~container_registry_management_client.models.ProxyResourceSystemData + :ivar identity: Managed identity for the resource. :vartype identity: ~container_registry_management_client.models.IdentityProperties - :ivar properties: The properties of the cache rule. + :ivar properties: :vartype properties: ~container_registry_management_client.models.CacheRuleProperties """ @@ -670,7 +671,7 @@ class CacheRule(ProxyResource): "id": {"key": "id", "type": "str"}, "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, + "system_data": {"key": "systemData", "type": "ProxyResourceSystemData"}, "identity": {"key": "identity", "type": "IdentityProperties"}, "properties": {"key": "properties", "type": "CacheRuleProperties"}, } @@ -683,9 +684,9 @@ def __init__( **kwargs: Any ) -> None: """ - :keyword identity: Managed Identity associated with the resource. + :keyword identity: Managed identity for the resource. :paramtype identity: ~container_registry_management_client.models.IdentityProperties - :keyword properties: The properties of the cache rule. + :keyword properties: :paramtype properties: ~container_registry_management_client.models.CacheRuleProperties """ super().__init__(**kwargs) @@ -740,32 +741,18 @@ def __init__( self.results = results -class CacheRuleProperties(_serialization.Model): +class CacheRulePropertiesAutoGenerated(_serialization.Model): """The properties of a cache rule. Variables are only populated by the server, and will be ignored when sending a request. - :ivar sync_mode: The sync mode of the cache rule that controls its synchronization behavior. - PassiveSync indicates the rule behaves as a pull-through cache, preserving upstream pull - behavior. ActiveSync indicates the rule actively synchronizes artifacts from the upstream - repository according to the configured artifact sync filters. Known values are: "PassiveSync" - and "ActiveSync". - :vartype sync_mode: str or ~container_registry_management_client.models.CacheRuleSyncMode - :ivar artifact_sync_filters: The filter properties of artifact sync. - :vartype artifact_sync_filters: - ~container_registry_management_client.models.ArtifactSyncFilterProperties - :ivar sync_referrers: Indicates whether OCI referrers are synchronized for artifacts matching - the cache rule. Valid values are 'Enabled' or 'Disabled'. Known values are: "Enabled" and - "Disabled". - :vartype sync_referrers: str or - ~container_registry_management_client.models.ReferrersSyncStatus :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}. + :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 @@ -773,6 +760,15 @@ class CacheRuleProperties(_serialization.Model): "Updating", "Deleting", "Succeeded", "Failed", and "Canceled". :vartype provisioning_state: str or ~container_registry_management_client.models.ProvisioningState + :ivar sync_mode: The sync mode. Known values are: "passiveSync" and "activeSync". + :vartype sync_mode: str or ~container_registry_management_client.models.SyncMode + :ivar sync_referrers: The status of syncing referrers. Valid values are 'Enabled' or + 'Disabled'. Known values are: "disabled" and "enabled". + :vartype sync_referrers: str or + ~container_registry_management_client.models.ReferrersSyncStatus + :ivar artifact_sync_filters: The filter properties of artifact sync. + :vartype artifact_sync_filters: + ~container_registry_management_client.models.ArtifactSyncFilterProperties """ _validation = { @@ -781,60 +777,86 @@ class CacheRuleProperties(_serialization.Model): } _attribute_map = { - "sync_mode": {"key": "syncMode", "type": "str"}, - "artifact_sync_filters": {"key": "artifactSyncFilters", "type": "ArtifactSyncFilterProperties"}, - "sync_referrers": {"key": "syncReferrers", "type": "str"}, "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"}, + "sync_mode": {"key": "syncMode", "type": "str"}, + "sync_referrers": {"key": "syncReferrers", "type": "str"}, + "artifact_sync_filters": {"key": "artifactSyncFilters", "type": "ArtifactSyncFilterProperties"}, } def __init__( self, *, - sync_mode: Optional[Union[str, "_models.CacheRuleSyncMode"]] = None, - artifact_sync_filters: Optional["_models.ArtifactSyncFilterProperties"] = None, - sync_referrers: Optional[Union[str, "_models.ReferrersSyncStatus"]] = None, credential_set_resource_id: Optional[str] = None, source_repository: Optional[str] = None, target_repository: Optional[str] = None, + sync_mode: Optional[Union[str, "_models.SyncMode"]] = None, + sync_referrers: Optional[Union[str, "_models.ReferrersSyncStatus"]] = None, + artifact_sync_filters: Optional["_models.ArtifactSyncFilterProperties"] = None, **kwargs: Any ) -> None: """ - :keyword sync_mode: The sync mode of the cache rule that controls its synchronization behavior. - PassiveSync indicates the rule behaves as a pull-through cache, preserving upstream pull - behavior. ActiveSync indicates the rule actively synchronizes artifacts from the upstream - repository according to the configured artifact sync filters. Known values are: "PassiveSync" - and "ActiveSync". - :paramtype sync_mode: str or ~container_registry_management_client.models.CacheRuleSyncMode - :keyword artifact_sync_filters: The filter properties of artifact sync. - :paramtype artifact_sync_filters: - ~container_registry_management_client.models.ArtifactSyncFilterProperties - :keyword sync_referrers: Indicates whether OCI referrers are synchronized for artifacts - matching the cache rule. Valid values are 'Enabled' or 'Disabled'. Known values are: "Enabled" - and "Disabled". - :paramtype sync_referrers: str or - ~container_registry_management_client.models.ReferrersSyncStatus :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}. + :keyword target_repository: Target repository specified in docker pull command. Eg: docker pull + myregistry.azurecr.io/{targetRepository}:{tag}. :paramtype target_repository: str + :keyword sync_mode: The sync mode. Known values are: "passiveSync" and "activeSync". + :paramtype sync_mode: str or ~container_registry_management_client.models.SyncMode + :keyword sync_referrers: The status of syncing referrers. Valid values are 'Enabled' or + 'Disabled'. Known values are: "disabled" and "enabled". + :paramtype sync_referrers: str or + ~container_registry_management_client.models.ReferrersSyncStatus + :keyword artifact_sync_filters: The filter properties of artifact sync. + :paramtype artifact_sync_filters: + ~container_registry_management_client.models.ArtifactSyncFilterProperties """ super().__init__(**kwargs) - self.sync_mode = sync_mode - self.artifact_sync_filters = artifact_sync_filters - self.sync_referrers = sync_referrers 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 + self.sync_mode = sync_mode + self.sync_referrers = sync_referrers + self.artifact_sync_filters = artifact_sync_filters + + +class CacheRuleProperties(CacheRulePropertiesAutoGenerated): + """CacheRuleProperties. + + 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 + :ivar sync_mode: The sync mode. Known values are: "passiveSync" and "activeSync". + :vartype sync_mode: str or ~container_registry_management_client.models.SyncMode + :ivar sync_referrers: The status of syncing referrers. Valid values are 'Enabled' or + 'Disabled'. Known values are: "disabled" and "enabled". + :vartype sync_referrers: str or + ~container_registry_management_client.models.ReferrersSyncStatus + :ivar artifact_sync_filters: The filter properties of artifact sync. + :vartype artifact_sync_filters: + ~container_registry_management_client.models.ArtifactSyncFilterProperties + """ class CacheRulesListResult(_serialization.Model): @@ -866,32 +888,65 @@ def __init__( self.next_link = next_link +class CacheRuleSyncParameters(_serialization.Model): + """The parameters for syncing a cache rule. For example, this is used to sync a specific tag from + an upstream repository during artifact sync. + + :ivar tag_name: The name of the tag that needs to be sync'd. + :vartype tag_name: str + :ivar sync_tag_if_deleted: Flag to indicate whether the tag should be sync'd if it has already + been deleted. + :vartype sync_tag_if_deleted: bool + """ + + _attribute_map = { + "tag_name": {"key": "tagName", "type": "str"}, + "sync_tag_if_deleted": {"key": "syncTagIfDeleted", "type": "bool"}, + } + + def __init__( + self, *, tag_name: Optional[str] = None, sync_tag_if_deleted: Optional[bool] = None, **kwargs: Any + ) -> None: + """ + :keyword tag_name: The name of the tag that needs to be sync'd. + :paramtype tag_name: str + :keyword sync_tag_if_deleted: Flag to indicate whether the tag should be sync'd if it has + already been deleted. + :paramtype sync_tag_if_deleted: bool + """ + super().__init__(**kwargs) + self.tag_name = tag_name + self.sync_tag_if_deleted = sync_tag_if_deleted + + class CacheRuleUpdateParameters(_serialization.Model): """The parameters for updating a cache rule. - :ivar identity: Managed Identity associated with the resource. + :ivar identity: Managed identity for the resource. :vartype identity: ~container_registry_management_client.models.IdentityProperties - :ivar properties: The properties of the cache rule update parameters. - :vartype properties: ~container_registry_management_client.models.CacheRuleUpdateProperties + :ivar properties: + :vartype properties: + ~container_registry_management_client.models.CacheRuleUpdateParametersProperties """ _attribute_map = { "identity": {"key": "identity", "type": "IdentityProperties"}, - "properties": {"key": "properties", "type": "CacheRuleUpdateProperties"}, + "properties": {"key": "properties", "type": "CacheRuleUpdateParametersProperties"}, } def __init__( self, *, identity: Optional["_models.IdentityProperties"] = None, - properties: Optional["_models.CacheRuleUpdateProperties"] = None, + properties: Optional["_models.CacheRuleUpdateParametersProperties"] = None, **kwargs: Any ) -> None: """ - :keyword identity: Managed Identity associated with the resource. + :keyword identity: Managed identity for the resource. :paramtype identity: ~container_registry_management_client.models.IdentityProperties - :keyword properties: The properties of the cache rule update parameters. - :paramtype properties: ~container_registry_management_client.models.CacheRuleUpdateProperties + :keyword properties: + :paramtype properties: + ~container_registry_management_client.models.CacheRuleUpdateParametersProperties """ super().__init__(**kwargs) self.identity = identity @@ -901,63 +956,73 @@ def __init__( class CacheRuleUpdateProperties(_serialization.Model): """The parameters for updating cache rule properties. - :ivar sync_mode: The sync mode of the cache rule that controls its synchronization behavior. - PassiveSync indicates the rule behaves as a pull-through cache, preserving upstream pull - behavior. ActiveSync indicates the rule actively synchronizes artifacts from the upstream - repository according to the configured artifact sync filters. Known values are: "PassiveSync" - and "ActiveSync". - :vartype sync_mode: str or ~container_registry_management_client.models.CacheRuleSyncMode + :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 sync_mode: The sync mode. Known values are: "passiveSync" and "activeSync". + :vartype sync_mode: str or ~container_registry_management_client.models.SyncMode + :ivar sync_referrers: The status of syncing referrers. Valid values are 'Enabled' or + 'Disabled'. Known values are: "disabled" and "enabled". + :vartype sync_referrers: str or + ~container_registry_management_client.models.ReferrersSyncStatus :ivar artifact_sync_filters: The filter properties of artifact sync. :vartype artifact_sync_filters: ~container_registry_management_client.models.ArtifactSyncFilterProperties - :ivar sync_referrers: The status of syncing referrers. Known values are: "Enabled" and - "Disabled". - :vartype sync_referrers: str or - ~container_registry_management_client.models.ReferrersSyncStatus - :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"}, "sync_mode": {"key": "syncMode", "type": "str"}, - "artifact_sync_filters": {"key": "artifactSyncFilters", "type": "ArtifactSyncFilterProperties"}, "sync_referrers": {"key": "syncReferrers", "type": "str"}, - "credential_set_resource_id": {"key": "credentialSetResourceId", "type": "str"}, + "artifact_sync_filters": {"key": "artifactSyncFilters", "type": "ArtifactSyncFilterProperties"}, } def __init__( self, *, - sync_mode: Optional[Union[str, "_models.CacheRuleSyncMode"]] = None, - artifact_sync_filters: Optional["_models.ArtifactSyncFilterProperties"] = None, - sync_referrers: Optional[Union[str, "_models.ReferrersSyncStatus"]] = None, credential_set_resource_id: Optional[str] = None, + sync_mode: Optional[Union[str, "_models.SyncMode"]] = None, + sync_referrers: Optional[Union[str, "_models.ReferrersSyncStatus"]] = None, + artifact_sync_filters: Optional["_models.ArtifactSyncFilterProperties"] = None, **kwargs: Any ) -> None: """ - :keyword sync_mode: The sync mode of the cache rule that controls its synchronization behavior. - PassiveSync indicates the rule behaves as a pull-through cache, preserving upstream pull - behavior. ActiveSync indicates the rule actively synchronizes artifacts from the upstream - repository according to the configured artifact sync filters. Known values are: "PassiveSync" - and "ActiveSync". - :paramtype sync_mode: str or ~container_registry_management_client.models.CacheRuleSyncMode + :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 sync_mode: The sync mode. Known values are: "passiveSync" and "activeSync". + :paramtype sync_mode: str or ~container_registry_management_client.models.SyncMode + :keyword sync_referrers: The status of syncing referrers. Valid values are 'Enabled' or + 'Disabled'. Known values are: "disabled" and "enabled". + :paramtype sync_referrers: str or + ~container_registry_management_client.models.ReferrersSyncStatus :keyword artifact_sync_filters: The filter properties of artifact sync. :paramtype artifact_sync_filters: ~container_registry_management_client.models.ArtifactSyncFilterProperties - :keyword sync_referrers: The status of syncing referrers. Known values are: "Enabled" and - "Disabled". - :paramtype sync_referrers: str or - ~container_registry_management_client.models.ReferrersSyncStatus - :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 self.sync_mode = sync_mode - self.artifact_sync_filters = artifact_sync_filters self.sync_referrers = sync_referrers - self.credential_set_resource_id = credential_set_resource_id + self.artifact_sync_filters = artifact_sync_filters + + +class CacheRuleUpdateParametersProperties(CacheRuleUpdateProperties): + """CacheRuleUpdateParametersProperties. + + :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 sync_mode: The sync mode. Known values are: "passiveSync" and "activeSync". + :vartype sync_mode: str or ~container_registry_management_client.models.SyncMode + :ivar sync_referrers: The status of syncing referrers. Valid values are 'Enabled' or + 'Disabled'. Known values are: "disabled" and "enabled". + :vartype sync_referrers: str or + ~container_registry_management_client.models.ReferrersSyncStatus + :ivar artifact_sync_filters: The filter properties of artifact sync. + :vartype artifact_sync_filters: + ~container_registry_management_client.models.ArtifactSyncFilterProperties + """ class CallbackConfig(_serialization.Model): @@ -1004,8 +1069,8 @@ class ConnectedRegistry(ProxyResource): :ivar type: The type of the resource. :vartype type: str :ivar system_data: Metadata pertaining to creation and last modification of the resource. - :vartype system_data: ~container_registry_management_client.models.SystemData - :ivar properties: The properties of the connected registry. + :vartype system_data: ~container_registry_management_client.models.ProxyResourceSystemData + :ivar properties: :vartype properties: ~container_registry_management_client.models.ConnectedRegistryProperties """ @@ -1020,13 +1085,13 @@ class ConnectedRegistry(ProxyResource): "id": {"key": "id", "type": "str"}, "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, + "system_data": {"key": "systemData", "type": "ProxyResourceSystemData"}, "properties": {"key": "properties", "type": "ConnectedRegistryProperties"}, } def __init__(self, *, properties: Optional["_models.ConnectedRegistryProperties"] = None, **kwargs: Any) -> None: """ - :keyword properties: The properties of the connected registry. + :keyword properties: :paramtype properties: ~container_registry_management_client.models.ConnectedRegistryProperties """ super().__init__(**kwargs) @@ -1067,7 +1132,7 @@ def __init__( self.next_link = next_link -class ConnectedRegistryProperties(_serialization.Model): +class ConnectedRegistryPropertiesAutoGenerated(_serialization.Model): """The properties of a connected registry. Variables are only populated by the server, and will be ignored when sending a request. @@ -1090,7 +1155,7 @@ class ConnectedRegistryProperties(_serialization.Model): :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. + :ivar parent: The properties of the connected registry parent. 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. @@ -1116,7 +1181,6 @@ class ConnectedRegistryProperties(_serialization.Model): "version": {"readonly": True}, "connection_state": {"readonly": True}, "last_activity_time": {"readonly": True}, - "activation": {"readonly": True}, "parent": {"required": True}, "status_details": {"readonly": True}, } @@ -1142,6 +1206,7 @@ def __init__( *, mode: Union[str, "_models.ConnectedRegistryMode"], parent: "_models.ParentProperties", + activation: Optional["_models.ActivationProperties"] = None, client_token_ids: Optional[list[str]] = None, login_server: Optional["_models.LoginServerProperties"] = None, logging: Optional["_models.LoggingProperties"] = None, @@ -1153,7 +1218,9 @@ def __init__( :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. + :keyword activation: The activation properties of the connected registry. + :paramtype activation: ~container_registry_management_client.models.ActivationProperties + :keyword parent: The properties of the connected registry parent. 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. @@ -1175,7 +1242,7 @@ def __init__( 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.activation = activation self.parent = parent self.client_token_ids = client_token_ids self.login_server = login_server @@ -1185,25 +1252,69 @@ def __init__( self.garbage_collection = garbage_collection +class ConnectedRegistryProperties(ConnectedRegistryPropertiesAutoGenerated): + """ConnectedRegistryProperties. + + 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 properties of the connected registry parent. 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 + """ + + class ConnectedRegistryUpdateParameters(_serialization.Model): """The parameters for updating a connected registry. - :ivar properties: The properties of the connected registry update parameters. + :ivar properties: :vartype properties: - ~container_registry_management_client.models.ConnectedRegistryUpdateProperties + ~container_registry_management_client.models.ConnectedRegistryUpdateParametersProperties """ _attribute_map = { - "properties": {"key": "properties", "type": "ConnectedRegistryUpdateProperties"}, + "properties": {"key": "properties", "type": "ConnectedRegistryUpdateParametersProperties"}, } def __init__( - self, *, properties: Optional["_models.ConnectedRegistryUpdateProperties"] = None, **kwargs: Any + self, *, properties: Optional["_models.ConnectedRegistryUpdateParametersProperties"] = None, **kwargs: Any ) -> None: """ - :keyword properties: The properties of the connected registry update parameters. + :keyword properties: :paramtype properties: - ~container_registry_management_client.models.ConnectedRegistryUpdateProperties + ~container_registry_management_client.models.ConnectedRegistryUpdateParametersProperties """ super().__init__(**kwargs) self.properties = properties @@ -1212,7 +1323,8 @@ def __init__( class ConnectedRegistryUpdateProperties(_serialization.Model): """The parameters for updating token properties. - :ivar sync_properties: The sync properties of the connected registry with its parent. + :ivar sync_properties: The parameters for updating 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 @@ -1246,7 +1358,8 @@ def __init__( **kwargs: Any ) -> None: """ - :keyword sync_properties: The sync properties of the connected registry with its parent. + :keyword sync_properties: The parameters for updating 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 @@ -1268,6 +1381,26 @@ def __init__( self.garbage_collection = garbage_collection +class ConnectedRegistryUpdateParametersProperties(ConnectedRegistryUpdateProperties): # pylint: disable=name-too-long + """ConnectedRegistryUpdateParametersProperties. + + :ivar sync_properties: The parameters for updating 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 + """ + + class CredentialHealth(_serialization.Model): """The health of the auth credential. @@ -1319,11 +1452,10 @@ class CredentialSet(ProxyResource): :ivar type: The type of the resource. :vartype type: str :ivar system_data: Metadata pertaining to creation and last modification of the resource. - :vartype system_data: ~container_registry_management_client.models.SystemData - :ivar identity: Identities associated with the resource. This is used to access the KeyVault - secrets. + :vartype system_data: ~container_registry_management_client.models.ProxyResourceSystemData + :ivar identity: Managed identity for the resource. :vartype identity: ~container_registry_management_client.models.IdentityProperties - :ivar properties: The properties of the credential set. + :ivar properties: :vartype properties: ~container_registry_management_client.models.CredentialSetProperties """ @@ -1338,7 +1470,7 @@ class CredentialSet(ProxyResource): "id": {"key": "id", "type": "str"}, "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, + "system_data": {"key": "systemData", "type": "ProxyResourceSystemData"}, "identity": {"key": "identity", "type": "IdentityProperties"}, "properties": {"key": "properties", "type": "CredentialSetProperties"}, } @@ -1351,10 +1483,9 @@ def __init__( **kwargs: Any ) -> None: """ - :keyword identity: Identities associated with the resource. This is used to access the KeyVault - secrets. + :keyword identity: Managed identity for the resource. :paramtype identity: ~container_registry_management_client.models.IdentityProperties - :keyword properties: The properties of the credential set. + :keyword properties: :paramtype properties: ~container_registry_management_client.models.CredentialSetProperties """ super().__init__(**kwargs) @@ -1392,15 +1523,15 @@ def __init__( self.next_link = next_link -class CredentialSetProperties(_serialization.Model): +class CredentialSetPropertiesAutoGenerated(_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. + :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 @@ -1432,8 +1563,8 @@ def __init__( """ :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. + :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) @@ -1443,34 +1574,52 @@ def __init__( self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None +class CredentialSetProperties(CredentialSetPropertiesAutoGenerated): + """CredentialSetProperties. + + 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 + """ + + 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. + :ivar properties: + :vartype properties: + ~container_registry_management_client.models.CredentialSetUpdateParametersProperties + :ivar identity: Managed identity for the resource. :vartype identity: ~container_registry_management_client.models.IdentityProperties """ _attribute_map = { - "properties": {"key": "properties", "type": "CredentialSetUpdateProperties"}, + "properties": {"key": "properties", "type": "CredentialSetUpdateParametersProperties"}, "identity": {"key": "identity", "type": "IdentityProperties"}, } def __init__( self, *, - properties: Optional["_models.CredentialSetUpdateProperties"] = None, + properties: Optional["_models.CredentialSetUpdateParametersProperties"] = None, identity: Optional["_models.IdentityProperties"] = None, **kwargs: Any ) -> None: """ - :keyword properties: The properties of the credential set update parameters. + :keyword properties: :paramtype properties: - ~container_registry_management_client.models.CredentialSetUpdateProperties - :keyword identity: Identities associated with the resource. This is used to access the KeyVault - secrets. + ~container_registry_management_client.models.CredentialSetUpdateParametersProperties + :keyword identity: Managed identity for the resource. :paramtype identity: ~container_registry_management_client.models.IdentityProperties """ super().__init__(**kwargs) @@ -1481,8 +1630,8 @@ def __init__( 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. + :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] """ @@ -1492,14 +1641,23 @@ class CredentialSetUpdateProperties(_serialization.Model): 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. + :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 CredentialSetUpdateParametersProperties(CredentialSetUpdateProperties): + """CredentialSetUpdateParametersProperties. + + :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] + """ + + class DebianArchivePackageSourceProperties(ArchivePackageSourceProperties): """The properties of the archive package source. @@ -1542,7 +1700,7 @@ class DebianArchiveProperties(ArchiveProperties): Variables are only populated by the server, and will be ignored when sending a request. - :ivar package_source: The package source of the archive. + :ivar package_source: The properties of the archive package source. :vartype package_source: ~container_registry_management_client.models.ArchivePackageSourceProperties :ivar published_version: The published version of the archive. @@ -1584,7 +1742,7 @@ def __init__( **kwargs: Any ) -> None: """ - :keyword package_source: The package source of the archive. + :keyword package_source: The properties of the archive package source. :paramtype package_source: ~container_registry_management_client.models.ArchivePackageSourceProperties :keyword published_version: The published version of the archive. @@ -1609,7 +1767,7 @@ class EncryptionProperty(_serialization.Model): :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. + :ivar key_vault_properties: :vartype key_vault_properties: ~container_registry_management_client.models.KeyVaultProperties """ @@ -1629,7 +1787,7 @@ def __init__( :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. + :keyword key_vault_properties: :paramtype key_vault_properties: ~container_registry_management_client.models.KeyVaultProperties """ @@ -2012,12 +2170,12 @@ class ExportPipeline(ProxyResource): :ivar type: The type of the resource. :vartype type: str :ivar system_data: Metadata pertaining to creation and last modification of the resource. - :vartype system_data: ~container_registry_management_client.models.SystemData + :vartype system_data: ~container_registry_management_client.models.ProxyResourceSystemData :ivar location: The location of the export pipeline. :vartype location: str - :ivar identity: The identity of the export pipeline. + :ivar identity: Managed identity for the resource. :vartype identity: ~container_registry_management_client.models.IdentityProperties - :ivar properties: The properties of the export pipeline. + :ivar properties: :vartype properties: ~container_registry_management_client.models.ExportPipelineProperties """ @@ -2032,7 +2190,7 @@ class ExportPipeline(ProxyResource): "id": {"key": "id", "type": "str"}, "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, + "system_data": {"key": "systemData", "type": "ProxyResourceSystemData"}, "location": {"key": "location", "type": "str"}, "identity": {"key": "identity", "type": "IdentityProperties"}, "properties": {"key": "properties", "type": "ExportPipelineProperties"}, @@ -2049,9 +2207,9 @@ def __init__( """ :keyword location: The location of the export pipeline. :paramtype location: str - :keyword identity: The identity of the export pipeline. + :keyword identity: Managed identity for the resource. :paramtype identity: ~container_registry_management_client.models.IdentityProperties - :keyword properties: The properties of the export pipeline. + :keyword properties: :paramtype properties: ~container_registry_management_client.models.ExportPipelineProperties """ super().__init__(**kwargs) @@ -2090,14 +2248,14 @@ def __init__( self.next_link = next_link -class ExportPipelineProperties(_serialization.Model): +class ExportPipelinePropertiesAutoGenerated(_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. + :ivar target: The properties of the export pipeline target. 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] @@ -2127,7 +2285,7 @@ def __init__( **kwargs: Any ) -> None: """ - :keyword target: The target properties of the export pipeline. Required. + :keyword target: The properties of the export pipeline target. 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] @@ -2138,6 +2296,25 @@ def __init__( self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None +class ExportPipelineProperties(ExportPipelinePropertiesAutoGenerated): + """ExportPipelineProperties. + + 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 properties of the export pipeline target. 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 + """ + + class ExportPipelineTargetProperties(_serialization.Model): """The properties of the export pipeline target. @@ -2145,9 +2322,9 @@ class ExportPipelineTargetProperties(_serialization.Model): :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". + :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. Required. @@ -2170,9 +2347,9 @@ def __init__( """ :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". + :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. Required. @@ -2323,10 +2500,9 @@ class IdentityProperties(_serialization.Model): "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: + user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/ - providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. :vartype user_assigned_identities: dict[str, ~container_registry_management_client.models.UserIdentityProperties] """ @@ -2355,10 +2531,9 @@ def __init__( "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: + The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/ - providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. :paramtype user_assigned_identities: dict[str, ~container_registry_management_client.models.UserIdentityProperties] """ @@ -2370,13 +2545,11 @@ def __init__( class ImageTypeFilter(_serialization.Model): - """Specifies the types of OCI images to include or exclude in the filter. OCI images are container - images that follow the OCI image specification, typically used for running containers. + """ImageTypeFilter. - :ivar type: The type of values. Allowed values are either 'include' or 'exclude'. Known values - are: "include" and "exclude". + :ivar type: Known values are: "include" and "exclude". :vartype type: str or ~container_registry_management_client.models.ImageTypeFilterType - :ivar values: The list of image types to include or exclude from the filter. + :ivar values: :vartype values: list[str] """ @@ -2393,10 +2566,9 @@ def __init__( **kwargs: Any ) -> None: """ - :keyword type: The type of values. Allowed values are either 'include' or 'exclude'. Known - values are: "include" and "exclude". + :keyword type: Known values are: "include" and "exclude". :paramtype type: str or ~container_registry_management_client.models.ImageTypeFilterType - :keyword values: The list of image types to include or exclude from the filter. + :keyword values: :paramtype values: list[str] """ super().__init__(**kwargs) @@ -2409,7 +2581,7 @@ class ImportImageParameters(_serialization.Model): All required parameters must be populated in order to send to server. - :ivar source: The source of the image. Required. + :ivar source: 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). @@ -2444,7 +2616,7 @@ def __init__( **kwargs: Any ) -> None: """ - :keyword source: The source of the image. Required. + :keyword source: 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). @@ -2476,12 +2648,12 @@ class ImportPipeline(ProxyResource): :ivar type: The type of the resource. :vartype type: str :ivar system_data: Metadata pertaining to creation and last modification of the resource. - :vartype system_data: ~container_registry_management_client.models.SystemData + :vartype system_data: ~container_registry_management_client.models.ProxyResourceSystemData :ivar location: The location of the import pipeline. :vartype location: str - :ivar identity: The identity of the import pipeline. + :ivar identity: Managed identity for the resource. :vartype identity: ~container_registry_management_client.models.IdentityProperties - :ivar properties: The properties of the import pipeline. + :ivar properties: :vartype properties: ~container_registry_management_client.models.ImportPipelineProperties """ @@ -2496,7 +2668,7 @@ class ImportPipeline(ProxyResource): "id": {"key": "id", "type": "str"}, "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, + "system_data": {"key": "systemData", "type": "ProxyResourceSystemData"}, "location": {"key": "location", "type": "str"}, "identity": {"key": "identity", "type": "IdentityProperties"}, "properties": {"key": "properties", "type": "ImportPipelineProperties"}, @@ -2513,9 +2685,9 @@ def __init__( """ :keyword location: The location of the import pipeline. :paramtype location: str - :keyword identity: The identity of the import pipeline. + :keyword identity: Managed identity for the resource. :paramtype identity: ~container_registry_management_client.models.IdentityProperties - :keyword properties: The properties of the import pipeline. + :keyword properties: :paramtype properties: ~container_registry_management_client.models.ImportPipelineProperties """ super().__init__(**kwargs) @@ -2554,16 +2726,16 @@ def __init__( self.next_link = next_link -class ImportPipelineProperties(_serialization.Model): +class ImportPipelinePropertiesAutoGenerated(_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. + :ivar source: The properties of the import pipeline source. Required. :vartype source: ~container_registry_management_client.models.ImportPipelineSourceProperties - :ivar trigger: The properties that describe the trigger of the import pipeline. + :ivar trigger: :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] @@ -2595,9 +2767,9 @@ def __init__( **kwargs: Any ) -> None: """ - :keyword source: The source properties of the import pipeline. Required. + :keyword source: The properties of the import pipeline source. Required. :paramtype source: ~container_registry_management_client.models.ImportPipelineSourceProperties - :keyword trigger: The properties that describe the trigger of the import pipeline. + :keyword trigger: :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] @@ -2609,16 +2781,37 @@ def __init__( self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None -class ImportPipelineSourceProperties(_serialization.Model): - """The properties of the import pipeline source. +class ImportPipelineProperties(ImportPipelinePropertiesAutoGenerated): + """ImportPipelineProperties. + + 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 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". + :ivar source: The properties of the import pipeline source. Required. + :vartype source: ~container_registry_management_client.models.ImportPipelineSourceProperties + :ivar trigger: + :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 + """ + + +class ImportPipelineSourceProperties(_serialization.Model): + """The properties of the import pipeline source. + + All required parameters must be populated in order to send to server. + + :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. Required. @@ -2646,9 +2839,9 @@ def __init__( """ :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". + :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. Required. @@ -2667,16 +2860,16 @@ class ImportSource(_serialization.Model): :ivar resource_id: The resource identifier of the source Azure Container Registry. :vartype resource_id: str + :ivar cache_rule_resource_id: The resource identifier of the source Cache Rule. + :vartype cache_rule_resource_id: str :ivar registry_uri: The address of the source registry (e.g. 'mcr.microsoft.com'). :vartype registry_uri: str - :ivar cache_rule_resource_id: The resource identifier of the source cache rule. - :vartype cache_rule_resource_id: str - :ivar credentials: Credentials used when importing from a registry uri. + :ivar credentials: :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. + :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 """ @@ -2686,8 +2879,8 @@ class ImportSource(_serialization.Model): _attribute_map = { "resource_id": {"key": "resourceId", "type": "str"}, - "registry_uri": {"key": "registryUri", "type": "str"}, "cache_rule_resource_id": {"key": "cacheRuleResourceId", "type": "str"}, + "registry_uri": {"key": "registryUri", "type": "str"}, "credentials": {"key": "credentials", "type": "ImportSourceCredentials"}, "source_image": {"key": "sourceImage", "type": "str"}, } @@ -2697,30 +2890,30 @@ def __init__( *, source_image: str, resource_id: Optional[str] = None, - registry_uri: Optional[str] = None, cache_rule_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 cache_rule_resource_id: The resource identifier of the source Cache Rule. + :paramtype cache_rule_resource_id: str :keyword registry_uri: The address of the source registry (e.g. 'mcr.microsoft.com'). :paramtype registry_uri: str - :keyword cache_rule_resource_id: The resource identifier of the source cache rule. - :paramtype cache_rule_resource_id: str - :keyword credentials: Credentials used when importing from a registry uri. + :keyword credentials: :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. + :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.cache_rule_resource_id = cache_rule_resource_id + self.registry_uri = registry_uri self.credentials = credentials self.source_image = source_image @@ -2889,7 +3082,6 @@ class LoginServerProperties(_serialization.Model): _validation = { "host": {"readonly": True}, - "tls": {"readonly": True}, } _attribute_map = { @@ -2897,11 +3089,14 @@ class LoginServerProperties(_serialization.Model): "tls": {"key": "tls", "type": "TlsProperties"}, } - def __init__(self, **kwargs: Any) -> None: - """ """ + def __init__(self, *, tls: Optional["_models.TlsProperties"] = None, **kwargs: Any) -> None: + """ + :keyword tls: The TLS properties of the connected registry login server. + :paramtype tls: ~container_registry_management_client.models.TlsProperties + """ super().__init__(**kwargs) self.host: Optional[str] = None - self.tls: Optional["_models.TlsProperties"] = None + self.tls = tls class NetworkRuleSet(_serialization.Model): @@ -2951,10 +3146,10 @@ class OperationDefinition(_serialization.Model): :vartype origin: str :ivar name: Operation name: {provider}/{resource}/{operation}. :vartype name: str - :ivar display: The display information for the container registry operation. + :ivar display: The display information for a 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 properties: + :vartype properties: ~container_registry_management_client.models.OperationDefinitionProperties :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. @@ -2965,7 +3160,7 @@ class OperationDefinition(_serialization.Model): "origin": {"key": "origin", "type": "str"}, "name": {"key": "name", "type": "str"}, "display": {"key": "display", "type": "OperationDisplayDefinition"}, - "properties": {"key": "properties", "type": "OperationPropertiesDefinition"}, + "properties": {"key": "properties", "type": "OperationDefinitionProperties"}, "is_data_action": {"key": "isDataAction", "type": "bool"}, } @@ -2975,7 +3170,7 @@ def __init__( origin: Optional[str] = None, name: Optional[str] = None, display: Optional["_models.OperationDisplayDefinition"] = None, - properties: Optional["_models.OperationPropertiesDefinition"] = None, + properties: Optional["_models.OperationDefinitionProperties"] = None, is_data_action: Optional[bool] = None, **kwargs: Any ) -> None: @@ -2984,11 +3179,11 @@ def __init__( :paramtype origin: str :keyword name: Operation name: {provider}/{resource}/{operation}. :paramtype name: str - :keyword display: The display information for the container registry operation. + :keyword display: The display information for a container registry operation. :paramtype display: ~container_registry_management_client.models.OperationDisplayDefinition - :keyword properties: The properties information for the container registry operation. + :keyword properties: :paramtype properties: - ~container_registry_management_client.models.OperationPropertiesDefinition + ~container_registry_management_client.models.OperationDefinitionProperties :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. @@ -3002,6 +3197,42 @@ def __init__( self.is_data_action = is_data_action +class OperationPropertiesDefinition(_serialization.Model): + """The definition of Azure Monitoring properties. + + :ivar service_specification: The definition of Azure Monitoring list. + :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 list. + :paramtype service_specification: + ~container_registry_management_client.models.OperationServiceSpecificationDefinition + """ + super().__init__(**kwargs) + self.service_specification = service_specification + + +class OperationDefinitionProperties(OperationPropertiesDefinition): + """OperationDefinitionProperties. + + :ivar service_specification: The definition of Azure Monitoring list. + :vartype service_specification: + ~container_registry_management_client.models.OperationServiceSpecificationDefinition + """ + + class OperationDisplayDefinition(_serialization.Model): """The display information for a container registry operation. @@ -3183,33 +3414,6 @@ def __init__( 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. @@ -3246,36 +3450,6 @@ def __init__( self.log_specifications = log_specifications -class PackageType(_serialization.Model): - """The properties of a package type. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: The name of the package type. - :vartype name: str - :ivar endpoint: The endpoint of the package type. - :vartype endpoint: str - """ - - _validation = { - "endpoint": {"readonly": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "endpoint": {"key": "endpoint", "type": "str"}, - } - - def __init__(self, *, name: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword name: The name of the package type. - :paramtype name: str - """ - super().__init__(**kwargs) - self.name = name - self.endpoint: Optional[str] = None - - class ParentProperties(_serialization.Model): """The properties of the connected registry parent. @@ -3327,8 +3501,8 @@ class PipelineRun(ProxyResource): :ivar type: The type of the resource. :vartype type: str :ivar system_data: Metadata pertaining to creation and last modification of the resource. - :vartype system_data: ~container_registry_management_client.models.SystemData - :ivar properties: The properties of a pipeline run. + :vartype system_data: ~container_registry_management_client.models.ProxyResourceSystemData + :ivar properties: :vartype properties: ~container_registry_management_client.models.PipelineRunProperties """ @@ -3343,13 +3517,13 @@ class PipelineRun(ProxyResource): "id": {"key": "id", "type": "str"}, "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, + "system_data": {"key": "systemData", "type": "ProxyResourceSystemData"}, "properties": {"key": "properties", "type": "PipelineRunProperties"}, } def __init__(self, *, properties: Optional["_models.PipelineRunProperties"] = None, **kwargs: Any) -> None: """ - :keyword properties: The properties of a pipeline run. + :keyword properties: :paramtype properties: ~container_registry_management_client.models.PipelineRunProperties """ super().__init__(**kwargs) @@ -3386,7 +3560,7 @@ def __init__( self.next_link = next_link -class PipelineRunProperties(_serialization.Model): +class PipelineRunPropertiesAutoGenerated(_serialization.Model): """The properties of a pipeline run. Variables are only populated by the server, and will be ignored when sending a request. @@ -3395,10 +3569,10 @@ class PipelineRunProperties(_serialization.Model): "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. + :ivar request: The request properties provided 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 response: + :vartype response: ~container_registry_management_client.models.PipelineRunPropertiesResponse :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 @@ -3412,7 +3586,7 @@ class PipelineRunProperties(_serialization.Model): _attribute_map = { "provisioning_state": {"key": "provisioningState", "type": "str"}, "request": {"key": "request", "type": "PipelineRunRequest"}, - "response": {"key": "response", "type": "PipelineRunResponse"}, + "response": {"key": "response", "type": "PipelineRunPropertiesResponse"}, "force_update_tag": {"key": "forceUpdateTag", "type": "str"}, } @@ -3424,7 +3598,7 @@ def __init__( **kwargs: Any ) -> None: """ - :keyword request: The request parameters for a pipeline run. + :keyword request: The request properties provided 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. @@ -3433,67 +3607,27 @@ def __init__( super().__init__(**kwargs) self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None self.request = request - self.response: Optional["_models.PipelineRunResponse"] = None + self.response: Optional["_models.PipelineRunPropertiesResponse"] = 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 - """ +class PipelineRunProperties(PipelineRunPropertiesAutoGenerated): + """PipelineRunProperties. - _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"}, - } + Variables are only populated by the server, and will be ignored when sending a request. - 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 + :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 properties provided for a pipeline run. + :vartype request: ~container_registry_management_client.models.PipelineRunRequest + :ivar response: + :vartype response: ~container_registry_management_client.models.PipelineRunPropertiesResponse + :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 + """ class PipelineRunResponse(_serialization.Model): @@ -3503,19 +3637,19 @@ class PipelineRunResponse(_serialization.Model): :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. + :ivar progress: :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. + :ivar source: The properties of the import pipeline source. :vartype source: ~container_registry_management_client.models.ImportPipelineSourceProperties - :ivar target: The target of the pipeline run. + :ivar target: The properties of the export pipeline target. :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. + :ivar trigger: :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. @@ -3555,19 +3689,19 @@ def __init__( :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. + :keyword progress: :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. + :keyword source: The properties of the import pipeline source. :paramtype source: ~container_registry_management_client.models.ImportPipelineSourceProperties - :keyword target: The target of the pipeline run. + :keyword target: The properties of the export pipeline target. :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. + :keyword trigger: :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. @@ -3586,6 +3720,92 @@ def __init__( self.pipeline_run_error_message = pipeline_run_error_message +class PipelineRunPropertiesResponse(PipelineRunResponse): + """PipelineRunPropertiesResponse. + + :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: + :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 properties of the import pipeline source. + :vartype source: ~container_registry_management_client.models.ImportPipelineSourceProperties + :ivar target: The properties of the export pipeline target. + :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: + :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 + """ + + +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: + :vartype source: ~container_registry_management_client.models.PipelineRunSourceProperties + :ivar target: + :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: + :paramtype source: ~container_registry_management_client.models.PipelineRunSourceProperties + :keyword target: + :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 PipelineRunSourceProperties(_serialization.Model): """PipelineRunSourceProperties. @@ -3701,7 +3921,7 @@ def __init__(self, *, status: Union[str, "_models.TriggerStatus"] = "Enabled", * class PipelineTriggerDescriptor(_serialization.Model): """PipelineTriggerDescriptor. - :ivar source_trigger: The source trigger that caused the pipeline run. + :ivar source_trigger: :vartype source_trigger: ~container_registry_management_client.models.PipelineSourceTriggerDescriptor """ @@ -3714,7 +3934,7 @@ def __init__( self, *, source_trigger: Optional["_models.PipelineSourceTriggerDescriptor"] = None, **kwargs: Any ) -> None: """ - :keyword source_trigger: The source trigger that caused the pipeline run. + :keyword source_trigger: :paramtype source_trigger: ~container_registry_management_client.models.PipelineSourceTriggerDescriptor """ @@ -3725,7 +3945,7 @@ def __init__( class PipelineTriggerProperties(_serialization.Model): """PipelineTriggerProperties. - :ivar source_trigger: The source trigger properties of the pipeline. + :ivar source_trigger: :vartype source_trigger: ~container_registry_management_client.models.PipelineSourceTriggerProperties """ @@ -3738,7 +3958,7 @@ def __init__( self, *, source_trigger: Optional["_models.PipelineSourceTriggerProperties"] = None, **kwargs: Any ) -> None: """ - :keyword source_trigger: The source trigger properties of the pipeline. + :keyword source_trigger: :paramtype source_trigger: ~container_registry_management_client.models.PipelineSourceTriggerProperties """ @@ -3747,9 +3967,7 @@ def __init__( class PlatformFilter(_serialization.Model): - """Specifies the platform attributes (such as operating system, architecture, and variant) to - include or exclude in the filter. This allows selection of OCI artifacts or images that match - specific platform requirements, such as linux/amd64 or windows/arm64. + """PlatformFilter. :ivar type: The type of values. For example, 'array'. "array" :vartype type: str or ~container_registry_management_client.models.PlatformFilterType @@ -3791,8 +4009,8 @@ class Policies(_serialization.Model): :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. + :ivar azure_ad_authentication_as_arm_policy: The policy for using ARM 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. @@ -3831,8 +4049,8 @@ def __init__( :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. + :keyword azure_ad_authentication_as_arm_policy: The policy for using ARM 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. @@ -3880,8 +4098,8 @@ class PrivateEndpointConnection(ProxyResource): :ivar type: The type of the resource. :vartype type: str :ivar system_data: Metadata pertaining to creation and last modification of the resource. - :vartype system_data: ~container_registry_management_client.models.SystemData - :ivar properties: The properties of a private endpoint connection. + :vartype system_data: ~container_registry_management_client.models.ProxyResourceSystemData + :ivar properties: :vartype properties: ~container_registry_management_client.models.PrivateEndpointConnectionProperties """ @@ -3897,7 +4115,7 @@ class PrivateEndpointConnection(ProxyResource): "id": {"key": "id", "type": "str"}, "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, + "system_data": {"key": "systemData", "type": "ProxyResourceSystemData"}, "properties": {"key": "properties", "type": "PrivateEndpointConnectionProperties"}, } @@ -3905,7 +4123,7 @@ def __init__( self, *, properties: Optional["_models.PrivateEndpointConnectionProperties"] = None, **kwargs: Any ) -> None: """ - :keyword properties: The properties of a private endpoint connection. + :keyword properties: :paramtype properties: ~container_registry_management_client.models.PrivateEndpointConnectionProperties """ @@ -3949,15 +4167,14 @@ def __init__( self.next_link = next_link -class PrivateEndpointConnectionProperties(_serialization.Model): +class PrivateEndpointConnectionPropertiesAutoGenerated(_serialization.Model): # pylint: disable=name-too-long """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. + :ivar private_endpoint: The Private Endpoint resource. :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. + :ivar private_link_service_connection_state: The state of a private link service connection. :vartype private_link_service_connection_state: ~container_registry_management_client.models.PrivateLinkServiceConnectionState :ivar provisioning_state: The provisioning state of private endpoint connection resource. Known @@ -3987,10 +4204,9 @@ def __init__( **kwargs: Any ) -> None: """ - :keyword private_endpoint: The resource of private endpoint. + :keyword private_endpoint: The Private Endpoint resource. :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. + :keyword private_link_service_connection_state: The state of a private link service connection. :paramtype private_link_service_connection_state: ~container_registry_management_client.models.PrivateLinkServiceConnectionState """ @@ -4000,53 +4216,62 @@ def __init__( self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None -class PrivateLinkResource(_serialization.Model): +class PrivateEndpointConnectionProperties(PrivateEndpointConnectionPropertiesAutoGenerated): + """PrivateEndpointConnectionProperties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar private_endpoint: The Private Endpoint resource. + :vartype private_endpoint: ~container_registry_management_client.models.PrivateEndpoint + :ivar private_link_service_connection_state: The state of a private link service connection. + :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 + """ + + +class PrivateLinkResource(ProxyResource): """A resource that supports private link capabilities. Variables are only populated by the server, and will be ignored when sending a request. - :ivar type: The resource type is private link resource. - :vartype type: str :ivar id: The resource ID. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar properties: A resource that supports private link capabilities. + :ivar type: The type of the resource. + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~container_registry_management_client.models.ProxyResourceSystemData + :ivar 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 = { - "type": {"key": "type", "type": "str"}, "id": {"key": "id", "type": "str"}, "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "ProxyResourceSystemData"}, "properties": {"key": "properties", "type": "PrivateLinkResourceProperties"}, } - def __init__( - self, - *, - id: Optional[str] = None, # pylint: disable=redefined-builtin - name: Optional[str] = None, - properties: Optional["_models.PrivateLinkResourceProperties"] = None, - **kwargs: Any - ) -> None: + def __init__(self, *, properties: Optional["_models.PrivateLinkResourceProperties"] = None, **kwargs: Any) -> None: """ - :keyword id: The resource ID. - :paramtype id: str - :keyword name: The name of the resource. - :paramtype name: str - :keyword properties: A resource that supports private link capabilities. + :keyword properties: :paramtype properties: ~container_registry_management_client.models.PrivateLinkResourceProperties """ super().__init__(**kwargs) - self.type: Optional[str] = None - self.id = id - self.name = name self.properties = properties @@ -4085,7 +4310,7 @@ def __init__( self.next_link = next_link -class PrivateLinkResourceProperties(_serialization.Model): +class PrivateLinkResourcePropertiesAutoGenerated(_serialization.Model): # pylint: disable=name-too-long """The properties of a private link resource. :ivar group_id: The private link resource group id. @@ -4124,6 +4349,18 @@ def __init__( self.required_zone_names = required_zone_names +class PrivateLinkResourceProperties(PrivateLinkResourcePropertiesAutoGenerated): + """PrivateLinkResourceProperties. + + :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] + """ + + class PrivateLinkServiceConnectionState(_serialization.Model): """The state of a private link service connection. @@ -4190,6 +4427,93 @@ def __init__(self, *, percentage: Optional[str] = None, **kwargs: Any) -> None: self.percentage = percentage +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.LastModifiedByType + :ivar last_modified_at: The timestamp of resource 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.LastModifiedByType"]] = 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.LastModifiedByType + :keyword last_modified_at: The timestamp of resource 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 ProxyResourceSystemData(SystemData): + """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.LastModifiedByType + :ivar last_modified_at: The timestamp of resource modification (UTC). + :vartype last_modified_at: ~datetime.datetime + """ + + class QuarantinePolicy(_serialization.Model): """The quarantine policy for a container registry. @@ -4259,7 +4583,7 @@ class Resource(_serialization.Model): :ivar tags: The tags of the resource. :vartype tags: dict[str, str] :ivar system_data: Metadata pertaining to creation and last modification of the resource. - :vartype system_data: ~container_registry_management_client.models.SystemData + :vartype system_data: ~container_registry_management_client.models.ResourceSystemData """ _validation = { @@ -4276,7 +4600,7 @@ class Resource(_serialization.Model): "type": {"key": "type", "type": "str"}, "location": {"key": "location", "type": "str"}, "tags": {"key": "tags", "type": "{str}"}, - "system_data": {"key": "systemData", "type": "SystemData"}, + "system_data": {"key": "systemData", "type": "ResourceSystemData"}, } def __init__(self, *, location: str, tags: Optional[dict[str, str]] = None, **kwargs: Any) -> None: @@ -4293,7 +4617,7 @@ def __init__(self, *, location: str, tags: Optional[dict[str, str]] = None, **kw self.type: Optional[str] = None self.location = location self.tags = tags - self.system_data: Optional["_models.SystemData"] = None + self.system_data: Optional["_models.ResourceSystemData"] = None class Registry(Resource): @@ -4315,12 +4639,12 @@ class Registry(Resource): :ivar tags: The tags of the resource. :vartype tags: dict[str, str] :ivar system_data: Metadata pertaining to creation and last modification of the resource. - :vartype system_data: ~container_registry_management_client.models.SystemData - :ivar sku: The SKU of the container registry. Required. + :vartype system_data: ~container_registry_management_client.models.ResourceSystemData + :ivar sku: The SKU of a container registry. Required. :vartype sku: ~container_registry_management_client.models.Sku - :ivar identity: The identity of the container registry. + :ivar identity: Managed identity for the resource. :vartype identity: ~container_registry_management_client.models.IdentityProperties - :ivar properties: The properties of the container registry. + :ivar properties: :vartype properties: ~container_registry_management_client.models.RegistryProperties """ @@ -4339,7 +4663,7 @@ class Registry(Resource): "type": {"key": "type", "type": "str"}, "location": {"key": "location", "type": "str"}, "tags": {"key": "tags", "type": "{str}"}, - "system_data": {"key": "systemData", "type": "SystemData"}, + "system_data": {"key": "systemData", "type": "ResourceSystemData"}, "sku": {"key": "sku", "type": "Sku"}, "identity": {"key": "identity", "type": "IdentityProperties"}, "properties": {"key": "properties", "type": "RegistryProperties"}, @@ -4361,11 +4685,11 @@ def __init__( :paramtype location: str :keyword tags: The tags of the resource. :paramtype tags: dict[str, str] - :keyword sku: The SKU of the container registry. Required. + :keyword sku: The SKU of a container registry. Required. :paramtype sku: ~container_registry_management_client.models.Sku - :keyword identity: The identity of the container registry. + :keyword identity: Managed identity for the resource. :paramtype identity: ~container_registry_management_client.models.IdentityProperties - :keyword properties: The properties of the container registry. + :keyword properties: :paramtype properties: ~container_registry_management_client.models.RegistryProperties """ super().__init__(location=location, tags=tags, **kwargs) @@ -4578,7 +4902,7 @@ def __init__( self.value = value -class RegistryProperties(_serialization.Model): +class RegistryPropertiesAutoGenerated(_serialization.Model): """The properties of a container registry. Variables are only populated by the server, and will be ignored when sending a request. @@ -4592,15 +4916,15 @@ class RegistryProperties(_serialization.Model): "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 status: + :vartype status: ~container_registry_management_client.models.RegistryPropertiesStatus :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. + :ivar encryption: :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 @@ -4630,15 +4954,15 @@ class RegistryProperties(_serialization.Model): :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 :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 = { @@ -4654,7 +4978,7 @@ class RegistryProperties(_serialization.Model): "login_server": {"key": "loginServer", "type": "str"}, "creation_date": {"key": "creationDate", "type": "iso-8601"}, "provisioning_state": {"key": "provisioningState", "type": "str"}, - "status": {"key": "status", "type": "Status"}, + "status": {"key": "status", "type": "RegistryPropertiesStatus"}, "admin_user_enabled": {"key": "adminUserEnabled", "type": "bool"}, "network_rule_set": {"key": "networkRuleSet", "type": "NetworkRuleSet"}, "policies": {"key": "policies", "type": "Policies"}, @@ -4668,8 +4992,8 @@ class RegistryProperties(_serialization.Model): "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"}, + "auto_generated_domain_name_label_scope": {"key": "autoGeneratedDomainNameLabelScope", "type": "str"}, } def __init__( @@ -4686,10 +5010,10 @@ def __init__( zone_redundancy: Optional[Union[str, "_models.ZoneRedundancy"]] = None, anonymous_pull_enabled: bool = False, metadata_search: Optional[Union[str, "_models.MetadataSearch"]] = None, + role_assignment_mode: Optional[Union[str, "_models.RoleAssignmentMode"]] = 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: """ @@ -4699,7 +5023,7 @@ def __init__( :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. + :keyword encryption: :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 @@ -4722,21 +5046,21 @@ def __init__( :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 :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.status: Optional["_models.RegistryPropertiesStatus"] = None self.admin_user_enabled = admin_user_enabled self.network_rule_set = network_rule_set self.policies = policies @@ -4750,8 +5074,119 @@ def __init__( 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 + self.auto_generated_domain_name_label_scope = auto_generated_domain_name_label_scope + + +class RegistryProperties(RegistryPropertiesAutoGenerated): + """RegistryProperties. + + 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: + :vartype status: ~container_registry_management_client.models.RegistryPropertiesStatus + :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: + :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 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 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 + :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 + """ + + +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 RegistryPropertiesStatus(Status): + """RegistryPropertiesStatus. + + 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 + """ class RegistryPropertiesUpdateParameters(_serialization.Model): @@ -4763,7 +5198,7 @@ class RegistryPropertiesUpdateParameters(_serialization.Model): :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. + :ivar encryption: :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 @@ -4826,7 +5261,7 @@ def __init__( :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. + :keyword encryption: :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 @@ -4868,22 +5303,22 @@ def __init__( class RegistryUpdateParameters(_serialization.Model): """The parameters for updating a container registry. - :ivar identity: The identity of the container registry. + :ivar identity: Managed identity for the resource. :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. + :ivar sku: The SKU of a container registry. :vartype sku: ~container_registry_management_client.models.Sku - :ivar properties: The properties that the container registry will be updated with. + :ivar properties: :vartype properties: - ~container_registry_management_client.models.RegistryPropertiesUpdateParameters + ~container_registry_management_client.models.RegistryUpdateParametersProperties """ _attribute_map = { "identity": {"key": "identity", "type": "IdentityProperties"}, "tags": {"key": "tags", "type": "{str}"}, "sku": {"key": "sku", "type": "Sku"}, - "properties": {"key": "properties", "type": "RegistryPropertiesUpdateParameters"}, + "properties": {"key": "properties", "type": "RegistryUpdateParametersProperties"}, } def __init__( @@ -4892,19 +5327,19 @@ def __init__( identity: Optional["_models.IdentityProperties"] = None, tags: Optional[dict[str, str]] = None, sku: Optional["_models.Sku"] = None, - properties: Optional["_models.RegistryPropertiesUpdateParameters"] = None, + properties: Optional["_models.RegistryUpdateParametersProperties"] = None, **kwargs: Any ) -> None: """ - :keyword identity: The identity of the container registry. + :keyword identity: Managed identity for the resource. :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. + :keyword sku: The SKU of a container registry. :paramtype sku: ~container_registry_management_client.models.Sku - :keyword properties: The properties that the container registry will be updated with. + :keyword properties: :paramtype properties: - ~container_registry_management_client.models.RegistryPropertiesUpdateParameters + ~container_registry_management_client.models.RegistryUpdateParametersProperties """ super().__init__(**kwargs) self.identity = identity @@ -4913,6 +5348,42 @@ def __init__( self.properties = properties +class RegistryUpdateParametersProperties(RegistryPropertiesUpdateParameters): + """RegistryUpdateParametersProperties. + + :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: + :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 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 + """ + + class RegistryUsage(_serialization.Model): """The quota usage for a container registry. @@ -4998,8 +5469,8 @@ class Replication(Resource): :ivar tags: The tags of the resource. :vartype tags: dict[str, str] :ivar system_data: Metadata pertaining to creation and last modification of the resource. - :vartype system_data: ~container_registry_management_client.models.SystemData - :ivar properties: The properties of the replication. + :vartype system_data: ~container_registry_management_client.models.ResourceSystemData + :ivar properties: :vartype properties: ~container_registry_management_client.models.ReplicationProperties """ @@ -5017,7 +5488,7 @@ class Replication(Resource): "type": {"key": "type", "type": "str"}, "location": {"key": "location", "type": "str"}, "tags": {"key": "tags", "type": "{str}"}, - "system_data": {"key": "systemData", "type": "SystemData"}, + "system_data": {"key": "systemData", "type": "ResourceSystemData"}, "properties": {"key": "properties", "type": "ReplicationProperties"}, } @@ -5035,7 +5506,7 @@ def __init__( :paramtype location: str :keyword tags: The tags of the resource. :paramtype tags: dict[str, str] - :keyword properties: The properties of the replication. + :keyword properties: :paramtype properties: ~container_registry_management_client.models.ReplicationProperties """ super().__init__(location=location, tags=tags, **kwargs) @@ -5072,7 +5543,7 @@ def __init__( self.next_link = next_link -class ReplicationProperties(_serialization.Model): +class ReplicationPropertiesAutoGenerated(_serialization.Model): """The properties of a replication. Variables are only populated by the server, and will be ignored when sending a request. @@ -5082,8 +5553,8 @@ class ReplicationProperties(_serialization.Model): "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 status: + :vartype status: ~container_registry_management_client.models.ReplicationPropertiesStatus :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. @@ -5100,7 +5571,7 @@ class ReplicationProperties(_serialization.Model): _attribute_map = { "provisioning_state": {"key": "provisioningState", "type": "str"}, - "status": {"key": "status", "type": "Status"}, + "status": {"key": "status", "type": "ReplicationPropertiesStatus"}, "region_endpoint_enabled": {"key": "regionEndpointEnabled", "type": "bool"}, "zone_redundancy": {"key": "zoneRedundancy", "type": "str"}, } @@ -5123,17 +5594,53 @@ def __init__( """ super().__init__(**kwargs) self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None - self.status: Optional["_models.Status"] = None + self.status: Optional["_models.ReplicationPropertiesStatus"] = None self.region_endpoint_enabled = region_endpoint_enabled self.zone_redundancy = zone_redundancy +class ReplicationProperties(ReplicationPropertiesAutoGenerated): + """ReplicationProperties. + + 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: + :vartype status: ~container_registry_management_client.models.ReplicationPropertiesStatus + :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 + """ + + +class ReplicationPropertiesStatus(Status): + """ReplicationPropertiesStatus. + + 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 + """ + + 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. + :ivar properties: :vartype properties: ~container_registry_management_client.models.ReplicationUpdateParametersProperties """ @@ -5153,7 +5660,7 @@ def __init__( """ :keyword tags: The tags for the replication. :paramtype tags: dict[str, str] - :keyword properties: The parameters for updating a replication's properties. + :keyword properties: :paramtype properties: ~container_registry_management_client.models.ReplicationUpdateParametersProperties """ @@ -5162,8 +5669,8 @@ def __init__( self.properties = properties -class ReplicationUpdateParametersProperties(_serialization.Model): - """ReplicationUpdateParametersProperties. +class ReplicationUpdateParametersPropertiesAutoGenerated(_serialization.Model): # pylint: disable=name-too-long + """ReplicationUpdateParametersPropertiesAutoGenerated. :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, @@ -5186,6 +5693,16 @@ def __init__(self, *, region_endpoint_enabled: Optional[bool] = None, **kwargs: self.region_endpoint_enabled = region_endpoint_enabled +class ReplicationUpdateParametersProperties(ReplicationUpdateParametersPropertiesAutoGenerated): + """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 + """ + + class Request(_serialization.Model): """The request that generated the event. @@ -5243,6 +5760,27 @@ def __init__( self.useragent = useragent +class ResourceSystemData(SystemData): + """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.LastModifiedByType + :ivar last_modified_at: The timestamp of resource modification (UTC). + :vartype last_modified_at: ~datetime.datetime + """ + + class RetentionPolicy(_serialization.Model): """The retention policy for a container registry. @@ -5295,8 +5833,8 @@ class ScopeMap(ProxyResource): :ivar type: The type of the resource. :vartype type: str :ivar system_data: Metadata pertaining to creation and last modification of the resource. - :vartype system_data: ~container_registry_management_client.models.SystemData - :ivar properties: The properties of the scope map. + :vartype system_data: ~container_registry_management_client.models.ProxyResourceSystemData + :ivar properties: :vartype properties: ~container_registry_management_client.models.ScopeMapProperties """ @@ -5311,13 +5849,13 @@ class ScopeMap(ProxyResource): "id": {"key": "id", "type": "str"}, "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, + "system_data": {"key": "systemData", "type": "ProxyResourceSystemData"}, "properties": {"key": "properties", "type": "ScopeMapProperties"}, } def __init__(self, *, properties: Optional["_models.ScopeMapProperties"] = None, **kwargs: Any) -> None: """ - :keyword properties: The properties of the scope map. + :keyword properties: :paramtype properties: ~container_registry_management_client.models.ScopeMapProperties """ super().__init__(**kwargs) @@ -5354,7 +5892,7 @@ def __init__( self.next_link = next_link -class ScopeMapProperties(_serialization.Model): +class ScopeMapPropertiesAutoGenerated(_serialization.Model): """The properties of a scope map. Variables are only populated by the server, and will be ignored when sending a request. @@ -5371,9 +5909,9 @@ class ScopeMapProperties(_serialization.Model): "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. + :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] """ @@ -5396,9 +5934,9 @@ def __init__(self, *, actions: list[str], description: Optional[str] = None, **k """ :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. + :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) @@ -5409,14 +5947,37 @@ def __init__(self, *, actions: list[str], description: Optional[str] = None, **k self.actions = actions +class ScopeMapProperties(ScopeMapPropertiesAutoGenerated): + """ScopeMapProperties. + + 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] + """ + + 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. + :ivar actions: The list of scope permissions for registry artifacts. E.g. + repositories/repository-name/pull, repositories/repository-name/delete. :vartype actions: list[str] """ @@ -5431,9 +5992,8 @@ def __init__( """ :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. + :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) @@ -5444,27 +6004,38 @@ def __init__( class ScopeMapUpdateParameters(_serialization.Model): """The properties for updating the scope map. - :ivar properties: The update parameters for scope map properties. + :ivar properties: :vartype properties: - ~container_registry_management_client.models.ScopeMapPropertiesUpdateParameters + ~container_registry_management_client.models.ScopeMapUpdateParametersProperties """ _attribute_map = { - "properties": {"key": "properties", "type": "ScopeMapPropertiesUpdateParameters"}, + "properties": {"key": "properties", "type": "ScopeMapUpdateParametersProperties"}, } def __init__( - self, *, properties: Optional["_models.ScopeMapPropertiesUpdateParameters"] = None, **kwargs: Any + self, *, properties: Optional["_models.ScopeMapUpdateParametersProperties"] = None, **kwargs: Any ) -> None: """ - :keyword properties: The update parameters for scope map properties. + :keyword properties: :paramtype properties: - ~container_registry_management_client.models.ScopeMapPropertiesUpdateParameters + ~container_registry_management_client.models.ScopeMapUpdateParametersProperties """ super().__init__(**kwargs) self.properties = properties +class ScopeMapUpdateParametersProperties(ScopeMapPropertiesUpdateParameters): + """ScopeMapUpdateParametersProperties. + + :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] + """ + + class Sku(_serialization.Model): """The SKU of a container registry. @@ -5572,39 +6143,6 @@ def __init__(self, *, addr: Optional[str] = None, instance_id: Optional[str] = N 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. @@ -5612,7 +6150,7 @@ class StatusDetailProperties(_serialization.Model): :ivar type: The component of the connected registry corresponding to the status. :vartype type: str - :ivar code: The HTTP status code. + :ivar code: The code of the status. :vartype code: str :ivar description: The description of the status. :vartype description: str @@ -5756,117 +6294,50 @@ class SyncUpdateProperties(_serialization.Model): :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.LastModifiedByType - :ivar last_modified_at: The timestamp of resource modification (UTC). - :vartype last_modified_at: ~datetime.datetime + :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 = { - "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"}, + "schedule": {"key": "schedule", "type": "str"}, + "sync_window": {"key": "syncWindow", "type": "duration"}, + "message_ttl": {"key": "messageTtl", "type": "duration"}, } 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.LastModifiedByType"]] = None, - last_modified_at: Optional[datetime.datetime] = None, + schedule: Optional[str] = None, + sync_window: Optional[datetime.timedelta] = None, + message_ttl: Optional[datetime.timedelta] = 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.LastModifiedByType - :keyword last_modified_at: The timestamp of resource modification (UTC). - :paramtype last_modified_at: ~datetime.datetime + :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.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 + self.schedule = schedule + self.sync_window = sync_window + self.message_ttl = message_ttl class TagFilter(_serialization.Model): - """Specifies a query to filter tags in the upstream repository. Tags are user-defined labels for - OCI artifacts or images. This enables selection of content based on tag values. + """TagFilter. - :ivar type: The language type of the filter. Allowed value is 'KQL'. "KQL" + :ivar type: The language type of the filter. Allowed value is 'KQL'. "kql" :vartype type: str or ~container_registry_management_client.models.TagFilterType :ivar query: The query to process with the source repository contents. :vartype query: str @@ -5881,7 +6352,7 @@ def __init__( self, *, type: Optional[Union[str, "_models.TagFilterType"]] = None, query: Optional[str] = None, **kwargs: Any ) -> None: """ - :keyword type: The language type of the filter. Allowed value is 'KQL'. "KQL" + :keyword type: The language type of the filter. Allowed value is 'KQL'. "kql" :paramtype type: str or ~container_registry_management_client.models.TagFilterType :keyword query: The query to process with the source repository contents. :paramtype query: str @@ -6009,13 +6480,12 @@ class TlsProperties(_serialization.Model): :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. + :ivar certificate: The TLS certificate properties of the connected registry login server. :vartype certificate: ~container_registry_management_client.models.TlsCertificateProperties """ _validation = { "status": {"readonly": True}, - "certificate": {"readonly": True}, } _attribute_map = { @@ -6023,11 +6493,14 @@ class TlsProperties(_serialization.Model): "certificate": {"key": "certificate", "type": "TlsCertificateProperties"}, } - def __init__(self, **kwargs: Any) -> None: - """ """ + def __init__(self, *, certificate: Optional["_models.TlsCertificateProperties"] = None, **kwargs: Any) -> None: + """ + :keyword certificate: The TLS certificate properties of the connected registry login server. + :paramtype certificate: ~container_registry_management_client.models.TlsCertificateProperties + """ super().__init__(**kwargs) self.status: Optional[Union[str, "_models.TlsStatus"]] = None - self.certificate: Optional["_models.TlsCertificateProperties"] = None + self.certificate = certificate class Token(ProxyResource): @@ -6042,8 +6515,8 @@ class Token(ProxyResource): :ivar type: The type of the resource. :vartype type: str :ivar system_data: Metadata pertaining to creation and last modification of the resource. - :vartype system_data: ~container_registry_management_client.models.SystemData - :ivar properties: The properties of the token. + :vartype system_data: ~container_registry_management_client.models.ProxyResourceSystemData + :ivar properties: :vartype properties: ~container_registry_management_client.models.TokenProperties """ @@ -6058,13 +6531,13 @@ class Token(ProxyResource): "id": {"key": "id", "type": "str"}, "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, + "system_data": {"key": "systemData", "type": "ProxyResourceSystemData"}, "properties": {"key": "properties", "type": "TokenProperties"}, } def __init__(self, *, properties: Optional["_models.TokenProperties"] = None, **kwargs: Any) -> None: """ - :keyword properties: The properties of the token. + :keyword properties: :paramtype properties: ~container_registry_management_client.models.TokenProperties """ super().__init__(**kwargs) @@ -6122,9 +6595,9 @@ def __init__( class TokenCredentialsProperties(_serialization.Model): """The properties of the credentials that can be used for authenticating the token. - :ivar certificates: + :ivar certificates: The list of certificates configured with the token. :vartype certificates: list[~container_registry_management_client.models.TokenCertificate] - :ivar passwords: + :ivar passwords: The list of passwords generated for the token. :vartype passwords: list[~container_registry_management_client.models.TokenPassword] """ @@ -6141,9 +6614,9 @@ def __init__( **kwargs: Any ) -> None: """ - :keyword certificates: + :keyword certificates: The list of certificates configured with the token. :paramtype certificates: list[~container_registry_management_client.models.TokenCertificate] - :keyword passwords: + :keyword passwords: The list of passwords generated for the token. :paramtype passwords: list[~container_registry_management_client.models.TokenPassword] """ super().__init__(**kwargs) @@ -6232,7 +6705,7 @@ def __init__( self.value: Optional[str] = None -class TokenProperties(_serialization.Model): +class TokenPropertiesAutoGenerated(_serialization.Model): """The properties of a token. Variables are only populated by the server, and will be ignored when sending a request. @@ -6246,7 +6719,8 @@ class TokenProperties(_serialization.Model): :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. + :ivar credentials: The properties of 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". @@ -6278,7 +6752,8 @@ def __init__( :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. + :keyword credentials: The properties of 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". @@ -6292,21 +6767,48 @@ def __init__( self.status = status +class TokenProperties(TokenPropertiesAutoGenerated): + """TokenProperties. + + 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 properties of 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 + """ + + 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 + :ivar properties: + :vartype properties: + ~container_registry_management_client.models.TokenUpdateParametersProperties """ _attribute_map = { - "properties": {"key": "properties", "type": "TokenUpdateProperties"}, + "properties": {"key": "properties", "type": "TokenUpdateParametersProperties"}, } - def __init__(self, *, properties: Optional["_models.TokenUpdateProperties"] = None, **kwargs: Any) -> None: + def __init__( + self, *, properties: Optional["_models.TokenUpdateParametersProperties"] = None, **kwargs: Any + ) -> None: """ - :keyword properties: The properties of the token update parameters. - :paramtype properties: ~container_registry_management_client.models.TokenUpdateProperties + :keyword properties: + :paramtype properties: + ~container_registry_management_client.models.TokenUpdateParametersProperties """ super().__init__(**kwargs) self.properties = properties @@ -6321,7 +6823,8 @@ class TokenUpdateProperties(_serialization.Model): :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. + :ivar credentials: The properties of the credentials that can be used for authenticating the + token. :vartype credentials: ~container_registry_management_client.models.TokenCredentialsProperties """ @@ -6346,7 +6849,8 @@ def __init__( :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. + :keyword credentials: The properties of the credentials that can be used for authenticating the + token. :paramtype credentials: ~container_registry_management_client.models.TokenCredentialsProperties """ super().__init__(**kwargs) @@ -6355,6 +6859,21 @@ def __init__( self.credentials = credentials +class TokenUpdateParametersProperties(TokenUpdateProperties): + """TokenUpdateParametersProperties. + + :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 properties of the credentials that can be used for authenticating the + token. + :vartype credentials: ~container_registry_management_client.models.TokenCredentialsProperties + """ + + class TrustPolicy(_serialization.Model): """The content trust policy for a container registry. @@ -6436,8 +6955,8 @@ class Webhook(Resource): :ivar tags: The tags of the resource. :vartype tags: dict[str, str] :ivar system_data: Metadata pertaining to creation and last modification of the resource. - :vartype system_data: ~container_registry_management_client.models.SystemData - :ivar properties: The properties of the webhook. + :vartype system_data: ~container_registry_management_client.models.ResourceSystemData + :ivar properties: :vartype properties: ~container_registry_management_client.models.WebhookProperties """ @@ -6455,7 +6974,7 @@ class Webhook(Resource): "type": {"key": "type", "type": "str"}, "location": {"key": "location", "type": "str"}, "tags": {"key": "tags", "type": "{str}"}, - "system_data": {"key": "systemData", "type": "SystemData"}, + "system_data": {"key": "systemData", "type": "ResourceSystemData"}, "properties": {"key": "properties", "type": "WebhookProperties"}, } @@ -6473,7 +6992,7 @@ def __init__( :paramtype location: str :keyword tags: The tags of the resource. :paramtype tags: dict[str, str] - :keyword properties: The properties of the webhook. + :keyword properties: :paramtype properties: ~container_registry_management_client.models.WebhookProperties """ super().__init__(location=location, tags=tags, **kwargs) @@ -6490,9 +7009,9 @@ class WebhookCreateParameters(_serialization.Model): :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. + :ivar properties: :vartype properties: - ~container_registry_management_client.models.WebhookPropertiesCreateParameters + ~container_registry_management_client.models.WebhookCreateParametersProperties """ _validation = { @@ -6502,7 +7021,7 @@ class WebhookCreateParameters(_serialization.Model): _attribute_map = { "tags": {"key": "tags", "type": "{str}"}, "location": {"key": "location", "type": "str"}, - "properties": {"key": "properties", "type": "WebhookPropertiesCreateParameters"}, + "properties": {"key": "properties", "type": "WebhookCreateParametersProperties"}, } def __init__( @@ -6510,7 +7029,7 @@ def __init__( *, location: str, tags: Optional[dict[str, str]] = None, - properties: Optional["_models.WebhookPropertiesCreateParameters"] = None, + properties: Optional["_models.WebhookCreateParametersProperties"] = None, **kwargs: Any ) -> None: """ @@ -6519,9 +7038,9 @@ def __init__( :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. + :keyword properties: :paramtype properties: - ~container_registry_management_client.models.WebhookPropertiesCreateParameters + ~container_registry_management_client.models.WebhookCreateParametersProperties """ super().__init__(**kwargs) self.tags = tags @@ -6529,6 +7048,93 @@ def __init__( self.properties = properties +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 WebhookCreateParametersProperties(WebhookPropertiesCreateParameters): + """WebhookCreateParametersProperties. + + 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] + """ + + class WebhookListResult(_serialization.Model): """The result of a request to list webhooks for a container registry. @@ -6559,7 +7165,7 @@ def __init__( self.next_link = next_link -class WebhookProperties(_serialization.Model): +class WebhookPropertiesAutoGenerated(_serialization.Model): """The properties of a webhook. Variables are only populated by the server, and will be ignored when sending a request. @@ -6620,15 +7226,13 @@ def __init__( self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None -class WebhookPropertiesCreateParameters(_serialization.Model): - """The parameters for creating the properties of a webhook. +class WebhookProperties(WebhookPropertiesAutoGenerated): + """WebhookProperties. + + 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 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 @@ -6638,53 +7242,13 @@ class WebhookPropertiesCreateParameters(_serialization.Model): :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 = { - "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. @@ -6750,30 +7314,49 @@ class WebhookUpdateParameters(_serialization.Model): :ivar tags: The tags for the webhook. :vartype tags: dict[str, str] - :ivar properties: The properties that the webhook will be updated with. + :ivar properties: :vartype properties: - ~container_registry_management_client.models.WebhookPropertiesUpdateParameters + ~container_registry_management_client.models.WebhookUpdateParametersProperties """ _attribute_map = { "tags": {"key": "tags", "type": "{str}"}, - "properties": {"key": "properties", "type": "WebhookPropertiesUpdateParameters"}, + "properties": {"key": "properties", "type": "WebhookUpdateParametersProperties"}, } def __init__( self, *, tags: Optional[dict[str, str]] = None, - properties: Optional["_models.WebhookPropertiesUpdateParameters"] = None, + properties: Optional["_models.WebhookUpdateParametersProperties"] = 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. + :keyword properties: :paramtype properties: - ~container_registry_management_client.models.WebhookPropertiesUpdateParameters + ~container_registry_management_client.models.WebhookUpdateParametersProperties """ super().__init__(**kwargs) self.tags = tags self.properties = properties + + +class WebhookUpdateParametersProperties(WebhookPropertiesUpdateParameters): + """WebhookUpdateParametersProperties. + + :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] + """ diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/operations/__init__.py b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/operations/__init__.py index e6985603118..58e246b3c38 100644 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/operations/__init__.py +++ b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/operations/__init__.py @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.8, generator: @autorest/python@6.40.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. # -------------------------------------------------------------------------- # pylint: disable=wrong-import-position @@ -12,11 +12,11 @@ from ._operations import ArchivesOperations # type: ignore from ._operations import ArchiveVersionsOperations # 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 RegistriesOperations # type: ignore from ._operations import ImportPipelinesOperations # type: ignore from ._operations import Operations # type: ignore from ._operations import PipelineRunsOperations # type: ignore @@ -33,11 +33,11 @@ __all__ = [ "ArchivesOperations", "ArchiveVersionsOperations", + "RegistriesOperations", "CacheRulesOperations", "ConnectedRegistriesOperations", "CredentialSetsOperations", "ExportPipelinesOperations", - "RegistriesOperations", "ImportPipelinesOperations", "Operations", "PipelineRunsOperations", diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/operations/_operations.py b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/operations/_operations.py index 2f3861368c2..7acadfb9322 100644 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/operations/_operations.py +++ b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/generated/container_registry_management_client/operations/_operations.py @@ -1,7 +1,7 @@ # 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.40.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. # -------------------------------------------------------------------------- from collections.abc import MutableMapping @@ -40,8 +40,13 @@ _SERIALIZER.client_side_validation = False -def build_archives_list_request( - resource_group_name: str, registry_name: str, package_type: str, subscription_id: str, **kwargs: Any +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 {}) @@ -50,7 +55,7 @@ def build_archives_list_request( accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives" + _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( @@ -62,6 +67,9 @@ def build_archives_list_request( "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 @@ -75,7 +83,7 @@ def build_archives_list_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_archives_get_request( +def build_archives_create_request( resource_group_name: str, registry_name: str, package_type: str, @@ -86,6 +94,7 @@ def build_archives_get_request( _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", "2025-09-01-preview")) accept = _headers.pop("Accept", "application/json") @@ -103,7 +112,7 @@ def build_archives_get_request( "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-]*$" + "archive_name", archive_name, "str", max_length=200, min_length=5, pattern=r"^[a-zA-Z0-9]*$" ), } @@ -113,12 +122,14 @@ def build_archives_get_request( _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="GET", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_archives_create_request( +def build_archives_update_request( resource_group_name: str, registry_name: str, package_type: str, @@ -147,7 +158,7 @@ def build_archives_create_request( "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-]*$" + "archive_name", archive_name, "str", max_length=200, min_length=5, pattern=r"^[a-zA-Z0-9]*$" ), } @@ -161,7 +172,7 @@ def build_archives_create_request( _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) + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) def build_archives_delete_request( @@ -192,7 +203,7 @@ def build_archives_delete_request( "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-]*$" + "archive_name", archive_name, "str", max_length=200, min_length=5, pattern=r"^[a-zA-Z0-9]*$" ), } @@ -207,23 +218,17 @@ def build_archives_delete_request( return HttpRequest(method="DELETE", 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 +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 {}) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}" + _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( @@ -235,9 +240,6 @@ def build_archives_update_request( "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 @@ -246,18 +248,17 @@ def build_archives_update_request( _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) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_archive_versions_list_request( +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: @@ -268,7 +269,7 @@ def build_archive_versions_list_request( accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}/versions" + _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( @@ -281,7 +282,10 @@ def build_archive_versions_list_request( "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-]*$" + "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]*$" ), } @@ -296,7 +300,7 @@ def build_archive_versions_list_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_archive_versions_get_request( +def build_archive_versions_create_request( resource_group_name: str, registry_name: str, package_type: str, @@ -325,15 +329,10 @@ def build_archive_versions_get_request( "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-]*$" + "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-]*$", + "archive_version_name", archive_version_name, "str", max_length=200, min_length=5, pattern=r"^[a-zA-Z0-9]*$" ), } @@ -345,10 +344,10 @@ def build_archive_versions_get_request( # Construct headers _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_archive_versions_create_request( +def build_archive_versions_delete_request( resource_group_name: str, registry_name: str, package_type: str, @@ -377,15 +376,10 @@ def build_archive_versions_create_request( "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-]*$" + "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-]*$", + "archive_version_name", archive_version_name, "str", max_length=200, min_length=5, pattern=r"^[a-zA-Z0-9]*$" ), } @@ -397,15 +391,14 @@ def build_archive_versions_create_request( # Construct headers _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_archive_versions_delete_request( +def build_archive_versions_list_request( resource_group_name: str, registry_name: str, package_type: str, archive_name: str, - archive_version_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -416,7 +409,7 @@ def build_archive_versions_delete_request( accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/packages/{packageType}/archives/{archiveName}/versions/{archiveVersionName}" + _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( @@ -429,15 +422,7 @@ def build_archive_versions_delete_request( "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-]*$", + "archive_name", archive_name, "str", max_length=200, min_length=5, pattern=r"^[a-zA-Z0-9]*$" ), } @@ -449,20 +434,21 @@ def build_archive_versions_delete_request( # Construct headers _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_cache_rules_list_request( +def build_registries_check_cache_rule_artifact_sync_estimate_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", "2025-09-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules" + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/checkCacheRuleArtifactSyncEstimate" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -479,22 +465,23 @@ def build_cache_rules_list_request( _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="GET", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="POST", 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 +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", "2025-09-01-preview")) - accept = _headers.pop("Accept", "application/json") - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules/{cacheRuleName}" + _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( @@ -503,9 +490,6 @@ def build_cache_rules_get_request( "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 @@ -514,13 +498,14 @@ def build_cache_rules_get_request( _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="POST", 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 +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 {}) @@ -530,18 +515,9 @@ def build_cache_rules_create_request( accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules/{cacheRuleName}" + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerRegistry/checkNameAvailability" 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 @@ -554,11 +530,11 @@ def build_cache_rules_create_request( _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) + return HttpRequest(method="POST", 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 +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 {}) @@ -567,7 +543,7 @@ def build_cache_rules_delete_request( accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules/{cacheRuleName}" + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -576,9 +552,6 @@ def build_cache_rules_delete_request( "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 @@ -589,11 +562,11 @@ def build_cache_rules_delete_request( # Construct headers _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="GET", 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 +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 {}) @@ -603,7 +576,7 @@ def build_cache_rules_update_request( accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules/{cacheRuleName}" + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -612,9 +585,6 @@ def build_cache_rules_update_request( "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 @@ -627,20 +597,21 @@ def build_cache_rules_update_request( _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) + return HttpRequest(method="PUT", 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 +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", "2025-09-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}" + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -649,14 +620,6 @@ def build_connected_registries_get_request( "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 @@ -665,23 +628,21 @@ def build_connected_registries_get_request( _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="GET", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="PATCH", 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 +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 {}) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview")) - accept = _headers.pop("Accept", "application/json") - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}" + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -690,14 +651,6 @@ def build_connected_registries_create_request( # pylint: disable=name-too-long "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 @@ -705,42 +658,25 @@ def build_connected_registries_create_request( # pylint: disable=name-too-long # 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) + return HttpRequest(method="DELETE", url=_url, params=_params, **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 +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 {}) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}" + _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 ), - "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 @@ -749,16 +685,12 @@ def build_connected_registries_update_request( # pylint: disable=name-too-long _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) + return HttpRequest(method="GET", 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: +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 {}) @@ -766,23 +698,9 @@ def build_connected_registries_delete_request( # pylint: disable=name-too-long accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}" + _url = "/subscriptions/{subscriptionId}/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 - ), - "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 @@ -793,11 +711,11 @@ def build_connected_registries_delete_request( # pylint: disable=name-too-long # Construct headers _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="GET", 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 +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 {}) @@ -806,7 +724,7 @@ def build_connected_registries_list_request( accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries" + _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( @@ -821,26 +739,25 @@ def build_connected_registries_list_request( # 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) + return HttpRequest(method="POST", 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 +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", "2025-09-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}/deactivate" + _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( @@ -849,14 +766,6 @@ def build_connected_registries_deactivate_request( # pylint: disable=name-too-l "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 @@ -865,13 +774,15 @@ def build_connected_registries_deactivate_request( # pylint: disable=name-too-l _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_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 +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 {}) @@ -880,7 +791,7 @@ def build_connected_registries_resync_request( # pylint: disable=name-too-long accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}/resync" + _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( @@ -889,14 +800,6 @@ def build_connected_registries_resync_request( # pylint: disable=name-too-long "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 @@ -907,10 +810,10 @@ def build_connected_registries_resync_request( # pylint: disable=name-too-long # Construct headers _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_credential_sets_list_request( +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 {}) @@ -920,7 +823,7 @@ def build_credential_sets_list_request( accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets" + _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( @@ -942,8 +845,8 @@ def build_credential_sets_list_request( 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 +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 {}) @@ -952,7 +855,7 @@ def build_credential_sets_get_request( accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets/{credentialSetName}" + _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( @@ -961,9 +864,7 @@ def build_credential_sets_get_request( "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-]*$" - ), + "groupName": _SERIALIZER.url("group_name", group_name, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -977,8 +878,8 @@ def build_credential_sets_get_request( 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 +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 {}) @@ -988,7 +889,7 @@ def build_credential_sets_create_request( accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets/{credentialSetName}" + _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( @@ -997,9 +898,6 @@ def build_credential_sets_create_request( "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 @@ -1012,11 +910,11 @@ def build_credential_sets_create_request( _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) + return HttpRequest(method="POST", 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 +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 {}) @@ -1025,7 +923,7 @@ def build_credential_sets_delete_request( accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets/{credentialSetName}" + _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( @@ -1034,8 +932,8 @@ def build_credential_sets_delete_request( "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-]*$" + "cacheRuleName": _SERIALIZER.url( + "cache_rule_name", cache_rule_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9-]*$" ), } @@ -1047,11 +945,11 @@ def build_credential_sets_delete_request( # Construct headers _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="GET", 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 +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 {}) @@ -1061,7 +959,7 @@ def build_credential_sets_update_request( accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets/{credentialSetName}" + _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( @@ -1070,8 +968,8 @@ def build_credential_sets_update_request( "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-]*$" + "cacheRuleName": _SERIALIZER.url( + "cache_rule_name", cache_rule_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9-]*$" ), } @@ -1085,20 +983,21 @@ def build_credential_sets_update_request( _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) + return HttpRequest(method="PUT", 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 +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", "2025-09-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines" + _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( @@ -1107,6 +1006,9 @@ def build_export_pipelines_list_request( "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 @@ -1115,13 +1017,15 @@ def build_export_pipelines_list_request( _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="GET", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="PATCH", 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 +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 {}) @@ -1130,7 +1034,7 @@ def build_export_pipelines_get_request( accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines/{exportPipelineName}" + _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( @@ -1139,8 +1043,8 @@ def build_export_pipelines_get_request( "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]*$" + "cacheRuleName": _SERIALIZER.url( + "cache_rule_name", cache_rule_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9-]*$" ), } @@ -1152,21 +1056,20 @@ def build_export_pipelines_get_request( # Construct headers _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="DELETE", 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 +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 {}) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines/{exportPipelineName}" + _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( @@ -1175,9 +1078,6 @@ def build_export_pipelines_create_request( "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 @@ -1186,24 +1086,23 @@ def build_export_pipelines_create_request( _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) + return HttpRequest(method="GET", 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 +def build_cache_rules_sync_cache_rule_request( # pylint: disable=name-too-long + 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", "2025-09-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines/{exportPipelineName}" + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules/{cacheRuleName}/sync" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -1212,8 +1111,8 @@ def build_export_pipelines_delete_request( "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]*$" + "cacheRuleName": _SERIALIZER.url( + "cache_rule_name", cache_rule_name, "str", max_length=50, min_length=5, pattern=r"^[a-zA-Z0-9-]*$" ), } @@ -1223,21 +1122,24 @@ def build_export_pipelines_delete_request( _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="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + 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 +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 {}) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview")) + accept = _headers.pop("Accept", "application/json") + # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importImage" + _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( @@ -1246,6 +1148,14 @@ def build_registries_import_image_request( "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 @@ -1254,14 +1164,13 @@ def build_registries_import_image_request( _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) + 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 +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 {}) @@ -1271,9 +1180,23 @@ def build_registries_check_name_availability_request( # pylint: disable=name-to accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerRegistry/checkNameAvailability" + _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 @@ -1286,20 +1209,37 @@ def build_registries_check_name_availability_request( # pylint: disable=name-to _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) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_registries_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: +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", "2025-09-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerRegistry/registries" + _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 @@ -1308,13 +1248,15 @@ def build_registries_list_request(subscription_id: str, **kwargs: Any) -> HttpRe _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="GET", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="PATCH", 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 +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 {}) @@ -1323,12 +1265,23 @@ def build_registries_list_by_resource_group_request( # pylint: disable=name-too accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries" + _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 @@ -1339,11 +1292,11 @@ def build_registries_list_by_resource_group_request( # pylint: disable=name-too # Construct headers _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_registries_get_request( - resource_group_name: str, registry_name: str, subscription_id: str, **kwargs: Any +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 {}) @@ -1352,7 +1305,7 @@ def build_registries_get_request( accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}" + _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( @@ -1367,6 +1320,8 @@ def build_registries_get_request( # 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") @@ -1374,18 +1329,17 @@ def build_registries_get_request( 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 +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 {}) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}" + _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( @@ -1394,6 +1348,14 @@ def build_registries_create_request( "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 @@ -1402,21 +1364,22 @@ def build_registries_create_request( _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) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_registries_delete_request( - resource_group_name: str, registry_name: str, subscription_id: str, **kwargs: Any +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", "2025-09-01-preview")) + accept = _headers.pop("Accept", "application/json") + # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}" + _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( @@ -1425,6 +1388,14 @@ def build_registries_delete_request( "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 @@ -1432,21 +1403,23 @@ def build_registries_delete_request( # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_registries_update_request( - resource_group_name: str, registry_name: str, subscription_id: str, **kwargs: Any + +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 {}) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}" + _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( @@ -1455,6 +1428,9 @@ def build_registries_update_request( "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 @@ -1463,24 +1439,23 @@ def build_registries_update_request( _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) + return HttpRequest(method="GET", 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 +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", "2025-09-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listUsages" + _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( @@ -1489,6 +1464,9 @@ def build_registries_list_usages_request( "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 @@ -1497,22 +1475,25 @@ def build_registries_list_usages_request( _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="GET", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="PUT", 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 +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", "2025-09-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateLinkResources" + _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( @@ -1521,6 +1502,9 @@ def build_registries_list_private_link_resources_request( # pylint: disable=nam "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 @@ -1529,13 +1513,15 @@ def build_registries_list_private_link_resources_request( # pylint: disable=nam _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="GET", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="PATCH", 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 +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 {}) @@ -1544,7 +1530,7 @@ def build_registries_get_private_link_resource_request( # pylint: disable=name- accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateLinkResources/{groupName}" + _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( @@ -1553,7 +1539,9 @@ def build_registries_get_private_link_resource_request( # pylint: disable=name- "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"), + "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 @@ -1564,21 +1552,20 @@ def build_registries_get_private_link_resource_request( # pylint: disable=name- # Construct headers _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_registries_check_cache_rule_artifact_sync_estimate_request( # pylint: disable=name-too-long +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 {}) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/checkCacheRuleArtifactSyncEstimate" + _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( @@ -1595,15 +1582,13 @@ def build_registries_check_cache_rule_artifact_sync_estimate_request( # pylint: _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) + return HttpRequest(method="GET", 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 +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 {}) @@ -1612,7 +1597,7 @@ def build_registries_list_credentials_request( # pylint: disable=name-too-long accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listCredentials" + _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( @@ -1621,6 +1606,9 @@ def build_registries_list_credentials_request( # pylint: disable=name-too-long "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 @@ -1631,11 +1619,11 @@ def build_registries_list_credentials_request( # pylint: disable=name-too-long # Construct headers _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + 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 +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 {}) @@ -1645,7 +1633,7 @@ def build_registries_regenerate_credential_request( # pylint: disable=name-too- accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/regenerateCredential" + _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( @@ -1654,6 +1642,9 @@ def build_registries_regenerate_credential_request( # pylint: disable=name-too- "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 @@ -1666,21 +1657,20 @@ def build_registries_regenerate_credential_request( # pylint: disable=name-too- _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) + return HttpRequest(method="PUT", 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 +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 {}) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/generateCredentials" + _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( @@ -1689,6 +1679,9 @@ def build_registries_generate_credentials_request( # pylint: disable=name-too-l "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 @@ -1697,14 +1690,12 @@ def build_registries_generate_credentials_request( # pylint: disable=name-too-l _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) + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_import_pipelines_list_request( +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 {}) @@ -1714,7 +1705,7 @@ def build_import_pipelines_list_request( accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines" + _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( @@ -1844,7 +1835,9 @@ def build_import_pipelines_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_operations_list_request(**kwargs: Any) -> HttpRequest: +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 {}) @@ -1852,7 +1845,18 @@ def build_operations_list_request(**kwargs: Any) -> HttpRequest: accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/providers/Microsoft.ContainerRegistry/operations" + _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") @@ -1863,9 +1867,7 @@ def build_operations_list_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", 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: +def build_operations_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -1873,18 +1875,7 @@ def build_pipeline_runs_list_request( 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 + _url = "/providers/Microsoft.ContainerRegistry/operations" # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -2003,7 +1994,7 @@ def build_pipeline_runs_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_private_endpoint_connections_list_request( # pylint: disable=name-too-long +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 {}) @@ -2013,7 +2004,7 @@ def build_private_endpoint_connections_list_request( # pylint: disable=name-too accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateEndpointConnections" + _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( @@ -2035,7 +2026,7 @@ def build_private_endpoint_connections_list_request( # pylint: disable=name-too return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_private_endpoint_connections_get_request( # pylint: disable=name-too-long +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, @@ -2045,6 +2036,7 @@ def build_private_endpoint_connections_get_request( # pylint: disable=name-too- _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", "2025-09-01-preview")) accept = _headers.pop("Accept", "application/json") @@ -2069,12 +2061,14 @@ def build_private_endpoint_connections_get_request( # pylint: disable=name-too- _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="GET", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_private_endpoint_connections_create_or_update_request( # pylint: disable=name-too-long +def build_private_endpoint_connections_get_request( # pylint: disable=name-too-long resource_group_name: str, registry_name: str, private_endpoint_connection_name: str, @@ -2084,7 +2078,6 @@ def build_private_endpoint_connections_create_or_update_request( # pylint: disa _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", "2025-09-01-preview")) accept = _headers.pop("Accept", "application/json") @@ -2109,11 +2102,9 @@ def build_private_endpoint_connections_create_or_update_request( # pylint: disa _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) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) def build_private_endpoint_connections_delete_request( # pylint: disable=name-too-long @@ -2149,7 +2140,7 @@ def build_private_endpoint_connections_delete_request( # pylint: disable=name-t return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_replications_list_request( +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 {}) @@ -2159,7 +2150,7 @@ def build_replications_list_request( accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications" + _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( @@ -2254,12 +2245,16 @@ def build_replications_create_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_replications_delete_request( +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", "2025-09-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 = { @@ -2280,19 +2275,20 @@ def build_replications_delete_request( # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + # 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_update_request( +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 {}) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-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 = { @@ -2313,15 +2309,10 @@ def build_replications_update_request( # 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) + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_scope_maps_list_request( +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 {}) @@ -2331,7 +2322,7 @@ def build_scope_maps_list_request( accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps" + _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( @@ -2426,12 +2417,13 @@ def build_scope_maps_create_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_scope_maps_delete_request( +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", "2025-09-01-preview")) accept = _headers.pop("Accept", "application/json") @@ -2456,18 +2448,19 @@ def build_scope_maps_delete_request( _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="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) -def build_scope_maps_update_request( +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 {}) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview")) accept = _headers.pop("Accept", "application/json") @@ -2492,14 +2485,12 @@ def build_scope_maps_update_request( _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) + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_tokens_list_request( +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 {}) @@ -2509,7 +2500,7 @@ def build_tokens_list_request( accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens" + _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( @@ -2604,12 +2595,13 @@ def build_tokens_create_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_tokens_delete_request( +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", "2025-09-01-preview")) accept = _headers.pop("Accept", "application/json") @@ -2634,18 +2626,19 @@ def build_tokens_delete_request( _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="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) -def build_tokens_update_request( +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 {}) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-01-preview")) accept = _headers.pop("Accept", "application/json") @@ -2670,14 +2663,12 @@ def build_tokens_update_request( _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) + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_webhooks_list_request( +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 {}) @@ -2687,7 +2678,7 @@ def build_webhooks_list_request( accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks" + _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( @@ -2782,12 +2773,16 @@ def build_webhooks_create_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_webhooks_delete_request( +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", "2025-09-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 = { @@ -2808,19 +2803,20 @@ def build_webhooks_delete_request( # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + # 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_update_request( +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 {}) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-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 = { @@ -2841,16 +2837,11 @@ def build_webhooks_update_request( # 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) + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_webhooks_ping_request( - resource_group_name: str, registry_name: str, webhook_name: str, subscription_id: str, **kwargs: Any +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 {}) @@ -2859,7 +2850,7 @@ def build_webhooks_ping_request( accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/ping" + _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( @@ -2868,9 +2859,6 @@ def build_webhooks_ping_request( "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 @@ -2881,10 +2869,10 @@ def build_webhooks_ping_request( # Construct headers _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_webhooks_list_events_request( +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 {}) @@ -2894,7 +2882,7 @@ def build_webhooks_list_events_request( accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/listEvents" + _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( @@ -2954,6 +2942,41 @@ def build_webhooks_get_callback_config_request( # pylint: disable=name-too-long 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", "2025-09-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) + + class ArchivesOperations: """ .. warning:: @@ -2975,94 +2998,6 @@ def __init__(self, *args, **kwargs) -> None: 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 type of the package resource. 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 @@ -3074,7 +3009,7 @@ def get( :type resource_group_name: str :param registry_name: The name of the container registry. Required. :type registry_name: str - :param package_type: The type of the package resource. Required. + :param package_type: The type of the repository resource. Required. :type package_type: str :param archive_name: The name of the archive resource. Required. :type archive_name: str @@ -3116,7 +3051,10 @@ def get( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("Archive", pipeline_response.http_response) @@ -3185,7 +3123,10 @@ def _create_initial( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -3220,7 +3161,7 @@ def begin_create( :type resource_group_name: str :param registry_name: The name of the container registry. Required. :type registry_name: str - :param package_type: The type of the package resource. Required. + :param package_type: The type of the repository resource. Required. :type package_type: str :param archive_name: The name of the archive resource. Required. :type archive_name: str @@ -3253,7 +3194,7 @@ def begin_create( :type resource_group_name: str :param registry_name: The name of the container registry. Required. :type registry_name: str - :param package_type: The type of the package resource. Required. + :param package_type: The type of the repository resource. Required. :type package_type: str :param archive_name: The name of the archive resource. Required. :type archive_name: str @@ -3284,7 +3225,7 @@ def begin_create( :type resource_group_name: str :param registry_name: The name of the container registry. Required. :type registry_name: str - :param package_type: The type of the package resource. Required. + :param package_type: The type of the repository resource. Required. :type package_type: str :param archive_name: The name of the archive resource. Required. :type archive_name: str @@ -3346,122 +3287,6 @@ def get_long_running_output(pipeline_response): 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, **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")) - - 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 type of the package resource. 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 - @overload def update( self, @@ -3481,7 +3306,7 @@ def update( :type resource_group_name: str :param registry_name: The name of the container registry. Required. :type registry_name: str - :param package_type: The type of the package resource. Required. + :param package_type: The type of the repository resource. Required. :type package_type: str :param archive_name: The name of the archive resource. Required. :type archive_name: str @@ -3515,7 +3340,7 @@ def update( :type resource_group_name: str :param registry_name: The name of the container registry. Required. :type registry_name: str - :param package_type: The type of the package resource. Required. + :param package_type: The type of the repository resource. Required. :type package_type: str :param archive_name: The name of the archive resource. Required. :type archive_name: str @@ -3546,7 +3371,7 @@ def update( :type resource_group_name: str :param registry_name: The name of the container registry. Required. :type registry_name: str - :param package_type: The type of the package resource. Required. + :param package_type: The type of the repository resource. Required. :type package_type: str :param archive_name: The name of the archive resource. Required. :type archive_name: str @@ -3604,7 +3429,10 @@ def update( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("Archive", pipeline_response.http_response) @@ -3614,53 +3442,146 @@ def update( 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 {}) -class ArchiveVersionsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} - Instead, you should access the following operations through - :class:`~container_registry_management_client.ContainerRegistryManagementClient`'s - :attr:`archive_versions` attribute. - """ + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - models = _models + _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) - 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") + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs ) - 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") + + 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")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore @distributed_trace - def list( + def begin_delete( 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. + ) -> 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 type of the package resource. Required. + :param package_type: The type of the repository resource. 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] + :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[_models._models.ArchiveVersionListResult] = kwargs.pop("cls", 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._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 + + @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 type of the repository resource. 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, @@ -3673,11 +3594,10 @@ def list( def prepare_request(next_link=None): if not next_link: - _request = build_archive_versions_list_request( + _request = build_archives_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, @@ -3704,7 +3624,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = self._deserialize( - _models._models.ArchiveVersionListResult, pipeline_response # pylint: disable=protected-access + _models._models.ArchiveListResult, pipeline_response # pylint: disable=protected-access ) list_of_elem = deserialized.value if cls: @@ -3722,13 +3642,38 @@ def get_next(next_link=None): 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) + 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 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 get( self, @@ -3746,7 +3691,7 @@ def get( :type resource_group_name: str :param registry_name: The name of the container registry. Required. :type registry_name: str - :param package_type: The type of the package resource. Required. + :param package_type: The type of the repository resource. Required. :type package_type: str :param archive_name: The name of the archive resource. Required. :type archive_name: str @@ -3791,7 +3736,10 @@ def get( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("ArchiveVersion", pipeline_response.http_response) @@ -3849,7 +3797,10 @@ def _create_initial( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -3882,7 +3833,7 @@ def begin_create( :type resource_group_name: str :param registry_name: The name of the container registry. Required. :type registry_name: str - :param package_type: The type of the package resource. Required. + :param package_type: The type of the repository resource. Required. :type package_type: str :param archive_name: The name of the archive resource. Required. :type archive_name: str @@ -3989,7 +3940,10 @@ def _delete_initial( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -4020,7 +3974,7 @@ def begin_delete( :type resource_group_name: str :param registry_name: The name of the container registry. Required. :type registry_name: str - :param package_type: The type of the package resource. Required. + :param package_type: The type of the repository resource. Required. :type package_type: str :param archive_name: The name of the archive resource. Required. :type archive_name: str @@ -4073,45 +4027,31 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- ) return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # 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. + 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 - :return: An iterator like instance of CacheRule - :rtype: ~azure.core.paging.ItemPaged[~container_registry_management_client.models.CacheRule] + :param package_type: The type of the repository resource. 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.CacheRulesListResult] = kwargs.pop("cls", None) + cls: ClsType[_models._models.ArchiveVersionListResult] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -4124,9 +4064,11 @@ def list(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> I def prepare_request(next_link=None): if not next_link: - _request = build_cache_rules_list_request( + _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, @@ -4153,7 +4095,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = self._deserialize( - _models._models.CacheRulesListResult, pipeline_response # pylint: disable=protected-access + _models._models.ArchiveVersionListResult, pipeline_response # pylint: disable=protected-access ) list_of_elem = deserialized.value if cls: @@ -4171,28 +4113,116 @@ def get_next(next_link=None): 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) + 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. + +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_cache_rule_artifact_sync_estimate( + self, + resource_group_name: str, + registry_name: str, + cache_rule_parameters: _models.CacheRule, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CacheRuleArtifactSyncEstimateResult: + """Checks the contents of an upstream repository and executes the query of a cache rule's artifact + sync scope filter. :param resource_group_name: The name of the resource group. The name 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 + :param cache_rule_parameters: The cache rule resource. Required. + :type cache_rule_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: CacheRuleArtifactSyncEstimateResult + :rtype: ~container_registry_management_client.models.CacheRuleArtifactSyncEstimateResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def check_cache_rule_artifact_sync_estimate( + self, + resource_group_name: str, + registry_name: str, + cache_rule_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CacheRuleArtifactSyncEstimateResult: + """Checks the contents of an upstream repository and executes the query of a cache rule's artifact + sync scope filter. + + :param resource_group_name: The name of the resource group. The name 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_parameters: The cache rule resource. Required. + :type cache_rule_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: CacheRuleArtifactSyncEstimateResult + :rtype: ~container_registry_management_client.models.CacheRuleArtifactSyncEstimateResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def check_cache_rule_artifact_sync_estimate( + self, + resource_group_name: str, + registry_name: str, + cache_rule_parameters: Union[_models.CacheRule, IO[bytes]], + **kwargs: Any + ) -> _models.CacheRuleArtifactSyncEstimateResult: + """Checks the contents of an upstream repository and executes the query of a cache rule's artifact + sync scope filter. + + :param resource_group_name: The name of the resource group. The name 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_parameters: The cache rule resource. Is either a CacheRule type or a + IO[bytes] type. Required. + :type cache_rule_parameters: ~container_registry_management_client.models.CacheRule or + IO[bytes] + :return: CacheRuleArtifactSyncEstimateResult + :rtype: ~container_registry_management_client.models.CacheRuleArtifactSyncEstimateResult :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -4203,17 +4233,28 @@ def get( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.CacheRule] = kwargs.pop("cls", None) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CacheRuleArtifactSyncEstimateResult] = kwargs.pop("cls", None) - _request = build_cache_rules_get_request( + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(cache_rule_parameters, (IOBase, bytes)): + _content = cache_rule_parameters + else: + _json = self._serialize.body(cache_rule_parameters, "CacheRule") + + _request = build_registries_check_cache_rule_artifact_sync_estimate_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, ) @@ -4228,22 +4269,24 @@ def get( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize("CacheRule", pipeline_response.http_response) + deserialized = self._deserialize("CacheRuleArtifactSyncEstimateResult", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - def _create_initial( + def _import_image_initial( self, resource_group_name: str, registry_name: str, - cache_rule_name: str, - cache_rule_create_parameters: Union[_models.CacheRule, IO[bytes]], + parameters: Union[_models.ImportImageParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -4263,15 +4306,14 @@ def _create_initial( content_type = content_type or "application/json" _json = None _content = None - if isinstance(cache_rule_create_parameters, (IOBase, bytes)): - _content = cache_rule_create_parameters + if isinstance(parameters, (IOBase, bytes)): + _content = parameters else: - _json = self._serialize.body(cache_rule_create_parameters, "CacheRule") + _json = self._serialize.body(parameters, "ImportImageParameters") - _request = build_cache_rules_create_request( + _request = build_registries_import_image_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, @@ -4289,20 +4331,17 @@ def _create_initial( response = pipeline_response.http_response - if response.status_code not in [200, 201]: + 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) + raise HttpResponseError(response=response) response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) deserialized = response.iter_bytes() @@ -4312,105 +4351,97 @@ def _create_initial( return deserialized # type: ignore @overload - def begin_create( + def begin_import_image( self, resource_group_name: str, registry_name: str, - cache_rule_name: str, - cache_rule_create_parameters: _models.CacheRule, + parameters: _models.ImportImageParameters, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.CacheRule]: - """Creates a cache rule for a container registry with the specified parameters. + ) -> 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 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 + :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 CacheRule - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.CacheRule] + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_create( + def begin_import_image( self, resource_group_name: str, registry_name: str, - cache_rule_name: str, - cache_rule_create_parameters: IO[bytes], + 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. + ) -> 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 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] + :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 CacheRule - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.CacheRule] + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace - def begin_create( + def begin_import_image( self, resource_group_name: str, registry_name: str, - cache_rule_name: str, - cache_rule_create_parameters: Union[_models.CacheRule, IO[bytes]], + parameters: Union[_models.ImportImageParameters, IO[bytes]], **kwargs: Any - ) -> LROPoller[_models.CacheRule]: - """Creates a cache rule for a container registry with the specified parameters. + ) -> 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 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 + :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 CacheRule - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.CacheRule] + :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[_models.CacheRule] = kwargs.pop("cls", 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._create_initial( + raw_result = self._import_image_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, + parameters=parameters, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, @@ -4420,35 +4451,83 @@ def begin_create( 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) + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: PollingMethod = cast( - PollingMethod, - LROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + 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.CacheRule].from_continuation_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[_models.CacheRule]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) + return LROPoller[None](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]: + @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 object containing information for the availability + request. 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 object containing information for the availability + request. 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 object containing information for the availability + request. 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, @@ -4457,114 +4536,105 @@ def _delete_initial( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.RegistryNameStatus] = 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, + 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 = True + _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 [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + 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) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + raise HttpResponseError(response=response) - deserialized = response.iter_bytes() + deserialized = self._deserialize("RegistryNameStatus", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore + return cls(pipeline_response, deserialized, {}) # 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. + 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 - :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] + :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[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) + cls: ClsType[_models.Registry] = kwargs.pop("cls", None) - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore + _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) - 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 + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) - 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 + 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) + raise HttpResponseError(response=response) + + 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, @@ -4583,15 +4653,14 @@ def _update_initial( content_type = content_type or "application/json" _json = None _content = None - if isinstance(cache_rule_update_parameters, (IOBase, bytes)): - _content = cache_rule_update_parameters + if isinstance(registry, (IOBase, bytes)): + _content = registry else: - _json = self._serialize.body(cache_rule_update_parameters, "CacheRuleUpdateParameters") + _json = self._serialize.body(registry, "Registry") - _request = build_cache_rules_update_request( + _request = build_registries_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, @@ -4615,8 +4684,7 @@ def _update_initial( 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) + raise HttpResponseError(response=response) response_headers = {} if response.status_code == 201: @@ -4632,106 +4700,90 @@ def _update_initial( return deserialized # type: ignore @overload - def begin_update( + def begin_create( self, resource_group_name: str, registry_name: str, - cache_rule_name: str, - cache_rule_update_parameters: _models.CacheRuleUpdateParameters, + registry: _models.Registry, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.CacheRule]: - """Updates a cache rule for a container registry with the specified parameters. + ) -> 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 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 + :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 CacheRule - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.CacheRule] + :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( + def begin_create( self, resource_group_name: str, registry_name: str, - cache_rule_name: str, - cache_rule_update_parameters: IO[bytes], + registry: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.CacheRule]: - """Updates a cache rule for a container registry with the specified parameters. + ) -> 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 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] + :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 CacheRule - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.CacheRule] + :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, - 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. + 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 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] + :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.CacheRule] = kwargs.pop("cls", 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( + raw_result = self._create_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, + registry=registry, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, @@ -4742,7 +4794,7 @@ def begin_update( kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CacheRule", pipeline_response.http_response) + deserialized = self._deserialize("Registry", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -4757,55 +4809,23 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller[_models.CacheRule].from_continuation_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.CacheRule]( + return LROPoller[_models.Registry]( 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 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: - """ + 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, @@ -4814,75 +4834,23 @@ def get( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(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: 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 + if isinstance(registry_update_parameters, (IOBase, bytes)): + _content = registry_update_parameters else: - _json = self._serialize.body(connected_registry_create_parameters, "ConnectedRegistry") + _json = self._serialize.body(registry_update_parameters, "RegistryUpdateParameters") - _request = build_connected_registries_create_request( + _request = build_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, @@ -4906,8 +4874,7 @@ def _create_initial( 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) + raise HttpResponseError(response=response) response_headers = {} if response.status_code == 201: @@ -4923,111 +4890,96 @@ def _create_initial( return deserialized # type: ignore @overload - def begin_create( + def begin_update( self, resource_group_name: str, registry_name: str, - connected_registry_name: str, - connected_registry_create_parameters: _models.ConnectedRegistry, + registry_update_parameters: _models.RegistryUpdateParameters, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.ConnectedRegistry]: - """Creates a connected registry for a container registry with the specified parameters. + ) -> 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 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 + :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 ConnectedRegistry - :rtype: - ~azure.core.polling.LROPoller[~container_registry_management_client.models.ConnectedRegistry] + :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( + def begin_update( self, resource_group_name: str, registry_name: str, - connected_registry_name: str, - connected_registry_create_parameters: IO[bytes], + registry_update_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. + ) -> 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 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] + :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 ConnectedRegistry - :rtype: - ~azure.core.polling.LROPoller[~container_registry_management_client.models.ConnectedRegistry] + :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( + def begin_update( self, resource_group_name: str, registry_name: str, - connected_registry_name: str, - connected_registry_create_parameters: Union[_models.ConnectedRegistry, IO[bytes]], + registry_update_parameters: Union[_models.RegistryUpdateParameters, IO[bytes]], **kwargs: Any - ) -> LROPoller[_models.ConnectedRegistry]: - """Creates a connected registry for a container registry with the specified parameters. + ) -> 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 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] + :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.ConnectedRegistry] = kwargs.pop("cls", 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( + raw_result = self._update_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, + registry_update_parameters=registry_update_parameters, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, @@ -5038,7 +4990,7 @@ def begin_create( kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ConnectedRegistry", pipeline_response.http_response) + deserialized = self._deserialize("Registry", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -5053,24 +5005,17 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller[_models.ConnectedRegistry].from_continuation_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.ConnectedRegistry]( + 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, - connected_registry_name: str, - connected_registry_update_parameters: Union[_models.ConnectedRegistryUpdateParameters, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: + def _delete_initial(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -5079,29 +5024,16 @@ def _update_initial( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = 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( + _request = build_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, - content_type=content_type, api_version=self._config.api_version, - json=_json, - content=_content, headers=_headers, params=_params, ) @@ -5114,20 +5046,17 @@ def _update_initial( response = pipeline_response.http_response - if response.status_code not in [200, 201]: + 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) + raise HttpResponseError(response=response) response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) deserialized = response.iter_bytes() @@ -5136,150 +5065,75 @@ def _update_initial( 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. + @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 - :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] + :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 {} - @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. + 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) - :param resource_group_name: The name of the resource group. The name 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 + 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": "azure-async-operation"}, **kwargs), + 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.ConnectedRegistry].from_continuation_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[_models.ConnectedRegistry]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @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) - 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, @@ -5288,132 +5142,73 @@ def _delete_initial( } 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")) + def prepare_request(next_link=None): + if not next_link: - deserialized = response.iter_bytes() + _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) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore + 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 deserialized # type: ignore + return _request - @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. + 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) - :param resource_group_name: The name of the resource group. The name 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 {} + def get_next(next_link=None): + _request = prepare_request(next_link) - 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 + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) + response = pipeline_response.http_response - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) - 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 + return pipeline_response + + return ItemPaged(get_next, extract_data) @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. + def list(self, **kwargs: Any) -> ItemPaged["_models.Registry"]: + """Lists all the container registries under the specified subscription. - :param resource_group_name: The name of the resource group. The 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] + :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.ConnectedRegistryListResult] = kwargs.pop("cls", None) + cls: ClsType[_models._models.RegistryListResult] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -5426,11 +5221,8 @@ def list( 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, + _request = build_registries_list_request( subscription_id=self._config.subscription_id, - filter=filter, api_version=self._config.api_version, headers=_headers, params=_params, @@ -5456,7 +5248,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = self._deserialize( - _models._models.ConnectedRegistryListResult, pipeline_response # pylint: disable=protected-access + _models._models.RegistryListResult, pipeline_response # pylint: disable=protected-access ) list_of_elem = deserialized.value if cls: @@ -5474,16 +5266,149 @@ def get_next(next_link=None): 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) + raise HttpResponseError(response=response) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @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) + raise HttpResponseError(response=response) + + deserialized = self._deserialize("RegistryListCredentialsResult", 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: + """ - return pipeline_response + @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. - return ItemPaged(get_next, extract_data) + :param resource_group_name: The name of the resource group. The name 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: + """ - def _deactivate_initial( - self, resource_group_name: str, registry_name: str, connected_registry_name: str, **kwargs: Any - ) -> Iterator[bytes]: + @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, @@ -5492,122 +5417,64 @@ def _deactivate_initial( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.RegistryListCredentialsResult] = kwargs.pop("cls", None) - _request = build_connected_registries_deactivate_request( + 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, - 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 + _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, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + 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) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + raise HttpResponseError(response=response) - deserialized = response.iter_bytes() + deserialized = self._deserialize("RegistryListCredentialsResult", pipeline_response.http_response) if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore + return cls(pipeline_response, deserialized, {}) # 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( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, registry_name: str, connected_registry_name: str, **kwargs: Any - ) -> None: - """Resync the connected registry instance. + 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 - :param connected_registry_name: The name of the connected registry. Required. - :type connected_registry_name: str - :return: None - :rtype: None + :return: RegistryUsageListResult + :rtype: ~container_registry_management_client.models.RegistryUsageListResult :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -5621,12 +5488,11 @@ def resync( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[_models.RegistryUsageListResult] = kwargs.pop("cls", None) - _request = build_connected_registries_resync_request( + _request = build_registries_list_usages_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, @@ -5643,52 +5509,35 @@ def resync( # pylint: disable=inconsistent-return-statements 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) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - -class CredentialSetsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. + raise HttpResponseError(response=response) - Instead, you should access the following operations through - :class:`~container_registry_management_client.ContainerRegistryManagementClient`'s - :attr:`credential_sets` attribute. - """ + deserialized = self._deserialize("RegistryUsageListResult", pipeline_response.http_response) - models = _models + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore - 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") + return deserialized # type: ignore @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. + 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 CredentialSet + :return: An iterator like instance of PrivateLinkResource :rtype: - ~azure.core.paging.ItemPaged[~container_registry_management_client.models.CredentialSet] + ~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.CredentialSetListResult] = kwargs.pop("cls", None) + cls: ClsType[_models._models.PrivateLinkResourceListResult] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -5701,7 +5550,7 @@ def list(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> I def prepare_request(next_link=None): if not next_link: - _request = build_credential_sets_list_request( + _request = build_registries_list_private_link_resources_request( resource_group_name=resource_group_name, registry_name=registry_name, subscription_id=self._config.subscription_id, @@ -5730,7 +5579,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = self._deserialize( - _models._models.CredentialSetListResult, pipeline_response # pylint: disable=protected-access + _models._models.PrivateLinkResourceListResult, pipeline_response # pylint: disable=protected-access ) list_of_elem = deserialized.value if cls: @@ -5748,28 +5597,27 @@ def get_next(next_link=None): 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) + raise HttpResponseError(response=response) 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. + 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 credential_set_name: The name of the credential set. Required. - :type credential_set_name: str - :return: CredentialSet - :rtype: ~container_registry_management_client.models.CredentialSet + :param group_name: The name of the private link resource. Required. + :type group_name: str + :return: PrivateLinkResource + :rtype: ~container_registry_management_client.models.PrivateLinkResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -5783,12 +5631,12 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.CredentialSet] = kwargs.pop("cls", None) + cls: ClsType[_models.PrivateLinkResource] = kwargs.pop("cls", None) - _request = build_credential_sets_get_request( + _request = build_registries_get_private_link_resource_request( resource_group_name=resource_group_name, registry_name=registry_name, - credential_set_name=credential_set_name, + group_name=group_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -5805,22 +5653,24 @@ def get( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize("CredentialSet", pipeline_response.http_response) + deserialized = self._deserialize("PrivateLinkResource", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - def _create_initial( + def _generate_credentials_initial( self, resource_group_name: str, registry_name: str, - credential_set_name: str, - credential_set_create_parameters: Union[_models.CredentialSet, IO[bytes]], + generate_credentials_parameters: Union[_models.GenerateCredentialsParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -5840,15 +5690,14 @@ def _create_initial( content_type = content_type or "application/json" _json = None _content = None - if isinstance(credential_set_create_parameters, (IOBase, bytes)): - _content = credential_set_create_parameters + if isinstance(generate_credentials_parameters, (IOBase, bytes)): + _content = generate_credentials_parameters else: - _json = self._serialize.body(credential_set_create_parameters, "CredentialSet") + _json = self._serialize.body(generate_credentials_parameters, "GenerateCredentialsParameters") - _request = build_credential_sets_create_request( + _request = build_registries_generate_credentials_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, @@ -5866,20 +5715,21 @@ def _create_initial( response = pipeline_response.http_response - if response.status_code not in [200, 201]: + 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) + 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") - ) + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) deserialized = response.iter_bytes() @@ -5889,111 +5739,99 @@ def _create_initial( return deserialized # type: ignore @overload - def begin_create( + def begin_generate_credentials( self, resource_group_name: str, registry_name: str, - credential_set_name: str, - credential_set_create_parameters: _models.CredentialSet, + generate_credentials_parameters: _models.GenerateCredentialsParameters, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.CredentialSet]: - """Creates a credential set for a container registry with the specified parameters. + ) -> 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 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 + :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 CredentialSet + :return: An instance of LROPoller that returns GenerateCredentialsResult :rtype: - ~azure.core.polling.LROPoller[~container_registry_management_client.models.CredentialSet] + ~azure.core.polling.LROPoller[~container_registry_management_client.models.GenerateCredentialsResult] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_create( + def begin_generate_credentials( self, resource_group_name: str, registry_name: str, - credential_set_name: str, - credential_set_create_parameters: IO[bytes], + generate_credentials_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. + ) -> 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 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] + :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 CredentialSet + :return: An instance of LROPoller that returns GenerateCredentialsResult :rtype: - ~azure.core.polling.LROPoller[~container_registry_management_client.models.CredentialSet] + ~azure.core.polling.LROPoller[~container_registry_management_client.models.GenerateCredentialsResult] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace - def begin_create( + def begin_generate_credentials( self, resource_group_name: str, registry_name: str, - credential_set_name: str, - credential_set_create_parameters: Union[_models.CredentialSet, IO[bytes]], + generate_credentials_parameters: Union[_models.GenerateCredentialsParameters, IO[bytes]], **kwargs: Any - ) -> LROPoller[_models.CredentialSet]: - """Creates a credential set for a container registry with the specified parameters. + ) -> 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 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 + :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.CredentialSet] + ~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.CredentialSet] = kwargs.pop("cls", 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._create_initial( + raw_result = self._generate_credentials_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, + generate_credentials_parameters=generate_credentials_parameters, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, @@ -6004,34 +5842,69 @@ def begin_create( kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("CredentialSet", pipeline_response.http_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": "azure-async-operation"}, **kwargs), + 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.CredentialSet].from_continuation_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.CredentialSet]( + return LROPoller[_models.GenerateCredentialsResult]( 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]: + +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 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, @@ -6043,14 +5916,80 @@ def _delete_initial( _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) - _request = build_credential_sets_delete_request( + 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, - credential_set_name=credential_set_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, ) @@ -6063,18 +6002,23 @@ def _delete_initial( response = pipeline_response.http_response - if response.status_code not in [202, 204]: + 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) + 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")) + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) deserialized = response.iter_bytes() @@ -6083,35 +6027,107 @@ def _delete_initial( 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_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. + 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 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] + :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 = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - cls: ClsType[None] = kwargs.pop("cls", None) + 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._delete_initial( + raw_result = self._create_initial( resource_group_name=resource_group_name, registry_name=registry_name, - credential_set_name=credential_set_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, @@ -6120,33 +6136,38 @@ def begin_delete( raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("CacheRule", pipeline_response.http_response) if cls: - return cls(pipeline_response, None, {}) # type: ignore + 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) + 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[None].from_continuation_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[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + 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, - credential_set_name: str, - credential_set_update_parameters: Union[_models.CredentialSetUpdateParameters, IO[bytes]], + cache_rule_name: str, + cache_rule_update_parameters: Union[_models.CacheRuleUpdateParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -6166,15 +6187,15 @@ def _update_initial( content_type = content_type or "application/json" _json = None _content = None - if isinstance(credential_set_update_parameters, (IOBase, bytes)): - _content = credential_set_update_parameters + if isinstance(cache_rule_update_parameters, (IOBase, bytes)): + _content = cache_rule_update_parameters else: - _json = self._serialize.body(credential_set_update_parameters, "CredentialSetUpdateParameters") + _json = self._serialize.body(cache_rule_update_parameters, "CacheRuleUpdateParameters") - _request = build_credential_sets_update_request( + _request = build_cache_rules_update_request( resource_group_name=resource_group_name, registry_name=registry_name, - credential_set_name=credential_set_name, + cache_rule_name=cache_rule_name, subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -6198,7 +6219,10 @@ def _update_initial( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -6219,31 +6243,29 @@ def begin_update( self, resource_group_name: str, registry_name: str, - credential_set_name: str, - credential_set_update_parameters: _models.CredentialSetUpdateParameters, + cache_rule_name: str, + cache_rule_update_parameters: _models.CacheRuleUpdateParameters, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.CredentialSet]: - """Updates a credential set for a container registry with the specified parameters. + ) -> 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 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 + :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 CredentialSet - :rtype: - ~azure.core.polling.LROPoller[~container_registry_management_client.models.CredentialSet] + :return: An instance of LROPoller that returns CacheRule + :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.CacheRule] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -6252,30 +6274,28 @@ def begin_update( self, resource_group_name: str, registry_name: str, - credential_set_name: str, - credential_set_update_parameters: IO[bytes], + cache_rule_name: str, + cache_rule_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. + ) -> 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 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] + :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 CredentialSet - :rtype: - ~azure.core.polling.LROPoller[~container_registry_management_client.models.CredentialSet] + :return: An instance of LROPoller that returns CacheRule + :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.CacheRule] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -6284,43 +6304,162 @@ def begin_update( self, resource_group_name: str, registry_name: str, - credential_set_name: str, - credential_set_update_parameters: Union[_models.CredentialSetUpdateParameters, IO[bytes]], + cache_rule_name: str, + cache_rule_update_parameters: Union[_models.CacheRuleUpdateParameters, IO[bytes]], **kwargs: Any - ) -> LROPoller[_models.CredentialSet]: - """Updates a credential set for a container registry with the specified parameters. + ) -> 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")) + + 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 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] + :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 = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = 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) + 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._update_initial( + raw_result = self._delete_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, + cache_rule_name=cache_rule_name, cls=lambda x, y, z: x, headers=_headers, params=_params, @@ -6329,72 +6468,44 @@ def begin_update( 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) + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: PollingMethod = cast( - PollingMethod, - LROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + 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.CredentialSet].from_continuation_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[_models.CredentialSet]( - 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") + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @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. + 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 ExportPipeline - :rtype: - ~azure.core.paging.ItemPaged[~container_registry_management_client.models.ExportPipeline] + :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.ExportPipelineListResult] = kwargs.pop("cls", None) + cls: ClsType[_models._models.CacheRulesListResult] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -6407,7 +6518,7 @@ def list(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> I def prepare_request(next_link=None): if not next_link: - _request = build_export_pipelines_list_request( + _request = build_cache_rules_list_request( resource_group_name=resource_group_name, registry_name=registry_name, subscription_id=self._config.subscription_id, @@ -6436,7 +6547,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = self._deserialize( - _models._models.ExportPipelineListResult, pipeline_response # pylint: disable=protected-access + _models._models.CacheRulesListResult, pipeline_response # pylint: disable=protected-access ) list_of_elem = deserialized.value if cls: @@ -6454,28 +6565,193 @@ def get_next(next_link=None): 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) return pipeline_response return ItemPaged(get_next, extract_data) + @overload + def sync_cache_rule( + self, + resource_group_name: str, + registry_name: str, + cache_rule_name: str, + sync_tag_parameters: _models.CacheRuleSyncParameters, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> None: + """sync_cache_rule. + + :param resource_group_name: The name of the resource group. The name 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 sync_tag_parameters: Required. + :type sync_tag_parameters: ~container_registry_management_client.models.CacheRuleSyncParameters + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def sync_cache_rule( + self, + resource_group_name: str, + registry_name: str, + cache_rule_name: str, + sync_tag_parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> None: + """sync_cache_rule. + + :param resource_group_name: The name of the resource group. The name 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 sync_tag_parameters: Required. + :type sync_tag_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: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def sync_cache_rule( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + registry_name: str, + cache_rule_name: str, + sync_tag_parameters: Union[_models.CacheRuleSyncParameters, IO[bytes]], + **kwargs: Any + ) -> None: + """sync_cache_rule. + + :param resource_group_name: The name of the resource group. The name 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 sync_tag_parameters: Is either a CacheRuleSyncParameters type or a IO[bytes] type. + Required. + :type sync_tag_parameters: ~container_registry_management_client.models.CacheRuleSyncParameters + or IO[bytes] + :return: None + :rtype: None + :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[None] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(sync_tag_parameters, (IOBase, bytes)): + _content = sync_tag_parameters + else: + _json = self._serialize.body(sync_tag_parameters, "CacheRuleSyncParameters") + + _request = build_cache_rules_sync_cache_rule_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 = 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) + + if cls: + return cls(pipeline_response, None, {}) # 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 get( - self, resource_group_name: str, registry_name: str, export_pipeline_name: str, **kwargs: Any - ) -> _models.ExportPipeline: - """Gets the properties of the export pipeline. + 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 export_pipeline_name: The name of the export pipeline. Required. - :type export_pipeline_name: str - :return: ExportPipeline - :rtype: ~container_registry_management_client.models.ExportPipeline + :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 = { @@ -6489,12 +6765,12 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.ExportPipeline] = kwargs.pop("cls", None) + cls: ClsType[_models.ConnectedRegistry] = kwargs.pop("cls", None) - _request = build_export_pipelines_get_request( + _request = build_connected_registries_get_request( resource_group_name=resource_group_name, registry_name=registry_name, - export_pipeline_name=export_pipeline_name, + connected_registry_name=connected_registry_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -6511,10 +6787,13 @@ def get( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize("ExportPipeline", pipeline_response.http_response) + deserialized = self._deserialize("ConnectedRegistry", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -6525,8 +6804,8 @@ def _create_initial( self, resource_group_name: str, registry_name: str, - export_pipeline_name: str, - export_pipeline_create_parameters: Union[_models.ExportPipeline, IO[bytes]], + connected_registry_name: str, + connected_registry_create_parameters: Union[_models.ConnectedRegistry, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -6546,15 +6825,15 @@ def _create_initial( content_type = content_type or "application/json" _json = None _content = None - if isinstance(export_pipeline_create_parameters, (IOBase, bytes)): - _content = export_pipeline_create_parameters + if isinstance(connected_registry_create_parameters, (IOBase, bytes)): + _content = connected_registry_create_parameters else: - _json = self._serialize.body(export_pipeline_create_parameters, "ExportPipeline") + _json = self._serialize.body(connected_registry_create_parameters, "ConnectedRegistry") - _request = build_export_pipelines_create_request( + _request = build_connected_registries_create_request( resource_group_name=resource_group_name, registry_name=registry_name, - export_pipeline_name=export_pipeline_name, + connected_registry_name=connected_registry_name, subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -6578,7 +6857,10 @@ def _create_initial( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -6599,31 +6881,31 @@ def begin_create( self, resource_group_name: str, registry_name: str, - export_pipeline_name: str, - export_pipeline_create_parameters: _models.ExportPipeline, + connected_registry_name: str, + connected_registry_create_parameters: _models.ConnectedRegistry, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.ExportPipeline]: - """Creates an export pipeline for a container registry with the specified parameters. + ) -> 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 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. + :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 export_pipeline_create_parameters: - ~container_registry_management_client.models.ExportPipeline + :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 ExportPipeline + :return: An instance of LROPoller that returns ConnectedRegistry :rtype: - ~azure.core.polling.LROPoller[~container_registry_management_client.models.ExportPipeline] + ~azure.core.polling.LROPoller[~container_registry_management_client.models.ConnectedRegistry] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -6632,30 +6914,30 @@ def begin_create( self, resource_group_name: str, registry_name: str, - export_pipeline_name: str, - export_pipeline_create_parameters: IO[bytes], + connected_registry_name: str, + connected_registry_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. + ) -> 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 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. + :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 export_pipeline_create_parameters: IO[bytes] + :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 ExportPipeline + :return: An instance of LROPoller that returns ConnectedRegistry :rtype: - ~azure.core.polling.LROPoller[~container_registry_management_client.models.ExportPipeline] + ~azure.core.polling.LROPoller[~container_registry_management_client.models.ConnectedRegistry] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -6664,33 +6946,33 @@ def begin_create( self, resource_group_name: str, registry_name: str, - export_pipeline_name: str, - export_pipeline_create_parameters: Union[_models.ExportPipeline, IO[bytes]], + connected_registry_name: str, + connected_registry_create_parameters: Union[_models.ConnectedRegistry, IO[bytes]], **kwargs: Any - ) -> LROPoller[_models.ExportPipeline]: - """Creates an export pipeline for a container registry with the specified parameters. + ) -> 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 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 + :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.ExportPipeline] + ~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.ExportPipeline] = kwargs.pop("cls", 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) @@ -6698,8 +6980,8 @@ def begin_create( 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, + 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, @@ -6710,7 +6992,7 @@ def begin_create( kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ExportPipeline", pipeline_response.http_response) + deserialized = self._deserialize("ConnectedRegistry", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -6725,155 +7007,22 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller[_models.ExportPipeline].from_continuation_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.ExportPipeline]( + 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, 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")) - - 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 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") - - def _import_image_initial( + def _update_initial( self, resource_group_name: str, registry_name: str, - parameters: Union[_models.ImportImageParameters, IO[bytes]], + connected_registry_name: str, + connected_registry_update_parameters: Union[_models.ConnectedRegistryUpdateParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -6893,14 +7042,15 @@ def _import_image_initial( content_type = content_type or "application/json" _json = None _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters + if isinstance(connected_registry_update_parameters, (IOBase, bytes)): + _content = connected_registry_update_parameters else: - _json = self._serialize.body(parameters, "ImportImageParameters") + _json = self._serialize.body(connected_registry_update_parameters, "ConnectedRegistryUpdateParameters") - _request = build_registries_import_image_request( + _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, @@ -6918,17 +7068,23 @@ def _import_image_initial( response = pipeline_response.http_response - if response.status_code not in [200, 202]: + 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) - raise HttpResponseError(response=response) + 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")) + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) deserialized = response.iter_bytes() @@ -6938,97 +7094,111 @@ def _import_image_initial( return deserialized # type: ignore @overload - def begin_import_image( + def begin_update( self, resource_group_name: str, registry_name: str, - parameters: _models.ImportImageParameters, + connected_registry_name: str, + connected_registry_update_parameters: _models.ConnectedRegistryUpdateParameters, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[None]: - """Copies an image to this container registry from the specified container registry. + ) -> 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 parameters: The parameters specifying the image to copy and the source container - registry. Required. - :type parameters: ~container_registry_management_client.models.ImportImageParameters + :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 None - :rtype: ~azure.core.polling.LROPoller[None] + :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_import_image( + def begin_update( self, resource_group_name: str, registry_name: str, - parameters: IO[bytes], + connected_registry_name: str, + connected_registry_update_parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[None]: - """Copies an image to this container registry from the specified container registry. + ) -> 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 parameters: The parameters specifying the image to copy and the source container - registry. Required. - :type parameters: IO[bytes] + :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 None - :rtype: ~azure.core.polling.LROPoller[None] + :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_import_image( + def begin_update( self, resource_group_name: str, registry_name: str, - parameters: Union[_models.ImportImageParameters, IO[bytes]], + connected_registry_name: str, + connected_registry_update_parameters: Union[_models.ConnectedRegistryUpdateParameters, IO[bytes]], **kwargs: Any - ) -> LROPoller[None]: - """Copies an image to this container registry from the specified container registry. + ) -> 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 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] + :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[None] = kwargs.pop("cls", 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._import_image_initial( + raw_result = self._update_initial( resource_group_name=resource_group_name, registry_name=registry_name, - parameters=parameters, + 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, @@ -7038,83 +7208,35 @@ def begin_import_image( raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("ConnectedRegistry", pipeline_response.http_response) if cls: - return cls(pipeline_response, None, {}) # type: ignore + 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) + 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[None].from_continuation_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[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @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 object containing information for the availability - request. 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 object containing information for the availability - request. 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. + return LROPoller[_models.ConnectedRegistry]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - :param registry_name_check_request: The object containing information for the availability - request. 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: - """ + 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, @@ -7123,61 +7245,135 @@ def check_name_availability( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = 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") + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_registries_check_name_availability_request( + _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, - 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 + _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]: + 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) - raise HttpResponseError(response=response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize("RegistryNameStatus", pipeline_response.http_response) + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # 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. + 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. - :return: An iterator like instance of Registry - :rtype: ~azure.core.paging.ItemPaged[~container_registry_management_client.models.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 + + @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.RegistryListResult] = kwargs.pop("cls", None) + cls: ClsType[_models._models.ConnectedRegistryListResult] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -7190,8 +7386,11 @@ def list(self, **kwargs: Any) -> ItemPaged["_models.Registry"]: def prepare_request(next_link=None): if not next_link: - _request = build_registries_list_request( + _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, @@ -7217,7 +7416,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = self._deserialize( - _models._models.RegistryListResult, pipeline_response # pylint: disable=protected-access + _models._models.ConnectedRegistryListResult, pipeline_response # pylint: disable=protected-access ) list_of_elem = deserialized.value if cls: @@ -7235,28 +7434,148 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) return pipeline_response return ItemPaged(get_next, extract_data) + 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")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + @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. + 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 - :return: An iterator like instance of Registry - :rtype: ~azure.core.paging.ItemPaged[~container_registry_management_client.models.Registry] + :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[_models._models.RegistryListResult] = kwargs.pop("cls", 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._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, @@ -7265,72 +7584,81 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite } error_map.update(kwargs.pop("error_map", {}) or {}) - def prepare_request(next_link=None): - if not next_link: + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} - _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) + cls: ClsType[_models.ConnectedRegistry] = kwargs.pop("cls", None) - 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) + _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) - return _request + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) - def extract_data(pipeline_response): - deserialized = self._deserialize( - _models._models.RegistryListResult, pipeline_response # pylint: disable=protected-access + 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, ) - 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) + raise HttpResponseError(response=response, model=error) - def get_next(next_link=None): - _request = prepare_request(next_link) + deserialized = self._deserialize("ConnectedRegistry", pipeline_response.http_response) - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) + return deserialized # type: ignore - return pipeline_response - return ItemPaged(get_next, extract_data) +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 get(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> _models.Registry: - """Gets the properties of the specified container registry. + 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 - :return: Registry - :rtype: ~container_registry_management_client.models.Registry + :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 = { @@ -7344,11 +7672,12 @@ def get(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> _m _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.Registry] = kwargs.pop("cls", None) + cls: ClsType[_models.CredentialSet] = kwargs.pop("cls", None) - _request = build_registries_get_request( + _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, @@ -7365,9 +7694,13 @@ def get(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> _m if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize("Registry", pipeline_response.http_response) + deserialized = self._deserialize("CredentialSet", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -7375,7 +7708,12 @@ def get(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> _m return deserialized # type: ignore def _create_initial( - self, resource_group_name: str, registry_name: str, registry: Union[_models.Registry, IO[bytes]], **kwargs: Any + 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, @@ -7394,14 +7732,15 @@ def _create_initial( content_type = content_type or "application/json" _json = None _content = None - if isinstance(registry, (IOBase, bytes)): - _content = registry + if isinstance(credential_set_create_parameters, (IOBase, bytes)): + _content = credential_set_create_parameters else: - _json = self._serialize.body(registry, "Registry") + _json = self._serialize.body(credential_set_create_parameters, "CredentialSet") - _request = build_registries_create_request( + _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, @@ -7425,7 +7764,11 @@ def _create_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) response_headers = {} if response.status_code == 201: @@ -7445,25 +7788,31 @@ def begin_create( self, resource_group_name: str, registry_name: str, - registry: _models.Registry, + credential_set_name: str, + credential_set_create_parameters: _models.CredentialSet, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.Registry]: - """Creates a container registry with the specified parameters. + ) -> 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 registry: The parameters for creating a container registry. Required. - :type registry: ~container_registry_management_client.models.Registry + :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 Registry - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Registry] + :return: An instance of LROPoller that returns CredentialSet + :rtype: + ~azure.core.polling.LROPoller[~container_registry_management_client.models.CredentialSet] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -7472,51 +7821,65 @@ def begin_create( self, resource_group_name: str, registry_name: str, - registry: IO[bytes], + credential_set_name: str, + credential_set_create_parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.Registry]: - """Creates a container registry with the specified parameters. + ) -> 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 registry: The parameters for creating a container registry. Required. - :type registry: IO[bytes] + :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 Registry - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Registry] + :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, registry: Union[_models.Registry, IO[bytes]], **kwargs: Any - ) -> LROPoller[_models.Registry]: - """Creates a container registry with the specified parameters. + 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 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] + :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.Registry] = kwargs.pop("cls", 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) @@ -7524,7 +7887,8 @@ def begin_create( raw_result = self._create_initial( resource_group_name=resource_group_name, registry_name=registry_name, - registry=registry, + 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, @@ -7535,7 +7899,7 @@ def begin_create( kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Registry", pipeline_response.http_response) + deserialized = self._deserialize("CredentialSet", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -7550,124 +7914,22 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller[_models.Registry].from_continuation_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.Registry]( + 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, **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) - raise HttpResponseError(response=response) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - 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 _update_initial( self, resource_group_name: str, registry_name: str, - registry_update_parameters: Union[_models.RegistryUpdateParameters, IO[bytes]], + credential_set_name: str, + credential_set_update_parameters: Union[_models.CredentialSetUpdateParameters, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -7687,14 +7949,15 @@ def _update_initial( content_type = content_type or "application/json" _json = None _content = None - if isinstance(registry_update_parameters, (IOBase, bytes)): - _content = registry_update_parameters + if isinstance(credential_set_update_parameters, (IOBase, bytes)): + _content = credential_set_update_parameters else: - _json = self._serialize.body(registry_update_parameters, "RegistryUpdateParameters") + _json = self._serialize.body(credential_set_update_parameters, "CredentialSetUpdateParameters") - _request = build_registries_update_request( + _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, @@ -7718,7 +7981,11 @@ def _update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) response_headers = {} if response.status_code == 201: @@ -7738,26 +8005,31 @@ def begin_update( self, resource_group_name: str, registry_name: str, - registry_update_parameters: _models.RegistryUpdateParameters, + credential_set_name: str, + credential_set_update_parameters: _models.CredentialSetUpdateParameters, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.Registry]: - """Updates a container registry with the specified parameters. + ) -> 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 registry_update_parameters: The parameters for updating a container registry. Required. - :type registry_update_parameters: - ~container_registry_management_client.models.RegistryUpdateParameters + :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 Registry - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Registry] + :return: An instance of LROPoller that returns CredentialSet + :rtype: + ~azure.core.polling.LROPoller[~container_registry_management_client.models.CredentialSet] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -7766,25 +8038,30 @@ def begin_update( self, resource_group_name: str, registry_name: str, - registry_update_parameters: IO[bytes], + credential_set_name: str, + credential_set_update_parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.Registry]: - """Updates a container registry with the specified parameters. + ) -> 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 registry_update_parameters: The parameters for updating a container registry. Required. - :type registry_update_parameters: IO[bytes] + :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 Registry - :rtype: ~azure.core.polling.LROPoller[~container_registry_management_client.models.Registry] + :return: An instance of LROPoller that returns CredentialSet + :rtype: + ~azure.core.polling.LROPoller[~container_registry_management_client.models.CredentialSet] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -7793,29 +8070,33 @@ def begin_update( self, resource_group_name: str, registry_name: str, - registry_update_parameters: Union[_models.RegistryUpdateParameters, IO[bytes]], + credential_set_name: str, + credential_set_update_parameters: Union[_models.CredentialSetUpdateParameters, IO[bytes]], **kwargs: Any - ) -> LROPoller[_models.Registry]: - """Updates a container registry with the specified parameters. + ) -> 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 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] + :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.Registry] = kwargs.pop("cls", 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) @@ -7823,7 +8104,8 @@ def begin_update( raw_result = self._update_initial( resource_group_name=resource_group_name, registry_name=registry_name, - registry_update_parameters=registry_update_parameters, + 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, @@ -7834,7 +8116,7 @@ def begin_update( kwargs.pop("error_map", None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Registry", pipeline_response.http_response) + deserialized = self._deserialize("CredentialSet", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -7849,31 +8131,19 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller[_models.Registry].from_continuation_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.Registry]( + return LROPoller[_models.CredentialSet]( self._client, raw_result, get_long_running_output, polling_method # 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: - """ + 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, @@ -7885,11 +8155,12 @@ def list_usages( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.RegistryUsageListResult] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_registries_list_usages_request( + _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, @@ -7897,44 +8168,112 @@ def list_usages( ) _request.url = self._client.format_url(_request.url) - _stream = False + _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]: + 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) - raise HttpResponseError(response=response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize("RegistryUsageListResult", pipeline_response.http_response) + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # 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. + 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 - :return: An iterator like instance of PrivateLinkResource + :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 + + @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.PrivateLinkResource] + ~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.PrivateLinkResourceListResult] = kwargs.pop("cls", None) + cls: ClsType[_models._models.CredentialSetListResult] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -7947,7 +8286,7 @@ def list_private_link_resources( def prepare_request(next_link=None): if not next_link: - _request = build_registries_list_private_link_resources_request( + _request = build_credential_sets_list_request( resource_group_name=resource_group_name, registry_name=registry_name, subscription_id=self._config.subscription_id, @@ -7976,7 +8315,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = self._deserialize( - _models._models.PrivateLinkResourceListResult, pipeline_response # pylint: disable=protected-access + _models._models.CredentialSetListResult, pipeline_response # pylint: disable=protected-access ) list_of_elem = deserialized.value if cls: @@ -7994,150 +8333,53 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) + 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 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 check_cache_rule_artifact_sync_estimate( - self, - resource_group_name: str, - registry_name: str, - cache_rule_parameters: _models.CacheRule, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CacheRuleArtifactSyncEstimateResult: - """Checks the upstream repository for artifacts that match the cache rule's sync scope filter and - estimates the number of artifacts that would be synchronized if the rule is applied. - - :param resource_group_name: The name of the resource group. The name 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_parameters: The cache rule resource. Required. - :type cache_rule_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: CacheRuleArtifactSyncEstimateResult - :rtype: ~container_registry_management_client.models.CacheRuleArtifactSyncEstimateResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def check_cache_rule_artifact_sync_estimate( - self, - resource_group_name: str, - registry_name: str, - cache_rule_parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CacheRuleArtifactSyncEstimateResult: - """Checks the upstream repository for artifacts that match the cache rule's sync scope filter and - estimates the number of artifacts that would be synchronized if the rule is applied. - :param resource_group_name: The name of the resource group. The name 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_parameters: The cache rule resource. Required. - :type cache_rule_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: CacheRuleArtifactSyncEstimateResult - :rtype: ~container_registry_management_client.models.CacheRuleArtifactSyncEstimateResult - :raises ~azure.core.exceptions.HttpResponseError: - """ +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 check_cache_rule_artifact_sync_estimate( - self, - resource_group_name: str, - registry_name: str, - cache_rule_parameters: Union[_models.CacheRule, IO[bytes]], - **kwargs: Any - ) -> _models.CacheRuleArtifactSyncEstimateResult: - """Checks the upstream repository for artifacts that match the cache rule's sync scope filter and - estimates the number of artifacts that would be synchronized if the rule is applied. + 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 cache_rule_parameters: The cache rule resource. Is either a CacheRule type or a - IO[bytes] type. Required. - :type cache_rule_parameters: ~container_registry_management_client.models.CacheRule or - IO[bytes] - :return: CacheRuleArtifactSyncEstimateResult - :rtype: ~container_registry_management_client.models.CacheRuleArtifactSyncEstimateResult + :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 = { @@ -8148,28 +8390,17 @@ def check_cache_rule_artifact_sync_estimate( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = 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.CacheRuleArtifactSyncEstimateResult] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(cache_rule_parameters, (IOBase, bytes)): - _content = cache_rule_parameters - else: - _json = self._serialize.body(cache_rule_parameters, "CacheRule") + cls: ClsType[_models.ExportPipeline] = kwargs.pop("cls", None) - _request = build_registries_check_cache_rule_artifact_sync_estimate_request( + _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, - content_type=content_type, api_version=self._config.api_version, - json=_json, - content=_content, headers=_headers, params=_params, ) @@ -8184,31 +8415,27 @@ def check_cache_rule_artifact_sync_estimate( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize("CacheRuleArtifactSyncEstimateResult", pipeline_response.http_response) + deserialized = self._deserialize("ExportPipeline", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # 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: - """ + 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, @@ -8217,179 +8444,209 @@ def list_credentials( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.RegistryListCredentialsResult] = kwargs.pop("cls", None) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_registries_list_credentials_request( + 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 = False + _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]: + 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) - raise HttpResponseError(response=response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) + raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize("RegistryListCredentialsResult", pipeline_response.http_response) + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + + deserialized = response.iter_bytes() if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore @overload - def regenerate_credential( + def begin_create( self, resource_group_name: str, registry_name: str, - regenerate_credential_parameters: _models.RegenerateCredentialParameters, + export_pipeline_name: str, + export_pipeline_create_parameters: _models.ExportPipeline, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.RegistryListCredentialsResult: - """Regenerates one of the login credentials for the specified container registry. + ) -> 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 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 + :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: RegistryListCredentialsResult - :rtype: ~container_registry_management_client.models.RegistryListCredentialsResult + :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 regenerate_credential( + def begin_create( self, resource_group_name: str, registry_name: str, - regenerate_credential_parameters: IO[bytes], + export_pipeline_name: str, + export_pipeline_create_parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.RegistryListCredentialsResult: - """Regenerates one of the login credentials for the specified container registry. + ) -> 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 regenerate_credential_parameters: Specifies name of the password which should be - regenerated -- password or password2. Required. - :type regenerate_credential_parameters: IO[bytes] + :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: RegistryListCredentialsResult - :rtype: ~container_registry_management_client.models.RegistryListCredentialsResult + :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 regenerate_credential( + def begin_create( self, resource_group_name: str, registry_name: str, - regenerate_credential_parameters: Union[_models.RegenerateCredentialParameters, IO[bytes]], + export_pipeline_name: str, + export_pipeline_create_parameters: Union[_models.ExportPipeline, IO[bytes]], **kwargs: Any - ) -> _models.RegistryListCredentialsResult: - """Regenerates one of the login credentials for the specified container registry. + ) -> 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 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 + :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: """ - 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) - raise HttpResponseError(response=response) - - deserialized = self._deserialize("RegistryListCredentialsResult", pipeline_response.http_response) + 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) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + 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 - return deserialized # type: ignore + 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 _generate_credentials_initial( - self, - resource_group_name: str, - registry_name: str, - generate_credentials_parameters: Union[_models.GenerateCredentialsParameters, IO[bytes]], - **kwargs: Any + def _delete_initial( + self, resource_group_name: str, registry_name: str, export_pipeline_name: str, **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -8399,28 +8656,17 @@ def _generate_credentials_initial( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = 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( + _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, - content_type=content_type, api_version=self._config.api_version, - json=_json, - content=_content, headers=_headers, params=_params, ) @@ -8433,13 +8679,16 @@ def _generate_credentials_initial( response = pipeline_response.http_response - if response.status_code not in [200, 202]: + 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -8453,101 +8702,35 @@ def _generate_credentials_initial( 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. + 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 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] + :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 = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = 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) + 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._generate_credentials_initial( + raw_result = self._delete_initial( resource_group_name=resource_group_name, registry_name=registry_name, - generate_credentials_parameters=generate_credentials_parameters, - content_type=content_type, + export_pipeline_name=export_pipeline_name, cls=lambda x, y, z: x, headers=_headers, params=_params, @@ -8556,11 +8739,9 @@ def begin_generate_credentials( 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) + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: PollingMethod = cast( @@ -8571,56 +8752,32 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller[_models.GenerateCredentialsResult].from_continuation_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[_models.GenerateCredentialsResult]( - 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") + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @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. + 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 ImportPipeline + :return: An iterator like instance of ExportPipeline :rtype: - ~azure.core.paging.ItemPaged[~container_registry_management_client.models.ImportPipeline] + ~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.ImportPipelineListResult] = kwargs.pop("cls", None) + cls: ClsType[_models._models.ExportPipelineListResult] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -8633,7 +8790,7 @@ def list(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> I def prepare_request(next_link=None): if not next_link: - _request = build_import_pipelines_list_request( + _request = build_export_pipelines_list_request( resource_group_name=resource_group_name, registry_name=registry_name, subscription_id=self._config.subscription_id, @@ -8662,7 +8819,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = self._deserialize( - _models._models.ImportPipelineListResult, pipeline_response # pylint: disable=protected-access + _models._models.ExportPipelineListResult, pipeline_response # pylint: disable=protected-access ) list_of_elem = deserialized.value if cls: @@ -8680,13 +8837,38 @@ def get_next(next_link=None): 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) + 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 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 get( self, resource_group_name: str, registry_name: str, import_pipeline_name: str, **kwargs: Any @@ -8737,7 +8919,10 @@ def get( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("ImportPipeline", pipeline_response.http_response) @@ -8804,7 +8989,10 @@ def _create_initial( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -9001,7 +9189,10 @@ def _delete_initial( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -9065,49 +9256,32 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- 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 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") + 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(self, **kwargs: Any) -> ItemPaged["_models.OperationDefinition"]: - """Lists all of the available Azure Container Registry REST API operations. + def list(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> ItemPaged["_models.ImportPipeline"]: + """Lists all import pipelines for the specified container registry. - :return: An iterator like instance of OperationDefinition + :param resource_group_name: The name of the resource group. The 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.OperationDefinition] + ~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.OperationListResult] = kwargs.pop("cls", None) + cls: ClsType[_models._models.ImportPipelineListResult] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -9120,7 +9294,10 @@ def list(self, **kwargs: Any) -> ItemPaged["_models.OperationDefinition"]: def prepare_request(next_link=None): if not next_link: - _request = build_operations_list_request( + _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, @@ -9146,7 +9323,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = self._deserialize( - _models._models.OperationListResult, pipeline_response # pylint: disable=protected-access + _models._models.ImportPipelineListResult, pipeline_response # pylint: disable=protected-access ) list_of_elem = deserialized.value if cls: @@ -9164,21 +9341,25 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) + 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 PipelineRunsOperations: +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:`pipeline_runs` attribute. + :attr:`operations` attribute. """ models = _models @@ -9193,22 +9374,18 @@ def __init__(self, *args, **kwargs) -> None: 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. + def list(self, **kwargs: Any) -> ItemPaged["_models.OperationDefinition"]: + """Lists all of the available Azure Container Registry REST API operations. - :param resource_group_name: The name of the resource group. The 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] + :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.PipelineRunListResult] = kwargs.pop("cls", None) + cls: ClsType[_models._models.OperationListResult] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -9221,10 +9398,7 @@ def list(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> I 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, + _request = build_operations_list_request( api_version=self._config.api_version, headers=_headers, params=_params, @@ -9250,7 +9424,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = self._deserialize( - _models._models.PipelineRunListResult, pipeline_response # pylint: disable=protected-access + _models._models.OperationListResult, pipeline_response # pylint: disable=protected-access ) list_of_elem = deserialized.value if cls: @@ -9268,13 +9442,34 @@ def get_next(next_link=None): 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) + raise HttpResponseError(response=response) return pipeline_response return ItemPaged(get_next, extract_data) + +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 get( self, resource_group_name: str, registry_name: str, pipeline_run_name: str, **kwargs: Any @@ -9325,7 +9520,10 @@ def get( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("PipelineRun", pipeline_response.http_response) @@ -9392,7 +9590,10 @@ def _create_initial( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -9583,7 +9784,10 @@ def _delete_initial( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -9655,48 +9859,23 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- ) 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. + 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 PrivateEndpointConnection - :rtype: - ~azure.core.paging.ItemPaged[~container_registry_management_client.models.PrivateEndpointConnection] + :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.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) + cls: ClsType[_models._models.PipelineRunListResult] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -9709,7 +9888,7 @@ def list( def prepare_request(next_link=None): if not next_link: - _request = build_private_endpoint_connections_list_request( + _request = build_pipeline_runs_list_request( resource_group_name=resource_group_name, registry_name=registry_name, subscription_id=self._config.subscription_id, @@ -9738,8 +9917,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = self._deserialize( - _models._models.PrivateEndpointConnectionListResult, # pylint: disable=protected-access - pipeline_response, + _models._models.PipelineRunListResult, pipeline_response # pylint: disable=protected-access ) list_of_elem = deserialized.value if cls: @@ -9757,70 +9935,37 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) + 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 {} +class PrivateEndpointConnectionsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) + Instead, you should access the following operations through + :class:`~container_registry_management_client.ContainerRegistryManagementClient`'s + :attr:`private_endpoint_connections` attribute. + """ - _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) + models = _models - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs + 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") ) - - 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) - raise HttpResponseError(response=response) - - deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore + 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") def _create_or_update_initial( self, @@ -10038,6 +10183,65 @@ def get_long_running_output(pipeline_response): self._client, raw_result, get_long_running_output, polling_method # type: ignore ) + @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) + raise HttpResponseError(response=response) + + deserialized = self._deserialize("PrivateEndpointConnection", 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, private_endpoint_connection_name: str, **kwargs: Any ) -> Iterator[bytes]: @@ -10149,45 +10353,26 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- ) 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. + 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 Replication - :rtype: ~azure.core.paging.ItemPaged[~container_registry_management_client.models.Replication] + :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.ReplicationListResult] = kwargs.pop("cls", None) + cls: ClsType[_models._models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -10200,7 +10385,7 @@ def list(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> I def prepare_request(next_link=None): if not next_link: - _request = build_replications_list_request( + _request = build_private_endpoint_connections_list_request( resource_group_name=resource_group_name, registry_name=registry_name, subscription_id=self._config.subscription_id, @@ -10229,7 +10414,8 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = self._deserialize( - _models._models.ReplicationListResult, pipeline_response # pylint: disable=protected-access + _models._models.PrivateEndpointConnectionListResult, # pylint: disable=protected-access + pipeline_response, ) list_of_elem = deserialized.value if cls: @@ -10253,6 +10439,28 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) + +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 get( self, resource_group_name: str, registry_name: str, replication_name: str, **kwargs: Any @@ -10373,196 +10581,9 @@ def _create_initial( response_headers = {} if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - 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 _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) - raise HttpResponseError(response=response) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) deserialized = response.iter_bytes() @@ -10571,11 +10592,76 @@ def _delete_initial( 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_delete( - self, resource_group_name: str, registry_name: str, replication_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes a replication from a container registry. + 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. @@ -10584,22 +10670,28 @@ def begin_delete( :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] + :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 = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - cls: ClsType[None] = kwargs.pop("cls", None) + 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._delete_initial( + 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, @@ -10608,26 +10700,31 @@ def begin_delete( raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("Replication", pipeline_response.http_response) if cls: - return cls(pipeline_response, None, {}) # type: ignore + 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) + 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[None].from_continuation_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[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + return LROPoller[_models.Replication]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) def _update_initial( self, @@ -10837,45 +10934,134 @@ def get_long_running_output(pipeline_response): 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 {}) -class ScopeMapsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} - Instead, you should access the following operations through - :class:`~container_registry_management_client.ContainerRegistryManagementClient`'s - :attr:`scope_maps` attribute. - """ + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - models = _models + _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) - 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") + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs ) - 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") + + 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) + raise HttpResponseError(response=response) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore @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. + 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 - :return: An iterator like instance of ScopeMap - :rtype: ~azure.core.paging.ItemPaged[~container_registry_management_client.models.ScopeMap] + :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[_models._models.ScopeMapListResult] = kwargs.pop("cls", 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._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 + + @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, @@ -10888,7 +11074,7 @@ def list(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> I def prepare_request(next_link=None): if not next_link: - _request = build_scope_maps_list_request( + _request = build_replications_list_request( resource_group_name=resource_group_name, registry_name=registry_name, subscription_id=self._config.subscription_id, @@ -10917,7 +11103,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = self._deserialize( - _models._models.ScopeMapListResult, pipeline_response # pylint: disable=protected-access + _models._models.ReplicationListResult, pipeline_response # pylint: disable=protected-access ) list_of_elem = deserialized.value if cls: @@ -10933,14 +11119,35 @@ def get_next(next_link=None): ) 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) + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +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. + """ - return pipeline_response + models = _models - return ItemPaged(get_next, extract_data) + 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 get(self, resource_group_name: str, registry_name: str, scope_map_name: str, **kwargs: Any) -> _models.ScopeMap: @@ -10990,7 +11197,10 @@ def get(self, resource_group_name: str, registry_name: str, scope_map_name: str, 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("ScopeMap", pipeline_response.http_response) @@ -11057,7 +11267,10 @@ def _create_initial( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -11208,118 +11421,6 @@ def get_long_running_output(pipeline_response): 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")) - - 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 - def _update_initial( self, resource_group_name: str, @@ -11377,7 +11478,10 @@ def _update_initial( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -11529,45 +11633,138 @@ def get_long_running_output(pipeline_response): 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 {}) -class TokensOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} - Instead, you should access the following operations through - :class:`~container_registry_management_client.ContainerRegistryManagementClient`'s - :attr:`tokens` attribute. - """ + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - models = _models + _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) - 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") + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs ) - 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") + + 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")) + + 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 @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. + 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 Token - :rtype: ~azure.core.paging.ItemPaged[~container_registry_management_client.models.Token] + :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.TokenListResult] = kwargs.pop("cls", None) + cls: ClsType[_models._models.ScopeMapListResult] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -11580,7 +11777,7 @@ def list(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> I def prepare_request(next_link=None): if not next_link: - _request = build_tokens_list_request( + _request = build_scope_maps_list_request( resource_group_name=resource_group_name, registry_name=registry_name, subscription_id=self._config.subscription_id, @@ -11609,7 +11806,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = self._deserialize( - _models._models.TokenListResult, pipeline_response # pylint: disable=protected-access + _models._models.ScopeMapListResult, pipeline_response # pylint: disable=protected-access ) list_of_elem = deserialized.value if cls: @@ -11627,13 +11824,38 @@ def get_next(next_link=None): 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) + 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 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 get(self, resource_group_name: str, registry_name: str, token_name: str, **kwargs: Any) -> _models.Token: """Gets the properties of the specified token. @@ -11682,7 +11904,10 @@ def get(self, resource_group_name: str, registry_name: str, token_name: str, **k 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("Token", pipeline_response.http_response) @@ -11749,7 +11974,10 @@ def _create_initial( 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) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -11899,8 +12127,13 @@ def get_long_running_output(pipeline_response): 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 + 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, @@ -11910,17 +12143,29 @@ def _delete_initial( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) 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) - _request = build_tokens_delete_request( + 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, ) @@ -11933,18 +12178,23 @@ def _delete_initial( response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: + 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) + 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")) + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) deserialized = response.iter_bytes() @@ -11953,11 +12203,77 @@ def _delete_initial( 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_delete( - self, resource_group_name: str, registry_name: str, token_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes a token from a container registry. + 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. @@ -11966,22 +12282,29 @@ def begin_delete( :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] + :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 = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - cls: ClsType[None] = kwargs.pop("cls", None) + 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._delete_initial( + 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, @@ -11990,34 +12313,34 @@ def begin_delete( raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("Token", pipeline_response.http_response) if cls: - return cls(pipeline_response, None, {}) # type: ignore + 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) + 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[None].from_continuation_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[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + 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 + def _delete_initial( + self, resource_group_name: str, registry_name: str, token_name: str, **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -12027,29 +12350,17 @@ def _update_initial( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = 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( + _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, - content_type=content_type, api_version=self._config.api_version, - json=_json, - content=_content, headers=_headers, params=_params, ) @@ -12062,99 +12373,34 @@ def _update_initial( response = pipeline_response.http_response - if response.status_code not in [200, 201]: + 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 == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, ) + raise HttpResponseError(response=response, model=error) - 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: - """ + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - @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. + deserialized = response.iter_bytes() - :param resource_group_name: The name of the resource group. The name 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: - """ + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore @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. + 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. @@ -12163,29 +12409,22 @@ def begin_update( :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] + :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 {}) + _headers = 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) + 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._update_initial( + raw_result = self._delete_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, @@ -12194,71 +12433,44 @@ def begin_update( 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) + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized + return cls(pipeline_response, None, {}) # type: ignore if polling is True: polling_method: PollingMethod = cast( - PollingMethod, - LROBasePolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + 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.Token].from_continuation_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[_models.Token]( - 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") + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @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. + 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 Webhook - :rtype: ~azure.core.paging.ItemPaged[~container_registry_management_client.models.Webhook] + :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.WebhookListResult] = kwargs.pop("cls", None) + cls: ClsType[_models._models.TokenListResult] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -12271,7 +12483,7 @@ def list(self, resource_group_name: str, registry_name: str, **kwargs: Any) -> I def prepare_request(next_link=None): if not next_link: - _request = build_webhooks_list_request( + _request = build_tokens_list_request( resource_group_name=resource_group_name, registry_name=registry_name, subscription_id=self._config.subscription_id, @@ -12300,7 +12512,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = self._deserialize( - _models._models.WebhookListResult, pipeline_response # pylint: disable=protected-access + _models._models.TokenListResult, pipeline_response # pylint: disable=protected-access ) list_of_elem = deserialized.value if cls: @@ -12318,12 +12530,38 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) + 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 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 get(self, resource_group_name: str, registry_name: str, webhook_name: str, **kwargs: Any) -> _models.Webhook: """Gets the properties of the specified webhook. @@ -12585,120 +12823,9 @@ def get_long_running_output(pipeline_response): 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) - raise HttpResponseError(response=response) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - - 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 + return LROPoller[_models.Webhook]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) def _update_initial( self, @@ -12908,21 +13035,9 @@ def get_long_running_output(pipeline_response): self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - @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: - """ + 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, @@ -12934,9 +13049,9 @@ def ping(self, resource_group_name: str, registry_name: str, webhook_name: str, _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.EventInfo] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_webhooks_ping_request( + _request = build_webhooks_delete_request( resource_group_name=resource_group_name, registry_name=registry_name, webhook_name=webhook_name, @@ -12947,29 +13062,37 @@ def ping(self, resource_group_name: str, registry_name: str, webhook_name: str, ) _request.url = self._client.format_url(_request.url) - _stream = False + _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]: + 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) raise HttpResponseError(response=response) - deserialized = self._deserialize("EventInfo", pipeline_response.http_response) + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.iter_bytes() if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore @distributed_trace - def list_events( + def begin_delete( self, resource_group_name: str, registry_name: str, webhook_name: str, **kwargs: Any - ) -> ItemPaged["_models.Event"]: - """Lists recent events for the specified webhook. + ) -> 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. @@ -12978,14 +13101,68 @@ def list_events( :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] + :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[_models._models.EventListResult] = kwargs.pop("cls", 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._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 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, @@ -12998,10 +13175,9 @@ def list_events( def prepare_request(next_link=None): if not next_link: - _request = build_webhooks_list_events_request( + _request = build_webhooks_list_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, @@ -13028,7 +13204,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = self._deserialize( - _models._models.EventListResult, pipeline_response # pylint: disable=protected-access + _models._models.WebhookListResult, pipeline_response # pylint: disable=protected-access ) list_of_elem = deserialized.value if cls: @@ -13052,6 +13228,63 @@ def get_next(next_link=None): 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) + raise HttpResponseError(response=response) + + deserialized = self._deserialize("EventInfo", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + @distributed_trace def get_callback_config( self, resource_group_name: str, registry_name: str, webhook_name: str, **kwargs: Any @@ -13110,3 +13343,90 @@ def get_callback_config( 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) + raise HttpResponseError(response=response) + + return pipeline_response + + return ItemPaged(get_next, extract_data) diff --git a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/readme.md b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/readme.md index 30f52c9b40a..bad5c78f99e 100644 --- a/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/readme.md +++ b/src/acrcache/azext_acrcache/vendored_sdks/containerregistry/v2025_09_01_preview/readme.md @@ -1,4 +1,9 @@ ```yaml +openapi-type: arm +tag: package-2025-09-preview + +# Tag: package-2025-09-preview + input-file: - - ./containerregistry.json + - ./containerregistry_aspnetcore.json ``` \ No newline at end of file diff --git a/src/acrcache/setup.py b/src/acrcache/setup.py index dc8e1df1f84..ebaa4e22597 100644 --- a/src/acrcache/setup.py +++ b/src/acrcache/setup.py @@ -14,7 +14,7 @@ logger.warn("Wheel is not available, disabling bdist_wheel hook") # HISTORY.rst entry. -VERSION = '1.0.1' +VERSION = '1.0.2' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers