Share via


Iot Connectors - Create Or Update

Creates or updates an IoT Connector resource with the specified parameters.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/workspaces/{workspaceName}/iotconnectors/{iotConnectorName}?api-version=2022-06-01

URI Parameters

Name In Required Type Description
iotConnectorName
path True

string

minLength: 3
maxLength: 24

The name of IoT Connector resource.

resourceGroupName
path True

string

minLength: 1
maxLength: 90
pattern: ^[-\w\._\(\)]+$

The name of the resource group that contains the service instance.

subscriptionId
path True

string

The subscription identifier.

workspaceName
path True

string

minLength: 3
maxLength: 24

The name of workspace resource.

api-version
query True

string

Client Api Version.

Request Body

Name Type Description
etag

string

An etag associated with the resource, used for optimistic concurrency when editing it.

identity

Identity

Setting indicating whether the service has a managed identity associated with it.

location

string

The resource location.

properties.deviceMapping

IotMappingProperties

Device Mappings.

properties.ingestionEndpointConfiguration

IotEventHubIngestionEndpointConfiguration

Source configuration.

tags

object

Resource tags.

Responses

Name Type Description
200 OK

IotConnector

Updated - Put request accepted and an existing resource is updated.

201 Created

IotConnector

Created - Put request accepted and an existing resource is being created asynchronously.

202 Accepted

IotConnector

Accepted - Put request accepted and an existing resource is being updated asynchronously.

Other Status Codes

ErrorDetails

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

Create an IoT Connector

Sample request

PUT https://management.azure.com/subscriptions/subid/resourceGroups/testRG/providers/Microsoft.HealthcareApis/workspaces/workspace1/iotconnectors/blue?api-version=2022-06-01

{
  "location": "westus",
  "tags": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "identity": {
    "type": "SystemAssigned"
  },
  "properties": {
    "ingestionEndpointConfiguration": {
      "eventHubName": "MyEventHubName",
      "consumerGroup": "ConsumerGroupA",
      "fullyQualifiedEventHubNamespace": "myeventhub.servicesbus.windows.net"
    },
    "deviceMapping": {
      "content": {
        "templateType": "CollectionContent",
        "template": [
          {
            "templateType": "JsonPathContent",
            "template": {
              "typeName": "heartrate",
              "typeMatchExpression": "$..[?(@heartrate)]",
              "deviceIdExpression": "$.deviceid",
              "timestampExpression": "$.measurementdatetime",
              "values": [
                {
                  "required": "true",
                  "valueExpression": "$.heartrate",
                  "valueName": "hr"
                }
              ]
            }
          }
        ]
      }
    }
  }
}

Sample response

{
  "name": "blue",
  "id": "/subscriptions/subid/resourceGroups/testRG/providers/Microsoft.HealthcareApis/workspaces/workspace1/iotconnectors/blue",
  "type": "Microsoft.HealthcareApis/workspaces/iotconnectors",
  "location": "westus",
  "etag": "00000000-0000-0000-f5ac-912ca49e01d6",
  "tags": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "identity": {
    "type": "SystemAssigned"
  },
  "properties": {
    "provisioningState": "Succeeded",
    "ingestionEndpointConfiguration": {
      "eventHubName": "MyEventHubName",
      "consumerGroup": "ConsumerGroupA",
      "fullyQualifiedEventHubNamespace": "myeventhub.servicesbus.windows.net"
    },
    "deviceMapping": {
      "content": {
        "templateType": "CollectionContent",
        "template": [
          {
            "templateType": "JsonPathContent",
            "template": {
              "typeName": "heartrate",
              "typeMatchExpression": "$..[?(@heartrate)]",
              "deviceIdExpression": "$.deviceid",
              "timestampExpression": "$.measurementdatetime",
              "values": [
                {
                  "required": "true",
                  "valueExpression": "$.heartrate",
                  "valueName": "hr"
                }
              ]
            }
          }
        ]
      }
    }
  },
  "systemData": {
    "createdBy": "string",
    "createdAt": "2021-01-28T19:26:24.072Z",
    "lastModifiedBy": "string",
    "lastModifiedAt": "2021-01-28T19:26:24.072Z"
  }
}
{
  "name": "blue",
  "id": "/subscriptions/subid/resourceGroups/testRG/providers/Microsoft.HealthcareApis/workspaces/workspace1/iotconnectors/blue",
  "type": "Microsoft.HealthcareApis/workspaces/iotconnectors",
  "location": "westus",
  "etag": "00000000-0000-0000-f5ac-912ca49e01d6",
  "tags": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "identity": {
    "type": "SystemAssigned"
  },
  "properties": {
    "provisioningState": "Creating",
    "ingestionEndpointConfiguration": {
      "eventHubName": "MyEventHubName",
      "consumerGroup": "ConsumerGroupA",
      "fullyQualifiedEventHubNamespace": "myeventhub.servicesbus.windows.net"
    },
    "deviceMapping": {
      "content": {
        "templateType": "CollectionContent",
        "template": [
          {
            "templateType": "JsonPathContent",
            "template": {
              "typeName": "heartrate",
              "typeMatchExpression": "$..[?(@heartrate)]",
              "deviceIdExpression": "$.deviceid",
              "timestampExpression": "$.measurementdatetime",
              "values": [
                {
                  "required": "true",
                  "valueExpression": "$.heartrate",
                  "valueName": "hr"
                }
              ]
            }
          }
        ]
      }
    }
  },
  "systemData": {
    "createdBy": "string",
    "createdAt": "2021-01-28T19:26:24.072Z",
    "lastModifiedBy": "string",
    "lastModifiedAt": "2021-01-28T19:26:24.072Z"
  }
}
{
  "name": "blue",
  "id": "/subscriptions/subid/resourceGroups/testRG/providers/Microsoft.HealthcareApis/workspaces/workspace1/iotconnectors/blue",
  "type": "Microsoft.HealthcareApis/workspaces/iotconnectors",
  "location": "westus",
  "etag": "00000000-0000-0000-f5ac-912ca49e01d6",
  "tags": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "identity": {
    "type": "SystemAssigned"
  },
  "properties": {
    "provisioningState": "Accepted",
    "ingestionEndpointConfiguration": {
      "eventHubName": "MyEventHubName",
      "consumerGroup": "ConsumerGroupA",
      "fullyQualifiedEventHubNamespace": "myeventhub.servicesbus.windows.net"
    },
    "deviceMapping": {
      "content": {
        "templateType": "CollectionContent",
        "template": [
          {
            "templateType": "JsonPathContent",
            "template": {
              "typeName": "heartrate",
              "typeMatchExpression": "$..[?(@heartrate)]",
              "deviceIdExpression": "$.deviceid",
              "timestampExpression": "$.measurementdatetime",
              "values": [
                {
                  "required": "true",
                  "valueExpression": "$.heartrate",
                  "valueName": "hr"
                }
              ]
            }
          }
        ]
      }
    }
  },
  "systemData": {
    "createdBy": "string",
    "createdAt": "2021-01-28T19:26:24.072Z",
    "lastModifiedBy": "string",
    "lastModifiedAt": "2021-01-28T19:26:24.072Z"
  }
}

Definitions

Name Description
createdByType

The type of identity that created the resource.

ErrorDetails

Error details.

ErrorDetailsInternal

Error details.

Identity

Setting indicating whether the service has a managed identity associated with it.

IotConnector

IoT Connector definition.

IotEventHubIngestionEndpointConfiguration

Event Hub ingestion endpoint configuration

IotMappingProperties

The mapping content.

provisioningState

The provisioning state.

ServiceManagedIdentityType

Type of identity being specified, currently SystemAssigned and None are allowed.

systemData

Metadata pertaining to creation and last modification of the resource.

UserAssignedIdentity

User assigned identity properties

createdByType

The type of identity that created the resource.

Value Description
User
Application
ManagedIdentity
Key

ErrorDetails

Error details.

Name Type Description
error

ErrorDetailsInternal

Error details

ErrorDetailsInternal

Error details.

Name Type Description
code

string

The error code.

message

string

The error message.

target

string

The target of the particular error.

Identity

Setting indicating whether the service has a managed identity associated with it.

Name Type Description
principalId

string (uuid)

The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity.

tenantId

string (uuid)

The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.

type

ServiceManagedIdentityType

Type of identity being specified, currently SystemAssigned and None are allowed.

userAssignedIdentities

<string,  UserAssignedIdentity>

User-Assigned Identities
The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests.

IotConnector

IoT Connector definition.

Name Type Description
etag

string

An etag associated with the resource, used for optimistic concurrency when editing it.

id

string

The resource identifier.

identity

Identity

Setting indicating whether the service has a managed identity associated with it.

location

string

The resource location.

name

string

pattern: ^[a-z0-9][a-z0-9-]{1,21}[a-z0-9]$

The resource name.

properties.deviceMapping

IotMappingProperties

Device Mappings.

properties.ingestionEndpointConfiguration

IotEventHubIngestionEndpointConfiguration

Source configuration.

properties.provisioningState

provisioningState

The provisioning state.

systemData

systemData

Metadata pertaining to creation and last modification of the resource.

tags

object

Resource tags.

type

string

The resource type.

IotEventHubIngestionEndpointConfiguration

Event Hub ingestion endpoint configuration

Name Type Description
consumerGroup

string

Consumer group of the event hub to connected to.

eventHubName

string

Event Hub name to connect to.

fullyQualifiedEventHubNamespace

string

Fully qualified namespace of the Event Hub to connect to.

IotMappingProperties

The mapping content.

Name Type Description
content

object

The mapping.

provisioningState

The provisioning state.

Value Description
Deleting
Succeeded
Creating
Accepted
Verifying
Updating
Failed
Canceled
Deprovisioned
Moving
Suspended
Warned
SystemMaintenance

ServiceManagedIdentityType

Type of identity being specified, currently SystemAssigned and None are allowed.

Value Description
None
SystemAssigned
UserAssigned
SystemAssigned,UserAssigned

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string (date-time)

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string (date-time)

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.

UserAssignedIdentity

User assigned identity properties

Name Type Description
clientId

string (uuid)

The client ID of the assigned identity.

principalId

string (uuid)

The principal ID of the assigned identity.