---
title: "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}"
method: PATCH
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}"
tags: ["DigitalTwinsInstance"]
---

# PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}

`PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}`

## Request

- Base URL: `https://management.azure.com`
- URL: `https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}`
- Auth: OAuth 2
  - Implicit: `https://login.microsoftonline.com/common/oauth2/authorize`
  - Scopes: `user_impersonation`

Update metadata of DigitalTwinsInstance.

## Path parameters

- `subscriptionId` string, required
- `resourceGroupName` string, required
- `resourceName` string, required

## Query parameters

- `api-version` string, required

## Request body

- DigitalTwinsPatchDescription: The description of the DigitalTwins service.
  - `tags` object, nullable: Instance patch properties
  - `identity` DigitalTwinsIdentity: The managed identity for the DigitalTwinsInstance.
    - `type` 'None' | 'SystemAssigned' | 'UserAssigned' | 'SystemAssigned,UserAssigned': The type of Managed Identity used by the DigitalTwinsInstance.
    - `principalId` string, nullable: The object id of the Managed Identity Resource. This will be sent to the RP from ARM via the x-ms-identity-principal-id header in the PUT request if the resource has a systemAssigned(implicit) identity
    - `tenantId` string, nullable: The tenant id of the Managed Identity Resource. This will be sent to the RP from ARM via the x-ms-client-tenant-id header in the PUT request if the resource has a systemAssigned(implicit) identity
    - `userAssignedIdentities` object, nullable: 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}'. .
  - `properties` DigitalTwinsPatchProperties: The properties of a DigitalTwinsInstance.
    - `publicNetworkAccess` 'Enabled' | 'Disabled', nullable: Public network access for the DigitalTwinsInstance.

## Response `200`

This is returned as a response to the status polling request for the create or update operation. The body contains the resource representation that indicates a transitional provisioning state.

- DigitalTwinsDescription: The description of the DigitalTwins service.
  - `id` string: The resource identifier.
  - `name` string: The resource name.
  - `type` string: The resource type.
  - `location` string, required: The resource location.
  - `tags` object, nullable: The resource tags.
  - `identity` DigitalTwinsIdentity: The managed identity for the DigitalTwinsInstance.
    - `type` 'None' | 'SystemAssigned' | 'UserAssigned' | 'SystemAssigned,UserAssigned': The type of Managed Identity used by the DigitalTwinsInstance.
    - `principalId` string, nullable: The object id of the Managed Identity Resource. This will be sent to the RP from ARM via the x-ms-identity-principal-id header in the PUT request if the resource has a systemAssigned(implicit) identity
    - `tenantId` string, nullable: The tenant id of the Managed Identity Resource. This will be sent to the RP from ARM via the x-ms-client-tenant-id header in the PUT request if the resource has a systemAssigned(implicit) identity
    - `userAssignedIdentities` object, nullable: 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}'. .
  - `systemData` SystemData: Metadata pertaining to creation and last modification of the resource.
    - `createdBy` string, nullable: The identity that created the resource.
    - `createdByType` 'User' | 'Application' | 'ManagedIdentity' | 'Key', nullable: The type of identity that created the resource.
    - `createdAt` string, date-time, nullable: The timestamp of resource creation (UTC).
    - `lastModifiedBy` string, nullable: The identity that last modified the resource.
    - `lastModifiedByType` 'User' | 'Application' | 'ManagedIdentity' | 'Key', nullable: The type of identity that last modified the resource.
    - `lastModifiedAt` string, date-time, nullable: The timestamp of resource last modification (UTC)
  - `properties` DigitalTwinsProperties: The properties of a DigitalTwinsInstance.
    - `createdTime` string, date-time: Time when DigitalTwinsInstance was created.
    - `lastUpdatedTime` string, date-time: Time when DigitalTwinsInstance was updated.
    - `provisioningState` 'Provisioning' | 'Deleting' | 'Updating' | 'Succeeded' | 'Failed' | 'Canceled' | 'Deleted' | 'Warning' | 'Suspending' | 'Restoring' | 'Moving': The provisioning state.
    - `hostName` string, nullable: Api endpoint to work with DigitalTwinsInstance.
    - `privateEndpointConnections` PrivateEndpointConnection[], nullable: The private endpoint connections.
      - `id` string: The resource identifier.
      - `name` string: The resource name.
      - `type` string: The resource type.
      - `properties` ConnectionProperties, required: The properties of a private endpoint connection.
        - `provisioningState` 'Pending' | 'Approved' | 'Rejected' | 'Disconnected', nullable: The provisioning state.
        - `privateEndpoint` PrivateEndpoint: The private endpoint property of a private endpoint connection.
          - `id` string: The resource identifier.
        - `groupIds` GroupId[]: The list of group ids for the private endpoint connection.
        - `privateLinkServiceConnectionState` ConnectionState: The connection state.
          - `status` 'Pending' | 'Approved' | 'Rejected' | 'Disconnected', required: The status of a private endpoint connection.
          - `description` string, required: The description for the current state of a private endpoint connection.
          - `actionsRequired` string: Actions required for a private endpoint connection.
      - `systemData` SystemData: Metadata pertaining to creation and last modification of the resource.
        - `createdBy` string, nullable: The identity that created the resource.
        - `createdByType` 'User' | 'Application' | 'ManagedIdentity' | 'Key', nullable: The type of identity that created the resource.
        - `createdAt` string, date-time, nullable: The timestamp of resource creation (UTC).
        - `lastModifiedBy` string, nullable: The identity that last modified the resource.
        - `lastModifiedByType` 'User' | 'Application' | 'ManagedIdentity' | 'Key', nullable: The type of identity that last modified the resource.
        - `lastModifiedAt` string, date-time, nullable: The timestamp of resource last modification (UTC)
    - `publicNetworkAccess` 'Enabled' | 'Disabled', nullable: Public network access for the DigitalTwinsInstance.

## Other responses

- `202`: Accepted - Patch request accepted; the operation will complete asynchronously.
- `default`: Error response describing why the operation failed.

## Changes

- **2026-07-13** (2020-03-01-preview) `9b59baae369b`: 1 info
  - added the success response with the status `201`
- **2026-07-13** (2020-03-01-preview) `4f433c479b00`: 1 breaking
  - removed the success response with the status `201`
- **2026-07-13** (2020-03-01-preview) `3e3cf22f8254`: 1 info
  - added the success response with the status `202`

[Operation history](https://skmtc.dev/azure/apis/digitaltwins-microsoft-digitaltwins-digitaltwins/changes/subscriptions/:subscriptionId/resourceGroups/:resourceGroupName/providers/Microsoft.DigitalTwins/digitalTwinsInstances/:resourceName/patch.md)

---

[API](https://skmtc.dev/azure/apis/digitaltwins-microsoft-digitaltwins-digitaltwins.md) - [All operations](https://skmtc.dev/azure/apis/digitaltwins-microsoft-digitaltwins-digitaltwins/llms.txt) - [OpenAPI document](https://skmtc.dev/azure/apis/digitaltwins-microsoft-digitaltwins-digitaltwins/revisions/0244c7a17143?raw)
