swagger: '2.0' info: version: 2020-08-01-preview title: Microsoft Azure AccessControlClient AccessConnector POST API schemes: - https tags: - name: POST paths: /subscriptions/{subscriptionId}/providers/Microsoft.Devices/checkNameAvailability: post: tags: - POST summary: Microsoft Azure Check If An Iot Hub Name Is Available description: Check if an IoT hub name is available. operationId: microsoftAzureIothubresourceChecknameavailability x-ms-examples: IotHubResource_CheckNameAvailability: $ref: ./examples/checkNameAvailability.json parameters: - $ref: '#/parameters/api-version' - $ref: '#/parameters/subscriptionId' - name: operationInputs in: body description: Set the name parameter in the OperationInputs structure to the name of the IoT hub to check. required: true schema: $ref: '#/definitions/OperationInputs' responses: '200': description: This is a synchronous operation. The body contains a JSON-serialized response that specifies whether the IoT hub name is available. If the name is not available, the body contains the reason. schema: $ref: '#/definitions/IotHubNameAvailabilityInfo' default: description: DefaultErrorResponse schema: $ref: '#/definitions/ErrorDetails' deprecated: false ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{iotHubName}/routing/routes/$testall : post: tags: - POST operationId: microsoftAzureIothubresourceTestallroutes summary: Microsoft Azure Test All Routes description: Test all routes configured in this Iot Hub x-ms-examples: IotHubResource_TestAllRoutes: $ref: ./examples/iothub_testallroutes.json consumes: - application/json produces: - application/json parameters: - name: input description: Input for testing all routes in: body required: true schema: $ref: '#/definitions/TestAllRoutesInput' - name: iotHubName description: IotHub to be tested in: path required: true type: string - $ref: '#/parameters/subscriptionId' - name: resourceGroupName description: resource group which Iot Hub belongs to in: path required: true type: string - $ref: '#/parameters/api-version' responses: '200': description: OK schema: $ref: '#/definitions/TestAllRoutesResult' default: description: DefaultErrorResponse schema: $ref: '#/definitions/ErrorDetails' deprecated: false ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{iotHubName}/routing/routes/$testnew : post: tags: - POST operationId: microsoftAzureIothubresourceTestroute summary: Microsoft Azure Test The New Route description: Test the new route for this Iot Hub x-ms-examples: IotHubResource_TestRoute: $ref: ./examples/iothub_testnewroute.json consumes: - application/json produces: - application/json parameters: - name: input description: Route that needs to be tested in: body required: true schema: $ref: '#/definitions/TestRouteInput' - name: iotHubName description: IotHub to be tested in: path required: true type: string - $ref: '#/parameters/subscriptionId' - name: resourceGroupName description: resource group which Iot Hub belongs to in: path required: true type: string - $ref: '#/parameters/api-version' responses: '200': description: OK schema: $ref: '#/definitions/TestRouteResult' default: description: DefaultErrorResponse schema: $ref: '#/definitions/ErrorDetails' deprecated: false ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/listkeys : post: tags: - POST summary: 'Microsoft Azure Get The Security Metadata For An Iot Hub For More Information, See: Https: Docs Microsoft Com Azure Iot Hub Iot Hub Devguide Security' description: 'Get the security metadata for an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security.' operationId: microsoftAzureIothubresourceListkeys x-ms-examples: IotHubResource_ListKeys: $ref: ./examples/iothub_listkeys.json parameters: - $ref: '#/parameters/api-version' - $ref: '#/parameters/subscriptionId' - $ref: '#/parameters/resourceGroupName' - $ref: '#/parameters/resourceName' responses: '200': description: This is a synchronous operation. The body contains a JSON-serialized array of shared access policies, including keys, that you can use to access the IoT hub endpoints. schema: $ref: '#/definitions/SharedAccessSignatureAuthorizationRuleListResult' default: description: DefaultErrorResponse schema: $ref: '#/definitions/ErrorDetails' deprecated: false x-ms-pageable: nextLinkName: nextLink ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/IotHubKeys/{keyName}/listkeys : post: tags: - POST summary: 'Microsoft Azure Get A Shared Access Policy By Name From An Iot Hub For More Information, See: Https: Docs Microsoft Com Azure Iot Hub Iot Hub Devguide Security' description: 'Get a shared access policy by name from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security.' operationId: microsoftAzureIothubresourceGetkeysforkeyname x-ms-examples: IotHubResource_GetKeysForKeyName: $ref: ./examples/iothub_getkey.json parameters: - $ref: '#/parameters/api-version' - $ref: '#/parameters/subscriptionId' - $ref: '#/parameters/resourceGroupName' - $ref: '#/parameters/resourceName' - name: keyName in: path description: The name of the shared access policy. required: true type: string responses: '200': description: This is a synchronous operation. The body contains a JSON-serialized shared access policy, including keys, that you can use to access one or more IoT hub endpoints. schema: $ref: '#/definitions/SharedAccessSignatureAuthorizationRule' default: description: DefaultErrorResponse schema: $ref: '#/definitions/ErrorDetails' deprecated: false ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/exportDevices : post: tags: - POST summary: 'Microsoft Azure Exports All The Device Identities In The Iot Hub Identity Registry To An Azure Storage Blob Container For More Information, See: Https: Docs Microsoft Com Azure Iot Hub Iot Hub Devguide Identity Registry#import And Export Device Identities' description: 'Exports all the device identities in the IoT hub identity registry to an Azure Storage blob container. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities.' operationId: microsoftAzureIothubresourceExportdevices x-ms-examples: IotHubResource_ExportDevices: $ref: ./examples/iothub_exportdevices.json parameters: - $ref: '#/parameters/api-version' - $ref: '#/parameters/subscriptionId' - $ref: '#/parameters/resourceGroupName' - $ref: '#/parameters/resourceName' - name: exportDevicesParameters in: body description: The parameters that specify the export devices operation. required: true schema: $ref: '#/definitions/ExportDevicesRequest' responses: '200': description: OK schema: $ref: '#/definitions/JobResponse' default: description: DefaultErrorResponse schema: $ref: '#/definitions/ErrorDetails' deprecated: false ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/importDevices : post: tags: - POST summary: 'Microsoft Azure Import, Update, Or Delete Device Identities In The Iot Hub Identity Registry From A Blob For More Information, See: Https: Docs Microsoft Com Azure Iot Hub Iot Hub Devguide Identity Registry#import And Export Device Identities' description: 'Import, update, or delete device identities in the IoT hub identity registry from a blob. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities.' operationId: microsoftAzureIothubresourceImportdevices x-ms-examples: IotHubResource_ImportDevices: $ref: ./examples/iothub_importdevices.json parameters: - $ref: '#/parameters/api-version' - $ref: '#/parameters/subscriptionId' - $ref: '#/parameters/resourceGroupName' - $ref: '#/parameters/resourceName' - name: importDevicesParameters in: body description: The parameters that specify the import devices operation. required: true schema: $ref: '#/definitions/ImportDevicesRequest' responses: '200': description: OK schema: $ref: '#/definitions/JobResponse' default: description: DefaultErrorResponse schema: $ref: '#/definitions/ErrorDetails' deprecated: false ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{iotHubName}/failover : post: tags: - POST operationId: microsoftAzureIothubManualfailover summary: Microsoft Azure Manually Initiate A Failover For The Iot Hub To Its Secondary Region description: Manually initiate a failover for the IoT Hub to its secondary region. To learn more, see https://aka.ms/manualfailover x-ms-examples: IotHub_ManualFailover: $ref: ./examples/IotHub_ManualFailover.json consumes: - application/json produces: - application/json x-ms-long-running-operation: true parameters: - name: iotHubName description: Name of the IoT hub to failover in: path required: true type: string - name: failoverInput description: Region to failover to. Must be the Azure paired region. Get the value from the secondary location in the locations property. To learn more, see https://aka.ms/manualfailover/region in: body required: true schema: $ref: '#/definitions/FailoverInput' - $ref: '#/parameters/subscriptionId' - name: resourceGroupName description: Name of the resource group containing the IoT hub resource in: path required: true type: string - $ref: '#/parameters/api-version' responses: '200': description: Long running manual failover operation for the IoT hub completed '202': description: Manual failover initiated default: description: DefaultErrorResponse schema: $ref: '#/definitions/ErrorDetails' /enrollments/query: post: tags: - POST summary: Microsoft Azure Query The Device Enrollment Records operationId: microsoftAzureIndividualenrollmentQuery consumes: - application/json produces: - application/json parameters: - name: x-ms-max-item-count in: header description: Page size required: false type: integer format: int32 - name: x-ms-continuation in: header description: Continuation token required: false type: string - name: querySpecification in: body description: The query specification. required: true schema: $ref: '#/definitions/QuerySpecification' - $ref: '#/parameters/ApiVersionParameter' responses: '200': description: Success schema: type: array items: $ref: '#/definitions/IndividualEnrollment' headers: x-ms-continuation: description: The continuation token for getting the next page of results. type: string x-ms-max-item-count: description: The maximum number of items returned in a page. type: integer x-ms-item-type: description: The list of values returned from the query. type: string default: description: Error response schema: $ref: '#/definitions/ProvisioningServiceErrorDetails' headers: x-ms-error-code: description: The error code for specific error that occurred. type: string description: Needs a more full description created. /enrollments/{id}/attestationmechanism: post: tags: - POST summary: Microsoft Azure Get The Attestation Mechanism In The Device Enrollment Record operationId: microsoftAzureIndividualenrollmentGetattestationmechanism consumes: [] produces: - application/json parameters: - name: id in: path description: 'This id is used to uniquely identify a device registration of an enrollment. A case-insensitive string (up to 128 characters long) of alphanumeric characters plus certain special characters : . _ -. No special characters allowed at start or end.' required: true type: string - $ref: '#/parameters/ApiVersionParameter' responses: '200': description: Success schema: $ref: '#/definitions/AttestationMechanism' default: description: Error response schema: $ref: '#/definitions/ProvisioningServiceErrorDetails' headers: x-ms-error-code: description: The error code for specific error that occurred. type: string description: Needs a more full description created. /enrollments: post: tags: - POST summary: Microsoft Azure Bulk Device Enrollment Operation With Maximum Of 10 Enrollments operationId: microsoftAzureIndividualenrollmentRunbulkoperation consumes: - application/json produces: - application/json parameters: - name: bulkOperation in: body description: Bulk operation. required: true schema: $ref: '#/definitions/BulkEnrollmentOperation' - $ref: '#/parameters/ApiVersionParameter' responses: '200': description: Success schema: $ref: '#/definitions/BulkEnrollmentOperationResult' default: description: Error response schema: $ref: '#/definitions/ProvisioningServiceErrorDetails' headers: x-ms-error-code: description: The error code for specific error that occurred. type: string description: Needs a more full description created. /enrollmentGroups/query: post: tags: - POST summary: Microsoft Azure Query The Device Enrollment Groups operationId: microsoftAzureEnrollmentgroupQuery consumes: - application/json produces: - application/json parameters: - name: x-ms-max-item-count in: header description: Page size required: false type: integer format: int32 - name: x-ms-continuation in: header description: Continuation token required: false type: string - name: querySpecification in: body description: The query specification. required: true schema: $ref: '#/definitions/QuerySpecification' - $ref: '#/parameters/ApiVersionParameter' responses: '200': description: Success schema: type: array items: $ref: '#/definitions/EnrollmentGroup' headers: x-ms-continuation: description: The continuation token for getting the next page of results. type: string x-ms-max-item-count: description: The maximum number of items returned in a page. type: integer x-ms-item-type: description: The list of values returned from the query. type: string default: description: Error response schema: $ref: '#/definitions/ProvisioningServiceErrorDetails' headers: x-ms-error-code: description: The error code for specific error that occurred. type: string description: Needs a more full description created. /enrollmentGroups/{id}/attestationmechanism: post: tags: - POST summary: Microsoft Azure Get The Attestation Mechanism In The Device Enrollment Group Record operationId: microsoftAzureEnrollmentgroupGetattestationmechanism consumes: [] produces: - application/json parameters: - name: id in: path description: Enrollment group ID required: true type: string - $ref: '#/parameters/ApiVersionParameter' responses: '200': description: Success schema: $ref: '#/definitions/AttestationMechanism' default: description: Error response schema: $ref: '#/definitions/ProvisioningServiceErrorDetails' headers: x-ms-error-code: description: The error code for specific error that occurred. type: string description: Needs a more full description created. /enrollmentGroups: post: tags: - POST summary: Microsoft Azure Bulk Device Enrollment Group Operation With Maximum Of 10 Groups operationId: microsoftAzureEnrollmentgroupRunbulkoperation consumes: - application/json produces: - application/json parameters: - name: bulkOperation in: body description: Bulk operation. required: true schema: $ref: '#/definitions/BulkEnrollmentGroupOperation' - $ref: '#/parameters/ApiVersionParameter' responses: '200': description: Success schema: $ref: '#/definitions/BulkEnrollmentGroupOperationResult' default: description: Error response schema: $ref: '#/definitions/ProvisioningServiceErrorDetails' headers: x-ms-error-code: description: The error code for specific error that occurred. type: string description: Needs a more full description created. /registrations/{id}/query: post: tags: - POST summary: Microsoft Azure Gets The Registration State Of Devices In This Enrollmentgroup operationId: microsoftAzureDeviceregistrationstateQuery consumes: [] produces: - application/json parameters: - name: id in: path description: Enrollment group ID. required: true type: string - name: x-ms-max-item-count in: header description: pageSize required: false type: integer format: int32 - name: x-ms-continuation in: header description: continuation token required: false type: string - $ref: '#/parameters/ApiVersionParameter' responses: '200': description: Success schema: type: array items: $ref: '#/definitions/DeviceRegistrationState' headers: x-ms-continuation: description: The continuation token for getting the next page of results. type: string x-ms-max-item-count: description: The maximum number of items returned in a page. type: integer x-ms-item-type: description: The list of values returned from the query. type: string default: description: Error response schema: $ref: '#/definitions/ProvisioningServiceErrorDetails' headers: x-ms-error-code: description: The error code for specific error that occurred. type: string description: Needs a more full description created. definitions: RoutingMessage: description: Routing message type: object properties: body: description: Body of routing message type: string appProperties: description: App properties type: object additionalProperties: type: string systemProperties: description: System properties type: object additionalProperties: type: string X509CertificateWithInfo: description: Certificate and Certificate info type: object properties: certificate: type: string info: $ref: '#/definitions/X509CertificateInfo' ProvisioningServiceErrorDetails: description: Contains the properties of an error returned by the Azure IoT Hub Provisioning Service. type: object properties: errorCode: format: int32 type: integer trackingId: type: string message: type: string info: type: object additionalProperties: type: string timestampUtc: format: date-time type: string DeviceCapabilities: description: Device capabilities. required: - iotEdge type: object properties: iotEdge: description: If set to true, this device is an IoTEdge device. default: false type: boolean RouteErrorPosition: description: Position where the route error happened type: object properties: line: description: Line where the route error happened format: int32 type: integer column: description: Column where the route error happened format: int32 type: integer RouteCompilationError: description: Compilation error when evaluating route type: object properties: message: description: Route error message type: string severity: description: Severity of the route error enum: - error - warning type: string x-ms-enum: name: RouteErrorSeverity modelAsString: true location: description: Location where the route error happened $ref: '#/definitions/RouteErrorRange' IotHubNameAvailabilityInfo: description: The properties indicating whether a given IoT hub name is available. type: object properties: nameAvailable: description: The value which indicates whether the provided name is available. type: boolean readOnly: true reason: description: The reason for unavailability. enum: - Invalid - AlreadyExists type: string readOnly: true x-ms-enum: name: IotHubNameUnavailabilityReason modelAsString: false message: description: The detailed reason message. type: string ErrorDetails: description: Error details. type: object properties: code: description: The error code. type: string readOnly: true httpStatusCode: description: The HTTP status code. type: string readOnly: true message: description: The error message. type: string readOnly: true details: description: The error details. type: string readOnly: true TestRouteInput: required: - route description: Input for testing route type: object properties: message: description: Routing message $ref: '#/definitions/RoutingMessage' route: description: Route properties $ref: '#/definitions/RouteProperties' twin: description: Routing Twin Reference $ref: '#/definitions/RoutingTwin' SymmetricKeyAttestation: description: Attestation via SymmetricKey. type: object properties: primaryKey: description: Primary symmetric key. type: string secondaryKey: description: Secondary symmetric key. type: string X509CAReferences: description: Primary and secondary CA references. type: object properties: primary: type: string secondary: type: string InitialTwin: description: Initial device twin. Contains a subset of the properties of Twin. type: object properties: tags: $ref: '#/definitions/TwinCollection' description: Twin tags. properties: $ref: '#/definitions/InitialTwinProperties' description: Twin desired properties. SharedAccessSignatureAuthorizationRuleListResult: description: The list of shared access policies with a next link. type: object properties: value: description: The list of shared access policies. type: array items: $ref: '#/definitions/SharedAccessSignatureAuthorizationRule' nextLink: description: The next link. type: string readOnly: true IndividualEnrollment: description: The device enrollment record. required: - registrationId - attestation type: object properties: registrationId: description: "This id is used to uniquely identify a device registration of an enrollment.\r\nA case-insensitive string (up to 128 characters long) of alphanumeric characters plus certain special characters : . _ -. No special characters allowed at start or end." type: string deviceId: description: Desired IoT Hub device ID (optional). type: string registrationState: $ref: '#/definitions/DeviceRegistrationState' description: Current registration status. readOnly: true optionalDeviceInformation: $ref: '#/definitions/TwinCollection' description: Optional Device Information. attestation: $ref: '#/definitions/AttestationMechanism' description: Attestation method used by the device. capabilities: $ref: '#/definitions/DeviceCapabilities' description: Capabilities of the device. iotHubHostName: description: The Iot Hub host name. type: string initialTwin: $ref: '#/definitions/InitialTwin' description: Initial device twin. etag: description: The entity tag associated with the resource. type: string provisioningStatus: description: The provisioning status. default: enabled enum: - enabled - disabled type: string reprovisionPolicy: $ref: '#/definitions/ReprovisionPolicy' description: The behavior when a device is re-provisioned to an IoT hub. createdDateTimeUtc: format: date-time description: The DateTime this resource was created. type: string readOnly: true lastUpdatedDateTimeUtc: format: date-time description: The DateTime this resource was last updated. type: string readOnly: true allocationPolicy: description: 'The allocation policy of this resource. This policy overrides the tenant level allocation policy for this individual enrollment or enrollment group. Possible values include ''hashed'': Linked IoT hubs are equally likely to have devices provisioned to them, ''geoLatency'': Devices are provisioned to an IoT hub with the lowest latency to the device.If multiple linked IoT hubs would provide the same lowest latency, the provisioning service hashes devices across those hubs, ''static'' : Specification of the desired IoT hub in the enrollment list takes priority over the service-level allocation policy, ''custom'': Devices are provisioned to an IoT hub based on your own custom logic. The provisioning service passes information about the device to the logic, and the logic returns the desired IoT hub as well as the desired initial configuration. We recommend using Azure Functions to host your logic.' enum: - hashed - geoLatency - static - custom type: string iotHubs: description: The list of IoT Hub hostnames the device(s) in this resource can be allocated to. Must be a subset of tenant level list of IoT hubs. type: array items: type: string customAllocationDefinition: $ref: '#/definitions/CustomAllocationDefinition' description: This tells DPS which webhook to call when using custom allocation. ReprovisionPolicy: description: The behavior of the service when a device is re-provisioned to an IoT hub. required: - updateHubAssignment - migrateDeviceData type: object properties: updateHubAssignment: description: When set to true (default), the Device Provisioning Service will evaluate the device's IoT Hub assignment and update it if necessary for any provisioning requests beyond the first from a given device. If set to false, the device will stay assigned to its current IoT hub. default: true type: boolean migrateDeviceData: description: When set to true (default), the Device Provisioning Service will migrate the device's data (twin, device capabilities, and device ID) from one IoT hub to another during an IoT hub assignment update. If set to false, the Device Provisioning Service will reset the device's data to the initial desired configuration stored in the corresponding enrollment list. default: true type: boolean X509CertificateInfo: description: X509 certificate info. required: - subjectName - sha1Thumbprint - sha256Thumbprint - issuerName - notBeforeUtc - notAfterUtc - serialNumber - version type: object properties: subjectName: type: string sha1Thumbprint: type: string sha256Thumbprint: type: string issuerName: type: string notBeforeUtc: format: date-time type: string notAfterUtc: format: date-time type: string serialNumber: type: string version: format: int32 type: integer AttestationMechanism: description: Attestation mechanism for individualEnrollment as well as enrollmentGroup. required: - type type: object properties: type: description: Attestation Type. enum: - none - tpm - x509 - symmetricKey type: string tpm: $ref: '#/definitions/TpmAttestation' description: TPM attestation method. x509: $ref: '#/definitions/X509Attestation' description: X509 attestation method. symmetricKey: $ref: '#/definitions/SymmetricKeyAttestation' description: Symmetric Key attestation method. BulkEnrollmentGroupOperationResult: description: Results of a bulk enrollment group operation. required: - isSuccessful type: object properties: errors: description: Registration errors type: array items: $ref: '#/definitions/BulkEnrollmentGroupOperationError' isSuccessful: description: Indicates if the operation was successful in its entirety. type: boolean ImportDevicesRequest: description: Use to provide parameters when requesting an import of all devices in the hub. type: object properties: inputBlobContainerUri: description: The input blob container URI. type: string outputBlobContainerUri: description: The output blob container URI. type: string inputBlobName: description: The blob name to be used when importing from the provided input blob container. type: string outputBlobName: description: The blob name to use for storing the status of the import job. type: string authenticationType: description: Specifies authentication type being used for connecting to the storage account. enum: - keyBased - identityBased type: string x-ms-enum: name: AuthenticationType modelAsString: true identity: description: Managed identity properties of storage endpoint for import devices. $ref: '#/definitions/ManagedIdentity' includeConfigurations: description: The value indicating whether configurations should be imported. type: boolean configurationsBlobName: description: The blob name to be used when importing configurations from the provided input blob container. type: string required: - inputBlobContainerUri - outputBlobContainerUri X509Attestation: description: Attestation via X509. type: object properties: clientCertificates: $ref: '#/definitions/X509Certificates' signingCertificates: $ref: '#/definitions/X509Certificates' caReferences: $ref: '#/definitions/X509CAReferences' TestRouteResultDetails: description: Detailed result of testing a route type: object properties: compilationErrors: description: JSON-serialized list of route compilation errors type: array items: $ref: '#/definitions/RouteCompilationError' TpmAttestation: description: Attestation via TPM. required: - endorsementKey type: object properties: endorsementKey: type: string storageRootKey: type: string BulkEnrollmentGroupOperation: description: Bulk enrollment operation. required: - enrollmentGroups - mode type: object properties: enrollmentGroups: description: Enrollment items type: array items: $ref: '#/definitions/EnrollmentGroup' mode: description: Operation mode. enum: - create - update - updateIfMatchETag - delete type: string TestAllRoutesResult: description: Result of testing all routes type: object properties: routes: description: JSON-serialized array of matched routes type: array items: $ref: '#/definitions/MatchedRoute' EnrollmentGroup: description: Enrollment group record. required: - enrollmentGroupId - attestation type: object properties: enrollmentGroupId: description: Enrollment Group ID. type: string attestation: $ref: '#/definitions/AttestationMechanism' description: Attestation method used by the device. capabilities: $ref: '#/definitions/DeviceCapabilities' description: Capabilities of the device. iotHubHostName: description: The Iot Hub host name. type: string initialTwin: $ref: '#/definitions/InitialTwin' description: Initial device twin. etag: description: The entity tag associated with the resource. type: string provisioningStatus: description: The provisioning status. default: enabled enum: - enabled - disabled type: string reprovisionPolicy: $ref: '#/definitions/ReprovisionPolicy' description: The behavior when a device is re-provisioned to an IoT hub. createdDateTimeUtc: format: date-time description: The DateTime this resource was created. type: string readOnly: true lastUpdatedDateTimeUtc: format: date-time description: The DateTime this resource was last updated. type: string readOnly: true allocationPolicy: description: 'The allocation policy of this resource. This policy overrides the tenant level allocation policy for this individual enrollment or enrollment group. Possible values include ''hashed'': Linked IoT hubs are equally likely to have devices provisioned to them, ''geoLatency'': Devices are provisioned to an IoT hub with the lowest latency to the device.If multiple linked IoT hubs would provide the same lowest latency, the provisioning service hashes devices across those hubs, ''static'' : Specification of the desired IoT hub in the enrollment list takes priority over the service-level allocation policy, ''custom'': Devices are provisioned to an IoT hub based on your own custom logic. The provisioning service passes information about the device to the logic, and the logic returns the desired IoT hub as well as the desired initial configuration. We recommend using Azure Functions to host your logic.' enum: - hashed - geoLatency - static - custom type: string iotHubs: description: The list of IoT Hub hostnames the device(s) in this resource can be allocated to. Must be a subset of tenant level list of IoT hubs. type: array items: type: string customAllocationDefinition: $ref: '#/definitions/CustomAllocationDefinition' description: This tells DPS which webhook to call when using custom allocation. SharedAccessSignatureAuthorizationRule: description: The properties of an IoT hub shared access policy. type: object properties: keyName: description: The name of the shared access policy. type: string primaryKey: description: The primary key. type: string secondaryKey: description: The secondary key. type: string rights: description: The permissions assigned to the shared access policy. enum: - RegistryRead - RegistryWrite - ServiceConnect - DeviceConnect - RegistryRead, RegistryWrite - RegistryRead, ServiceConnect - RegistryRead, DeviceConnect - RegistryWrite, ServiceConnect - RegistryWrite, DeviceConnect - ServiceConnect, DeviceConnect - RegistryRead, RegistryWrite, ServiceConnect - RegistryRead, RegistryWrite, DeviceConnect - RegistryRead, ServiceConnect, DeviceConnect - RegistryWrite, ServiceConnect, DeviceConnect - RegistryRead, RegistryWrite, ServiceConnect, DeviceConnect type: string x-ms-enum: name: AccessRights modelAsString: false required: - keyName - rights BulkEnrollmentOperationError: description: Bulk enrollment operation error required: - registrationId - errorCode - errorStatus type: object properties: registrationId: description: "This id is used to uniquely identify a device registration of an enrollment.\r\nA case-insensitive string (up to 128 characters long) of alphanumeric characters plus certain special characters : . _ -. No special characters allowed at start or end." type: string errorCode: format: int32 description: Error code type: integer errorStatus: description: Error status. type: string RoutingTwin: description: Twin reference input parameter. This is an optional parameter type: object properties: tags: description: Twin Tags type: object properties: properties: desired: description: Twin desired properties type: object reported: description: Twin desired properties type: object BulkEnrollmentGroupOperationError: description: Bulk enrollment operation error. required: - enrollmentGroupId - errorCode - errorStatus type: object properties: enrollmentGroupId: description: Enrollment group id. type: string errorCode: format: int32 description: Error code type: integer errorStatus: description: Error status. type: string BulkEnrollmentOperationResult: description: Results of a bulk enrollment operation required: - isSuccessful type: object properties: errors: description: Registration errors type: array items: $ref: '#/definitions/BulkEnrollmentOperationError' isSuccessful: description: Indicates if the operation was successful in its entirety. type: boolean TestAllRoutesInput: description: Input for testing all routes type: object properties: routingSource: description: Routing source enum: - Invalid - DeviceMessages - TwinChangeEvents - DeviceLifecycleEvents - DeviceJobLifecycleEvents - DigitalTwinChangeEvents - DeviceConnectionStateEvents - MqttBrokerMessages type: string x-ms-enum: name: RoutingSource modelAsString: true message: description: Routing message $ref: '#/definitions/RoutingMessage' twin: description: Routing Twin Reference $ref: '#/definitions/RoutingTwin' QuerySpecification: required: - query type: object properties: query: type: string CustomAllocationDefinition: description: This tells DPS which webhook to call when using custom allocation. required: - webhookUrl - apiVersion type: object properties: webhookUrl: description: The webhook URL used for allocation requests. type: string apiVersion: description: 'The API version of the provisioning service types (such as IndividualEnrollment) sent in the custom allocation request. Minimum supported version: "2018-09-01-preview".' type: string OperationInputs: description: Input values. type: object properties: name: description: The name of the IoT hub to check. type: string required: - name FailoverInput: description: Use to provide failover region when requesting manual Failover for a hub. type: object properties: failoverRegion: description: Region the hub will be failed over to type: string required: - failoverRegion ManagedIdentity: description: The properties of the Managed identity. type: object properties: userAssignedIdentity: type: string description: The user assigned identity. Metadata: description: Metadata for the TwinCollection type: object properties: lastUpdated: format: date-time description: Last time the TwinCollection was updated type: string lastUpdatedVersion: format: int64 description: This is null for reported properties metadata and is not null for desired properties metadata. type: integer JobResponse: description: The properties of the Job Response object. type: object properties: jobId: description: The job identifier. type: string readOnly: true startTimeUtc: format: date-time-rfc1123 description: The start time of the job. type: string readOnly: true endTimeUtc: format: date-time-rfc1123 description: The time the job stopped processing. type: string readOnly: true type: description: The type of the job. enum: - unknown - export - import - backup - readDeviceProperties - writeDeviceProperties - updateDeviceConfiguration - rebootDevice - factoryResetDevice - firmwareUpdate type: string readOnly: true x-ms-enum: name: JobType modelAsString: true status: description: The status of the job. enum: - unknown - enqueued - running - completed - failed - cancelled type: string readOnly: true x-ms-enum: name: JobStatus modelAsString: false failureReason: description: If status == failed, this string containing the reason for the failure. type: string readOnly: true statusMessage: description: The status message for the job. type: string readOnly: true parentJobId: description: The job identifier of the parent job, if any. type: string readOnly: true InitialTwinProperties: description: Represents the initial properties that will be set on the device twin. type: object properties: desired: $ref: '#/definitions/TwinCollection' description: Gets and sets the InitialTwin desired properties. MatchedRoute: description: Routes that matched type: object properties: properties: description: Properties of routes that matched $ref: '#/definitions/RouteProperties' DeviceRegistrationState: description: Device registration state. type: object properties: registrationId: description: "This id is used to uniquely identify a device registration of an enrollment.\r\nA case-insensitive string (up to 128 characters long) of alphanumeric characters plus certain special characters : . _ -. No special characters allowed at start or end." type: string readOnly: true createdDateTimeUtc: format: date-time description: Registration create date time (in UTC). type: string readOnly: true assignedHub: description: Assigned Azure IoT Hub. type: string readOnly: true deviceId: description: Device ID. type: string readOnly: true status: description: Enrollment status. enum: - unassigned - assigning - assigned - failed - disabled type: string readOnly: true substatus: description: 'Substatus for ''Assigned'' devices. Possible values include - ''initialAssignment'': Device has been assigned to an IoT hub for the first time, ''deviceDataMigrated'': Device has been assigned to a different IoT hub and its device data was migrated from the previously assigned IoT hub. Device data was removed from the previously assigned IoT hub, ''deviceDataReset'': Device has been assigned to a different IoT hub and its device data was populated from the initial state stored in the enrollment. Device data was removed from the previously assigned IoT hub, ''reprovisionedToInitialAssignment'': Device has been re-provisioned to a previously assigned IoT hub.' enum: - initialAssignment - deviceDataMigrated - deviceDataReset - reprovisionedToInitialAssignment type: string readOnly: true errorCode: format: int32 description: Error code. type: integer readOnly: true errorMessage: description: Error message. type: string readOnly: true lastUpdatedDateTimeUtc: format: date-time description: Last updated date time (in UTC). type: string readOnly: true etag: description: The entity tag associated with the resource. type: string readOnly: true payload: description: Custom allocation payload returned from the webhook to the device. type: object readOnly: true RouteProperties: description: The properties of a routing rule that your IoT hub uses to route messages to endpoints. type: object properties: name: description: The name of the route. The name can only include alphanumeric characters, periods, underscores, hyphens, has a maximum length of 64 characters, and must be unique. type: string pattern: ^[A-Za-z0-9-._]{1,64}$ source: description: The source that the routing rule is to be applied to, such as DeviceMessages. enum: - Invalid - DeviceMessages - TwinChangeEvents - DeviceLifecycleEvents - DeviceJobLifecycleEvents - DigitalTwinChangeEvents - DeviceConnectionStateEvents - MqttBrokerMessages type: string x-ms-enum: name: RoutingSource modelAsString: true condition: description: 'The condition that is evaluated to apply the routing rule. If no condition is provided, it evaluates to true by default. For grammar, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language' type: string endpointNames: description: The list of endpoints to which messages that satisfy the condition are routed. Currently only one endpoint is allowed. minItems: 1 maxItems: 1 type: array items: type: string isEnabled: description: Used to specify whether a route is enabled. type: boolean required: - name - endpointNames - source - isEnabled TwinCollection: description: Represents a collection of properties within a Twin type: object properties: version: format: int64 description: Version of the TwinCollection type: integer count: description: Number of properties in the TwinCollection type: integer metadata: $ref: '#/definitions/Metadata' description: Metadata for the TwinCollection additionalProperties: type: object ExportDevicesRequest: description: Use to provide parameters when requesting an export of all devices in the IoT hub. type: object properties: exportBlobContainerUri: description: The export blob container URI. type: string excludeKeys: description: The value indicating whether keys should be excluded during export. type: boolean exportBlobName: description: The name of the blob that will be created in the provided output blob container. This blob will contain the exported device registry information for the IoT Hub. type: string authenticationType: description: Specifies authentication type being used for connecting to the storage account. enum: - keyBased - identityBased type: string x-ms-enum: name: AuthenticationType modelAsString: true identity: description: Managed identity properties of storage endpoint for export devices. $ref: '#/definitions/ManagedIdentity' includeConfigurations: description: The value indicating whether configurations should be exported. type: boolean configurationsBlobName: description: The name of the blob that will be created in the provided output blob container. This blob will contain the exported configurations for the Iot Hub. type: string required: - exportBlobContainerUri - excludeKeys TestRouteResult: description: Result of testing one route type: object properties: result: description: Result of testing route enum: - undefined - 'false' - 'true' type: string x-ms-enum: name: TestResultStatus modelAsString: true details: description: Detailed result of testing route $ref: '#/definitions/TestRouteResultDetails' BulkEnrollmentOperation: description: Bulk enrollment operation. required: - enrollments - mode type: object properties: enrollments: description: Enrollment items type: array items: $ref: '#/definitions/IndividualEnrollment' mode: description: Operation mode. enum: - create - update - updateIfMatchETag - delete type: string RouteErrorRange: description: Range of route errors type: object properties: start: description: Start where the route error happened $ref: '#/definitions/RouteErrorPosition' end: description: End where the route error happened $ref: '#/definitions/RouteErrorPosition' X509Certificates: description: Primary and secondary certificates type: object properties: primary: $ref: '#/definitions/X509CertificateWithInfo' secondary: $ref: '#/definitions/X509CertificateWithInfo' parameters: ApiVersionParameter: name: api-version in: query description: 'The API version to use for the request. Supported versions include: 2021-10-01' required: true type: string default: '2021-10-01' resourceName: name: resourceName in: path description: The name of the IoT hub. required: true type: string x-ms-parameter-location: method resourceGroupName: name: resourceGroupName description: The name of the resource group that contains the IoT hub. in: path required: true type: string x-ms-parameter-location: method api-version: name: api-version in: query description: The version of the API. required: true type: string subscriptionId: name: subscriptionId in: path description: The subscription identifier. required: true type: string x-ms-parameterized-host: hostTemplate: '{endpoint}' useSchemePrefix: false parameters: - $ref: '#/parameters/Endpoint'