Endpoints - DigitalTwinsEndpoint CreateOrUpdate
Create or update DigitalTwinsInstance endpoint.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}/endpoints/{endpointName}?api-version=2020-12-01
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
endpoint
|
path | True |
|
Name of Endpoint Resource. Regex pattern: |
|
resource
|
path | True |
|
The name of the resource group that contains the DigitalTwinsInstance. |
|
resource
|
path | True |
|
The name of the DigitalTwinsInstance. Regex pattern: |
|
subscription
|
path | True |
|
The subscription identifier. |
|
api-version
|
query | True |
|
Version of the DigitalTwinsInstance Management API. |
Request Body
| Name | Required | Type | Description |
|---|---|---|---|
| properties | True | DigitalTwinsEndpointResourceProperties: |
DigitalTwinsInstance endpoint resource properties. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
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. |
|
| 201 Created |
Created - Put request accepted; the operation will complete asynchronously. |
|
| Other Status Codes |
Error response describing why the operation failed. |
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
| Name | Description |
|---|---|
| user_impersonation | impersonate your user account |
Examples
|
Put a Digital |
|
Put a Digital |
Put a DigitalTwinsInstance resource
Sample Request
PUT https://management.azure.com/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourceGroups/resRg/providers/Microsoft.DigitalTwins/digitalTwinsInstances/myDigitalTwinsService/endpoints/myServiceBus?api-version=2020-12-01
{
"properties": {
"endpointType": "ServiceBus",
"authenticationType": "KeyBased",
"primaryConnectionString": "Endpoint=sb://mysb.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=xyzxyzoX4=;EntityPath=abcabc",
"secondaryConnectionString": "Endpoint=sb://mysb.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=xyzxyzoX4=;EntityPath=abcabc"
}
}
Sample Response
{
"id": "/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourcegroups/resRg/providers/Microsoft.DigitalTwins/digitalTwinsInstances/myDigitalTwinsService/endpoints/myServiceBus",
"type": "Microsoft.DigitalTwins/digitalTwinsInstances/endpoints",
"name": "myServiceBus",
"properties": {
"endpointType": "ServiceBus",
"authenticationType": "KeyBased",
"provisioningState": "Succeeded",
"primaryConnectionString": "Endpoint=sb://***/;SharedAccessKeyName=***;SharedAccessKey=***;EntityPath=***",
"secondaryConnectionString": "Endpoint=sb://***/;SharedAccessKeyName=***;SharedAccessKey=***;EntityPath=***",
"createdTime": "2019-11-19T01:10:34.350Z"
}
}
{
"id": "/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourcegroups/resRg/providers/Microsoft.DigitalTwins/digitalTwinsInstances/myDigitalTwinsService/endpoints/myServiceBus",
"type": "Microsoft.DigitalTwins/digitalTwinsInstances/endpoints",
"name": "myServiceBus",
"properties": {
"endpointType": "ServiceBus",
"authenticationType": "KeyBased",
"provisioningState": "Provisioning",
"primaryConnectionString": "",
"secondaryConnectionString": "",
"createdTime": "2019-11-19T01:10:34.350Z"
}
}
Put a DigitalTwinsInstance resource with identity
Sample Request
PUT https://management.azure.com/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourceGroups/resRg/providers/Microsoft.DigitalTwins/digitalTwinsInstances/myDigitalTwinsService/endpoints/myServiceBus?api-version=2020-12-01
{
"properties": {
"endpointType": "ServiceBus",
"authenticationType": "IdentityBased",
"endpointUri": "sb://mysb.servicebus.windows.net/",
"entityPath": "mysbtopic"
}
}
Sample Response
{
"id": "/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourcegroups/resRg/providers/Microsoft.DigitalTwins/digitalTwinsInstances/myDigitalTwinsService/endpoints/myServiceBus",
"type": "Microsoft.DigitalTwins/digitalTwinsInstances/endpoints",
"name": "myServiceBus",
"properties": {
"endpointType": "ServiceBus",
"provisioningState": "Provisioning",
"authenticationType": "IdentityBased",
"endpointUri": "sb://mysb.servicebus.windows.net/",
"entityPath": "mysbtopic",
"createdTime": "2019-11-19T01:10:34.350Z"
}
}
{
"id": "/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourcegroups/resRg/providers/Microsoft.DigitalTwins/digitalTwinsInstances/myDigitalTwinsService/endpoints/myServiceBus",
"type": "Microsoft.DigitalTwins/digitalTwinsInstances/endpoints",
"name": "myServiceBus",
"properties": {
"endpointType": "ServiceBus",
"provisioningState": "Provisioning",
"authenticationType": "IdentityBased",
"endpointUri": "sb://mysb.servicebus.windows.net/",
"entityPath": "mysbtopic",
"createdTime": "2019-11-19T01:10:34.350Z"
}
}
Definitions
|
Authentication |
Specifies the authentication type being used for connecting to the endpoint. |
|
Digital |
DigitalTwinsInstance endpoint resource. |
|
Endpoint |
The provisioning state. |
|
Error |
Error definition. |
|
Error |
Error response. |
|
Event |
Properties related to EventGrid. |
|
Event |
Properties related to EventHub. |
|
Service |
Properties related to ServiceBus. |
AuthenticationType
Specifies the authentication type being used for connecting to the endpoint.
| Name | Type | Description |
|---|---|---|
| IdentityBased |
|
|
| KeyBased |
|
DigitalTwinsEndpointResource
DigitalTwinsInstance endpoint resource.
| Name | Type | Description |
|---|---|---|
| id |
|
The resource identifier. |
| name |
|
Extension resource name. |
| properties | DigitalTwinsEndpointResourceProperties: |
DigitalTwinsInstance endpoint resource properties. |
| type |
|
The resource type. |
EndpointProvisioningState
The provisioning state.
| Name | Type | Description |
|---|---|---|
| Canceled |
|
|
| Deleted |
|
|
| Deleting |
|
|
| Disabled |
|
|
| Failed |
|
|
| Moving |
|
|
| Provisioning |
|
|
| Restoring |
|
|
| Succeeded |
|
|
| Suspending |
|
|
| Warning |
|
ErrorDefinition
Error definition.
| Name | Type | Description |
|---|---|---|
| code |
|
Service specific error code which serves as the substatus for the HTTP error code. |
| details |
Internal error details. |
|
| message |
|
Description of the error. |
ErrorResponse
Error response.
| Name | Type | Description |
|---|---|---|
| error |
Error description |
EventGrid
Properties related to EventGrid.
| Name | Type | Description |
|---|---|---|
| TopicEndpoint |
|
EventGrid Topic Endpoint |
| accessKey1 |
|
EventGrid secondary accesskey. Will be obfuscated during read. |
| accessKey2 |
|
EventGrid secondary accesskey. Will be obfuscated during read. |
| authenticationType |
Specifies the authentication type being used for connecting to the endpoint. |
|
| createdTime |
|
Time when the Endpoint was added to DigitalTwinsInstance. |
| deadLetterSecret |
|
Dead letter storage secret for key-based authentication. Will be obfuscated during read. |
| deadLetterUri |
|
Dead letter storage URL for identity-based authentication. |
| endpointType | string: |
The type of Digital Twins endpoint |
| provisioningState |
The provisioning state. |
EventHub
Properties related to EventHub.
| Name | Type | Description |
|---|---|---|
| authenticationType |
Specifies the authentication type being used for connecting to the endpoint. |
|
| connectionStringPrimaryKey |
|
PrimaryConnectionString of the endpoint for key-based authentication. Will be obfuscated during read. |
| connectionStringSecondaryKey |
|
SecondaryConnectionString of the endpoint for key-based authentication. Will be obfuscated during read. |
| createdTime |
|
Time when the Endpoint was added to DigitalTwinsInstance. |
| deadLetterSecret |
|
Dead letter storage secret for key-based authentication. Will be obfuscated during read. |
| deadLetterUri |
|
Dead letter storage URL for identity-based authentication. |
| endpointType | string: |
The type of Digital Twins endpoint |
| endpointUri |
|
The URL of the EventHub namespace for identity-based authentication. It must include the protocol sb:// |
| entityPath |
|
The EventHub name in the EventHub namespace for identity-based authentication. |
| provisioningState |
The provisioning state. |
ServiceBus
Properties related to ServiceBus.
| Name | Type | Description |
|---|---|---|
| authenticationType |
Specifies the authentication type being used for connecting to the endpoint. |
|
| createdTime |
|
Time when the Endpoint was added to DigitalTwinsInstance. |
| deadLetterSecret |
|
Dead letter storage secret for key-based authentication. Will be obfuscated during read. |
| deadLetterUri |
|
Dead letter storage URL for identity-based authentication. |
| endpointType | string: |
The type of Digital Twins endpoint |
| endpointUri |
|
The URL of the ServiceBus namespace for identity-based authentication. It must include the protocol sb:// |
| entityPath |
|
The ServiceBus Topic name for identity-based authentication |
| primaryConnectionString |
|
PrimaryConnectionString of the endpoint for key-based authentication. Will be obfuscated during read. |
| provisioningState |
The provisioning state. |
|
| secondaryConnectionString |
|
SecondaryConnectionString of the endpoint for key-based authentication. Will be obfuscated during read. |