---
title: "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}"
method: PATCH
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}"
tags: ["Registries"]
---

# PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}

`PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}`

Updates a container registry with the specified parameters.

## Path parameters

- `registryName` string, required

## Parameters

- `../../../../../../common-types/resource-management/v6/types.json#/components/parameters/ApiVersionParameter` — unresolved $ref
- `../../../../../../common-types/resource-management/v6/types.json#/components/parameters/SubscriptionIdParameter` — unresolved $ref
- `../../../../../../common-types/resource-management/v6/types.json#/components/parameters/ResourceGroupNameParameter` — unresolved $ref

## Request body

- RegistryUpdateParameters — The parameters for updating a container registry.
  - `identity` IdentityProperties — Managed identity for the resource.
    - `principalId` string — The principal ID of resource identity.
    - `tenantId` string — The tenant ID of resource.
    - `type` 'SystemAssigned' | 'UserAssigned' | 'SystemAssigned, UserAssigned' | 'None' — The identity type.
    - `userAssignedIdentities` object — The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/ providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
  - `tags` object — The tags for the container registry.
  - `sku` Sku — The SKU of a container registry.
    - `name` 'Classic' | 'Basic' | 'Standard' | 'Premium', required — The SKU name of the container registry. Required for registry creation.
    - `tier` 'Classic' | 'Basic' | 'Standard' | 'Premium' — The SKU tier based on the SKU name.
  - `properties` RegistryPropertiesUpdateParameters — The parameters for updating the properties of a container registry.
    - `adminUserEnabled` boolean — The value that indicates whether the admin user is enabled.
    - `networkRuleSet` NetworkRuleSet — The network rule set for a container registry.
      - `defaultAction` 'Allow' | 'Deny', required — The default action of allow or deny when no other rules match.
      - `virtualNetworkRules` VirtualNetworkRule[] — The virtual network rules.
        - `action` 'Allow' — The action of virtual network rule.
        - `virtualNetworkSubnetResourceId` string, arm-id, required — Resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}.
      - `ipRules` IPRule[] — The IP ACL rules.
        - `action` 'Allow' — The action of IP ACL rule.
        - `value` string, required — Specifies the IP or IP range in CIDR format. Only IPV4 address is allowed.
    - `policies` Policies — The policies for a container registry.
      - `quarantinePolicy` QuarantinePolicy — The quarantine policy for a container registry.
        - `status` 'enabled' | 'disabled' — The value that indicates whether the policy is enabled or not.
      - `trustPolicy` TrustPolicy — The content trust policy for a container registry.
        - `type` 'Notary' — The type of trust policy.
        - `status` 'enabled' | 'disabled' — The value that indicates whether the policy is enabled or not.
      - `retentionPolicy` RetentionPolicy — The retention policy for a container registry.
        - `days` integer — The number of days to retain an untagged manifest after which it gets purged.
        - `lastUpdatedTime` string, date-time — The timestamp when the policy was last updated.
        - `status` 'enabled' | 'disabled' — The value that indicates whether the policy is enabled or not.
      - `exportPolicy` ExportPolicy — The export policy for a container registry.
        - `status` 'enabled' | 'disabled' — The value that indicates whether the policy is enabled or not.
      - `azureADAuthenticationAsArmPolicy` AzureADAuthenticationAsArmPolicy — The policy for using Azure Resource Manager audience token for a container registry.
        - `status` 'enabled' | 'disabled' — The value that indicates whether the policy is enabled or not.
      - `softDeletePolicy` SoftDeletePolicy — The soft delete policy for a container registry
        - `retentionDays` integer — The number of days after which a soft-deleted item is permanently deleted.
        - `lastUpdatedTime` string, date-time — The timestamp when the policy was last updated.
        - `status` 'enabled' | 'disabled' — The value that indicates whether the policy is enabled or not.
    - `encryption` EncryptionProperty
      - `status` 'enabled' | 'disabled' — Indicates whether or not the encryption is enabled for container registry.
      - `keyVaultProperties` KeyVaultProperties
        - `keyIdentifier` string — Key vault uri to access the encryption key.
        - `versionedKeyIdentifier` string — The fully qualified key identifier that includes the version of the key that is actually used for encryption.
        - `identity` string — The client id of the identity which will be used to access key vault.
        - `keyRotationEnabled` boolean — Auto key rotation status for a CMK enabled registry.
        - `lastKeyRotationTimestamp` string, date-time — Timestamp of the last successful key rotation.
    - `dataEndpointEnabled` boolean — Enable a single data endpoint per region for serving data.
    - `regionalEndpoints` 'Enabled' | 'Disabled' — Whether or not per-region endpoints are enabled for accessing the registry.
    - `endpointProtocol` 'IPv4' | 'IPv4AndIPv6' — The connectivity protocol for the registry.
    - `publicNetworkAccess` 'Enabled' | 'Disabled' — Whether or not public network access is allowed for the container registry.
    - `networkRuleBypassOptions` 'AzureServices' | 'None' — Whether to allow trusted Azure services to access a network restricted registry.
    - `networkRuleBypassAllowedForTasks` boolean — Whether to allow ACR Tasks service to access a network restricted registry.
    - `anonymousPullEnabled` boolean — Enables registry-wide pull from unauthenticated clients.
    - `metadataSearch` 'Enabled' | 'Disabled' — Determines whether registry artifacts are indexed for metadata search.
    - `writableCacheRepos` 'Enabled' | 'Disabled' — Whether to allow cache operations that write to repositories in this registry.
    - `roleAssignmentMode` 'AbacRepositoryPermissions' | 'LegacyRegistryPermissions' — Determines registry role assignment mode.

## Response `200`

Azure operation completed successfully.

- Registry — unresolved $ref

## Other responses

- `201` — Resource 'Registry' create operation succeeded
- `default` — An unexpected error response.

---

[API](https://skmtc.net/azure/apis/containerregistry-microsoft-containerregistry-registry.md) · [All operations](https://skmtc.net/azure/apis/containerregistry-microsoft-containerregistry-registry/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/containerregistry-microsoft-containerregistry-registry/revisions/32d4ccbab0a7/schema)
