Endpoints - DigitalTwinsEndpoint CreateOrUpdate

DigitalTwinsInstance végpont létrehozása vagy frissítése.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}/endpoints/{endpointName}?api-version=2023-01-31

URI-paraméterek

Name In Kötelező Típus Description
endpointName
path True

string

Végponterőforrás neve.

Regex pattern: ^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,49}[a-zA-Z0-9]$

resourceGroupName
path True

string

A DigitalTwinsInstance erőforráscsoport neve.

resourceName
path True

string

A DigitalTwinsInstance neve.

Regex pattern: ^(?!-)[A-Za-z0-9-]{3,63}(?<!-)$

subscriptionId
path True

string

Az előfizetés azonosítója.

api-version
query True

string

A DigitalTwinsInstance Management API verziója.

Kérelem törzse

Name Kötelező Típus Description
properties True DigitalTwinsEndpointResourceProperties:

DigitalTwinsInstance végponterőforrás-tulajdonságok.

Válaszok

Name Típus Description
200 OK

DigitalTwinsEndpointResource

Ez a létrehozási vagy frissítési művelet állapot lekérdezési kérésére adott válaszként jelenik meg. A törzs tartalmazza az átmeneti kiépítési állapotot jelző erőforrás-ábrázolást.

201 Created

DigitalTwinsEndpointResource

Létrehozva – Put request accepted; a művelet aszinkron módon fejeződik be.

Other Status Codes

ErrorResponse

Hibaválasz, amely leírja, hogy a művelet miért hiúsult meg.

Biztonság

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 A felhasználói fiók megszemélyesítése

Példák

Put a DigitalTwinsEndpoint resource
Put a DigitalTwinsEndpoint resource with identity
Put a DigitalTwinsEndpoint resource with user assigned identity

Put a DigitalTwinsEndpoint 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=2023-01-31

{
  "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",
  "systemData": {
    "createdBy": "user@example.com",
    "createdByType": "User",
    "createdAt": "2021-03-11T17:13:59.4037715Z",
    "lastModifiedBy": "user@example.com",
    "lastModifiedByType": "User",
    "lastModifiedAt": "2021-03-11T17:14:02.5281409Z"
  },
  "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"
  }
}
azure-asyncoperation: https://management.azure.com/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/providers/Microsoft.DigitalTwins/locations/westus2/operationStatuses/12345678-1234-1234-123456789012
location: https://management.azure.com/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/providers/Microsoft.DigitalTwins/locations/westus2/operationResults/12345678-1234-1234-123456789012
retry-after: 10
{
  "id": "/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourcegroups/resRg/providers/Microsoft.DigitalTwins/digitalTwinsInstances/myDigitalTwinsService/endpoints/myServiceBus",
  "type": "Microsoft.DigitalTwins/digitalTwinsInstances/endpoints",
  "name": "myServiceBus",
  "systemData": {
    "createdBy": "user@example.com",
    "createdByType": "User",
    "createdAt": "2021-03-11T17:13:59.4037715Z",
    "lastModifiedBy": "user@example.com",
    "lastModifiedByType": "User",
    "lastModifiedAt": "2021-03-11T17:14:02.5281409Z"
  },
  "properties": {
    "endpointType": "ServiceBus",
    "authenticationType": "KeyBased",
    "provisioningState": "Provisioning",
    "primaryConnectionString": "",
    "secondaryConnectionString": "",
    "createdTime": "2019-11-19T01:10:34.350Z"
  }
}

Put a DigitalTwinsEndpoint 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=2023-01-31

{
  "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",
  "systemData": {
    "createdBy": "user@example.com",
    "createdByType": "User",
    "createdAt": "2021-03-11T17:13:59.4037715Z",
    "lastModifiedBy": "user@example.com",
    "lastModifiedByType": "User",
    "lastModifiedAt": "2021-03-11T17:14:02.5281409Z"
  },
  "properties": {
    "endpointType": "ServiceBus",
    "provisioningState": "Provisioning",
    "authenticationType": "IdentityBased",
    "endpointUri": "sb://mysb.servicebus.windows.net/",
    "entityPath": "mysbtopic",
    "createdTime": "2019-11-19T01:10:34.350Z"
  }
}
azure-asyncoperation: https://management.azure.com/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/providers/Microsoft.DigitalTwins/locations/westus2/operationStatuses/12345678-1234-1234-123456789012
location: https://management.azure.com/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/providers/Microsoft.DigitalTwins/locations/westus2/operationResults/12345678-1234-1234-123456789012
retry-after: 10
{
  "id": "/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourcegroups/resRg/providers/Microsoft.DigitalTwins/digitalTwinsInstances/myDigitalTwinsService/endpoints/myServiceBus",
  "type": "Microsoft.DigitalTwins/digitalTwinsInstances/endpoints",
  "name": "myServiceBus",
  "systemData": {
    "createdBy": "user@example.com",
    "createdByType": "User",
    "createdAt": "2021-03-11T17:13:59.4037715Z",
    "lastModifiedBy": "user@example.com",
    "lastModifiedByType": "User",
    "lastModifiedAt": "2021-03-11T17:14:02.5281409Z"
  },
  "properties": {
    "endpointType": "ServiceBus",
    "provisioningState": "Provisioning",
    "authenticationType": "IdentityBased",
    "endpointUri": "sb://mysb.servicebus.windows.net/",
    "entityPath": "mysbtopic",
    "createdTime": "2019-11-19T01:10:34.350Z"
  }
}

Put a DigitalTwinsEndpoint resource with user assigned 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=2023-01-31

{
  "properties": {
    "endpointType": "ServiceBus",
    "authenticationType": "IdentityBased",
    "endpointUri": "sb://mysb.servicebus.windows.net/",
    "entityPath": "mysbtopic",
    "identity": {
      "type": "UserAssigned",
      "userAssignedIdentity": "/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity"
    }
  }
}

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",
  "systemData": {
    "createdBy": "user@example.com",
    "createdByType": "User",
    "createdAt": "2021-03-11T17:13:59.4037715Z",
    "lastModifiedBy": "user@example.com",
    "lastModifiedByType": "User",
    "lastModifiedAt": "2021-03-11T17:14:02.5281409Z"
  },
  "properties": {
    "endpointType": "ServiceBus",
    "provisioningState": "Provisioning",
    "authenticationType": "IdentityBased",
    "endpointUri": "sb://mysb.servicebus.windows.net/",
    "entityPath": "mysbtopic",
    "createdTime": "2019-11-19T01:10:34.350Z",
    "identity": {
      "type": "UserAssigned",
      "userAssignedIdentity": "/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity"
    }
  }
}
azure-asyncoperation: https://management.azure.com/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/providers/Microsoft.DigitalTwins/locations/westus2/operationStatuses/12345678-1234-1234-123456789012
location: https://management.azure.com/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/providers/Microsoft.DigitalTwins/locations/westus2/operationResults/12345678-1234-1234-123456789012
retry-after: 10
{
  "id": "/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourcegroups/resRg/providers/Microsoft.DigitalTwins/digitalTwinsInstances/myDigitalTwinsService/endpoints/myServiceBus",
  "type": "Microsoft.DigitalTwins/digitalTwinsInstances/endpoints",
  "name": "myServiceBus",
  "systemData": {
    "createdBy": "user@example.com",
    "createdByType": "User",
    "createdAt": "2021-03-11T17:13:59.4037715Z",
    "lastModifiedBy": "user@example.com",
    "lastModifiedByType": "User",
    "lastModifiedAt": "2021-03-11T17:14:02.5281409Z"
  },
  "properties": {
    "endpointType": "ServiceBus",
    "provisioningState": "Provisioning",
    "authenticationType": "IdentityBased",
    "endpointUri": "sb://mysb.servicebus.windows.net/",
    "entityPath": "mysbtopic",
    "createdTime": "2019-11-19T01:10:34.350Z",
    "identity": {
      "type": "UserAssigned",
      "userAssignedIdentity": "/subscriptions/50016170-c839-41ba-a724-51e9df440b9e/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity"
    }
  }
}

Definíciók

Name Description
AuthenticationType

Megadja a végponthoz való csatlakozáshoz használt hitelesítési típust. Alapértelmezés szerint a "KeyBased" értékre van kapcsolva. Ha a "KeyBased" beállítás van kiválasztva, meg kell adni egy kapcsolati sztring (legalább az elsődleges kapcsolati sztring). Ha az "IdentityBased" elem van kiválasztva, meg kell adni az endpointUri és az entityPath tulajdonságokat.

createdByType

Az erőforrást létrehozó identitás típusa.

DigitalTwinsEndpointResource

DigitalTwinsInstance végponterőforrás.

EndpointProvisioningState

A kiépítési állapot.

ErrorDefinition

Hibadefiníció.

ErrorResponse

Hibaválasz.

EventGrid

Az EventGridhez kapcsolódó tulajdonságok.

EventHub

Az EventHubhoz kapcsolódó tulajdonságok.

IdentityType

A használt felügyelt identitás típusa.

ManagedIdentityReference

A felügyelt identitás tulajdonságai.

ServiceBus

A ServiceBushoz kapcsolódó tulajdonságok.

SystemData

Az erőforrás létrehozásával és utolsó módosításával kapcsolatos metaadatok.

AuthenticationType

Megadja a végponthoz való csatlakozáshoz használt hitelesítési típust. Alapértelmezés szerint a "KeyBased" értékre van kapcsolva. Ha a "KeyBased" beállítás van kiválasztva, meg kell adni egy kapcsolati sztring (legalább az elsődleges kapcsolati sztring). Ha az "IdentityBased" elem van kiválasztva, meg kell adni az endpointUri és az entityPath tulajdonságokat.

Name Típus Description
IdentityBased

string

KeyBased

string

createdByType

Az erőforrást létrehozó identitás típusa.

Name Típus Description
Application

string

Key

string

ManagedIdentity

string

User

string

DigitalTwinsEndpointResource

DigitalTwinsInstance végponterőforrás.

Name Típus Description
id

string

Az erőforrás azonosítója.

name

string

Bővítmény erőforrásának neve.

properties DigitalTwinsEndpointResourceProperties:

DigitalTwinsInstance végponterőforrás-tulajdonságok.

systemData

SystemData

Az erőforrás létrehozásával és utolsó módosításával kapcsolatos metaadatok.

type

string

Az erőforrás típusa.

EndpointProvisioningState

A kiépítési állapot.

Name Típus Description
Canceled

string

Deleted

string

Deleting

string

Disabled

string

Failed

string

Moving

string

Provisioning

string

Restoring

string

Succeeded

string

Suspending

string

Updating

string

Warning

string

ErrorDefinition

Hibadefiníció.

Name Típus Description
code

string

Szolgáltatásspecifikus hibakód, amely a HTTP-hibakód alállapotaként szolgál.

details

ErrorDefinition[]

Belső hiba részletei.

message

string

A hiba leírása.

ErrorResponse

Hibaválasz.

Name Típus Description
error

ErrorDefinition

Hibaleírás

EventGrid

Az EventGridhez kapcsolódó tulajdonságok.

Name Típus Description
TopicEndpoint

string

EventGrid-témakör végpontja.

accessKey1

string

EventGrid másodlagos hozzáférési kulcs. El lesz rejtve az olvasás során.

accessKey2

string

EventGrid másodlagos hozzáférési kulcs. El lesz rejtve az olvasás során.

authenticationType

AuthenticationType

Megadja a végponthoz való csatlakozáshoz használt hitelesítési típust. Alapértelmezés szerint a "KeyBased" értékre van kapcsolva. Ha a "KeyBased" beállítás van kiválasztva, meg kell adni egy kapcsolati sztring (legalább az elsődleges kapcsolati sztring). Ha az "IdentityBased" elem van kiválasztva, meg kell adni az endpointUri és az entityPath tulajdonságokat.

createdTime

string

A végpont DigitalTwinsInstance-hez való hozzáadásának időpontja.

deadLetterSecret

string

A kulcsalapú hitelesítés kézbesíthetetlen levelek tárolására szolgáló titkos kód. El lesz rejtve az olvasás során.

deadLetterUri

string

Kézbesíthetetlen levelek tárolási URL-címe identitásalapú hitelesítéshez.

endpointType string:

EventGrid

A Digital Twins-végpont típusa

identity

ManagedIdentityReference

A végpont felügyelt identitástulajdonságai.

provisioningState

EndpointProvisioningState

A kiépítési állapot.

EventHub

Az EventHubhoz kapcsolódó tulajdonságok.

Name Típus Description
authenticationType

AuthenticationType

Megadja a végponthoz való csatlakozáshoz használt hitelesítési típust. Alapértelmezés szerint a "KeyBased" értékre van kapcsolva. Ha a "KeyBased" beállítás van kiválasztva, meg kell adni egy kapcsolati sztring (legalább az elsődleges kapcsolati sztring). Ha az "IdentityBased" elem van kiválasztva, meg kell adni az endpointUri és az entityPath tulajdonságokat.

connectionStringPrimaryKey

string

A kulcsalapú hitelesítés végpontjának PrimaryConnectionString parancsa. El lesz rejtve az olvasás során.

connectionStringSecondaryKey

string

A kulcsalapú hitelesítés végpontjának SecondaryConnectionString parancsa. El lesz rejtve az olvasás során.

createdTime

string

A végpont DigitalTwinsInstance-hez való hozzáadásának időpontja.

deadLetterSecret

string

A kulcsalapú hitelesítés kézbesíthetetlen levelek tárolására szolgáló titkos kód. El lesz rejtve az olvasás során.

deadLetterUri

string

Kézbesíthetetlen levelek tárolási URL-címe identitásalapú hitelesítéshez.

endpointType string:

EventHub

A Digital Twins-végpont típusa

endpointUri

string

Az EventHub-névtér URL-címe identitásalapú hitelesítéshez. Tartalmaznia kell a "sb://" protokollt.

entityPath

string

Az EventHub-névtérben található EventHub-név az identitásalapú hitelesítéshez.

identity

ManagedIdentityReference

A végpont felügyelt identitástulajdonságai.

provisioningState

EndpointProvisioningState

A kiépítési állapot.

IdentityType

A használt felügyelt identitás típusa.

Name Típus Description
SystemAssigned

string

UserAssigned

string

ManagedIdentityReference

A felügyelt identitás tulajdonságai.

Name Típus Description
type

IdentityType

A használt felügyelt identitás típusa.

userAssignedIdentity

string

A felhasználói identitás ARM-erőforrás-azonosítója, ha a felügyelt identitás típusa "UserAssigned".

ServiceBus

A ServiceBushoz kapcsolódó tulajdonságok.

Name Típus Description
authenticationType

AuthenticationType

Megadja a végponthoz való csatlakozáshoz használt hitelesítési típust. Alapértelmezés szerint a "KeyBased" értékre van kapcsolva. Ha a "KeyBased" beállítás van kiválasztva, meg kell adni egy kapcsolati sztring (legalább az elsődleges kapcsolati sztring). Ha az "IdentityBased" elem van kiválasztva, meg kell adni az endpointUri és az entityPath tulajdonságokat.

createdTime

string

A végpont DigitalTwinsInstance-hez való hozzáadásának időpontja.

deadLetterSecret

string

A kulcsalapú hitelesítés kézbesíthetetlen levelek tárolására szolgáló titkos kód. El lesz rejtve az olvasás során.

deadLetterUri

string

Kézbesíthetetlen levelek tárolási URL-címe identitásalapú hitelesítéshez.

endpointType string:

ServiceBus

A Digital Twins-végpont típusa

endpointUri

string

A ServiceBus-névtér URL-címe identitásalapú hitelesítéshez. Tartalmaznia kell a "sb://" protokollt.

entityPath

string

Az identitásalapú hitelesítés ServiceBus-témakörének neve.

identity

ManagedIdentityReference

A végpont felügyelt identitástulajdonságai.

primaryConnectionString

string

A kulcsalapú hitelesítés végpontjának PrimaryConnectionString parancsa. El lesz rejtve az olvasás során.

provisioningState

EndpointProvisioningState

A kiépítési állapot.

secondaryConnectionString

string

A kulcsalapú hitelesítés végpontjának SecondaryConnectionString parancsa. El lesz rejtve az olvasás során.

SystemData

Az erőforrás létrehozásával és utolsó módosításával kapcsolatos metaadatok.

Name Típus Description
createdAt

string

Az erőforrás-létrehozás időbélyege (UTC).

createdBy

string

Az erőforrást létrehozó identitás.

createdByType

createdByType

Az erőforrást létrehozó identitás típusa.

lastModifiedAt

string

Az erőforrás utolsó módosításának időbélyege (UTC)

lastModifiedBy

string

Az erőforrást utoljára módosító identitás.

lastModifiedByType

createdByType

Az erőforrást legutóbb módosító identitás típusa.