Update-AzDigitalTwinsInstance
This cmdlet is part of a Preview module. Preview versions aren't recommended for use in production environments. For more information, see https://aka.ms/azps-refstatus .
Update the metadata of a DigitalTwinsInstance.
The usual pattern to modify a property is to retrieve the DigitalTwinsInstance and security metadata, and then combine them with the modified values in a new body to update the DigitalTwinsInstance.
Syntax
UpdateExpanded (Default)
Update-AzDigitalTwinsInstance
-ResourceGroupName <String>
-ResourceName <String>
[-SubscriptionId <String>]
[-EnableSystemAssignedIdentity <Boolean>]
[-PrivateEndpointConnection <IPrivateEndpointConnection[]>]
[-PublicNetworkAccess <String>]
[-Tag <Hashtable>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
UpdateViaIdentityExpanded
Update-AzDigitalTwinsInstance
-InputObject <IDigitalTwinsIdentity>
[-EnableSystemAssignedIdentity <Boolean>]
[-PrivateEndpointConnection <IPrivateEndpointConnection[]>]
[-PublicNetworkAccess <String>]
[-Tag <Hashtable>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Update the metadata of a DigitalTwinsInstance.
The usual pattern to modify a property is to retrieve the DigitalTwinsInstance and security metadata, and then combine them with the modified values in a new body to update the DigitalTwinsInstance.
Examples
Update-AzDigitalTwinsInstance -ResourceGroupName azps_test_group -ResourceName azps-digitaltwins-instance -Tag @{"abc"="123"}
CreatedTime : 2025-06-06 09:44:17 AM
HostName : azps-digitaltwins-instance.api.eus.digitaltwins.azure.net
Id : /subscriptions/{subId}/resourceGroups/azps_test_group/providers/Microsoft.DigitalTwins/digitalTwinsInstances/azps-digitaltwins-instance
IdentityPrincipalId : 6463ae74-a748-4f95-acf9-7d76e1d343b3
IdentityTenantId : 213e87ed-8e08-4eb4-a63c-c073058f7b00
IdentityType : SystemAssigned
LastUpdatedTime : 2025-06-06 11:27:24 AM
Location : eastus
Name : azps-digitaltwins-instance
PrivateEndpointConnection : {}
ProvisioningState : Succeeded
PublicNetworkAccess : Enabled
ResourceGroupName : azps_test_group
SystemDataCreatedAt : 2025-06-06 09:44:15 AM
SystemDataCreatedBy : xxxxx.xxxxx@microsoft.com
SystemDataCreatedByType : User
SystemDataLastModifiedAt : 2025-06-06 11:27:22 AM
SystemDataLastModifiedBy : xxxxx.xxxxx@microsoft.com
SystemDataLastModifiedByType : User
Tag : {
"abc": "123"
}
Type : Microsoft.DigitalTwins/digitalTwinsInstances
Update metadata of DigitalTwinsInstance.
Example 2: Update the AzDigitalTwinsInstance by another AzDigitalTwinsInstance.
Get-AzDigitalTwinsInstance -ResourceGroupName azps_test_group -ResourceName azps-digitaltwins-instance | Update-AzDigitalTwinsInstance -Tag @{"1234"="abcd"}
CreatedTime : 2025-06-06 09:44:17 AM
HostName : azps-digitaltwins-instance.api.eus.digitaltwins.azure.net
Id : /subscriptions/{subId}/resourceGroups/azps_test_group/providers/Microsoft.DigitalTwins/digitalTwinsInstances/azps-digitaltwins-instance
IdentityPrincipalId : 6463ae74-a748-4f95-acf9-7d76e1d343b3
IdentityTenantId : 213e87ed-8e08-4eb4-a63c-c073058f7b00
IdentityType : SystemAssigned
LastUpdatedTime : 2025-06-06 11:29:03 AM
Location : eastus
Name : azps-digitaltwins-instance
PrivateEndpointConnection : {}
ProvisioningState : Succeeded
PublicNetworkAccess : Enabled
ResourceGroupName : azps_test_group
SystemDataCreatedAt : 2025-06-06 09:44:15 AM
SystemDataCreatedBy : xxxxx.xxxxx@microsoft.com
SystemDataCreatedByType : User
SystemDataLastModifiedAt : 2025-06-06 11:29:01 AM
SystemDataLastModifiedBy : xxxxx.xxxxx@microsoft.com
SystemDataLastModifiedByType : User
Tag : {
"1234": "abcd"
}
Type : Microsoft.DigitalTwins/digitalTwinsInstances
Update the AzDigitalTwinsInstance by another AzDigitalTwinsInstance.
Parameters
-AsJob
Run the command as a job
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: cf
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DefaultProfile
The DefaultProfile parameter is not functional.
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
Parameter properties
Type: PSObject
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzureRMContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-EnableSystemAssignedIdentity
Determines whether to enable a system-assigned identity for the resource.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
Identity Parameter
UpdateViaIdentityExpanded
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-NoWait
Run the command asynchronously
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-PrivateEndpointConnection
The private endpoint connections.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-PublicNetworkAccess
Public network access for the DigitalTwinsInstance.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceGroupName
The name of the resource group that contains the DigitalTwinsInstance.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
UpdateExpanded
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceName
The name of the DigitalTwinsInstance.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
UpdateExpanded
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SubscriptionId
The subscription identifier.
Parameter properties
Type: String
Default value: (Get-AzContext).Subscription.Id
Supports wildcards: False
DontShow: False
Parameter sets
UpdateExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Tag
The resource tags.
Parameter properties
Type: Hashtable
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: wi
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Outputs