Iot Dps Resource - Create Or Update

Create or update the metadata of the provisioning service. The usual pattern to modify a property is to retrieve the provisioning service metadata and security metadata, and then combine them with the modified values in a new body to update the provisioning service.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{provisioningServiceName}?api-version=2018-01-22

URI Parameters

Name In Required Type Description
provisioningServiceName
path True
  • string

Name of provisioning service to create or update.

resourceGroupName
path True
  • string

Resource group identifier.

subscriptionId
path True
  • string

The subscription identifier.

api-version
query True
  • string

The version of the API.

Request Body

Name Required Type Description
location True
  • string

The resource location.

properties True

Service specific properties for a provisioning service

sku True

Sku info for a provisioning Service.

etag
  • string

The Etag field is not required. If it is provided in the response body, it must also be provided as a header per the normal ETag convention.

tags
  • object

The resource tags.

Responses

Name Type Description
200 OK

The body contains all the non-security properties of the provisioning service. Security-related properties are set to null.

201 Created

This is a long running operation. The operation returns a 201 if the validation is complete. The response includes an Azure-AsyncOperation header that contains a status URL. Clients are expected to poll the status URL for the status of the operation. If successful, the operation returns HTTP status code of 201 (OK).

Other Status Codes

Default error response.

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

DPSCreate

Sample Request

PUT https://management.azure.com/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/provisioningServices/myFirstProvisioningService?api-version=2018-01-22
{
  "location": "East US",
  "type": "Microsoft.Devices/ProvisioningServices",
  "properties": {},
  "sku": {
    "name": "S1",
    "tier": "Standard",
    "capacity": 1
  },
  "tags": {}
}

Sample Response

{
  "etag": "AAAAAAAADGk=",
  "name": "myFirstProvisioningService",
  "location": "eastus",
  "properties": {
    "state": "Active",
    "allocationPolicy": "Hashed",
    "serviceOperationsHostName": "myFirstProvisioningService.azure-devices-provisioning.net",
    "deviceProvisioningHostName": "global.azure-devices-provisioning.net",
    "idScope": "0ne00000012",
    "authorizationPolicies": []
  },
  "type": "Microsoft.Devices/ProvisioningServices",
  "id": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups//providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService",
  "tags": {},
  "sku": {
    "name": "S1",
    "tier": "Standard",
    "capacity": 1
  }
}
{
  "etag": "AAAAAAAADGk=",
  "name": "myFirstProvisioningService",
  "location": "eastus",
  "properties": {
    "state": "Active",
    "allocationPolicy": "Hashed",
    "serviceOperationsHostName": "myFirstProvisioningService.azure-devices-provisioning.net",
    "deviceProvisioningHostName": "global.azure-devices-provisioning.net",
    "idScope": "0ne00000012",
    "authorizationPolicies": []
  },
  "type": "Microsoft.Devices/ProvisioningServices",
  "id": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups//providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService",
  "tags": {},
  "sku": {
    "name": "S1",
    "tier": "Standard",
    "capacity": 1
  }
}

Definitions

AccessRightsDescription

Rights that this key has.

AllocationPolicy

Allocation policy to be used by this provisioning service.

ErrorDetails

Error details.

IotDpsPropertiesDescription

the service specific properties of a provisioning service, including keys, linked iot hubs, current state, and system generated properties such as hostname and idScope

IotDpsSku

Sku name.

IotDpsSkuInfo

List of possible provisioning service SKUs.

IotHubDefinitionDescription

Description of the IoT hub.

ProvisioningServiceDescription

The description of the provisioning service.

SharedAccessSignatureAuthorizationRule[AccessRightsDescription]

Description of the shared access key.

state

Current state of the provisioning service.

AccessRightsDescription

Rights that this key has.

Name Type Description
DeviceConnect
  • string
EnrollmentRead
  • string
EnrollmentWrite
  • string
RegistrationStatusRead
  • string
RegistrationStatusWrite
  • string
ServiceConfig
  • string

AllocationPolicy

Allocation policy to be used by this provisioning service.

Name Type Description
GeoLatency
  • string
Hashed
  • string
Static
  • string

ErrorDetails

Error details.

Name Type Description
code
  • string

The error code.

details
  • string

The error details.

httpStatusCode
  • string

The HTTP status code.

message
  • string

The error message.

IotDpsPropertiesDescription

the service specific properties of a provisioning service, including keys, linked iot hubs, current state, and system generated properties such as hostname and idScope

Name Type Description
allocationPolicy

Allocation policy to be used by this provisioning service.

authorizationPolicies

List of authorization keys for a provisioning service.

deviceProvisioningHostName
  • string

Device endpoint for this provisioning service.

idScope
  • string

Unique identifier of this provisioning service.

iotHubs

List of IoT hubs associated with this provisioning service.

provisioningState
  • string

The ARM provisioning state of the provisioning service.

serviceOperationsHostName
  • string

Service endpoint for provisioning service.

state

Current state of the provisioning service.

IotDpsSku

Sku name.

Name Type Description
S1
  • string

IotDpsSkuInfo

List of possible provisioning service SKUs.

Name Type Description
capacity
  • integer

The number of units to provision

name

Sku name.

tier
  • string

Pricing tier name of the provisioning service.

IotHubDefinitionDescription

Description of the IoT hub.

Name Type Description
allocationWeight
  • integer

weight to apply for a given iot h.

applyAllocationPolicy
  • boolean

flag for applying allocationPolicy or not for a given iot hub.

connectionString
  • string

Connection string og the IoT hub.

location
  • string

ARM region of the IoT hub.

name
  • string

Host name of the IoT hub.

ProvisioningServiceDescription

The description of the provisioning service.

Name Type Description
etag
  • string

The Etag field is not required. If it is provided in the response body, it must also be provided as a header per the normal ETag convention.

id
  • string

The resource identifier.

location
  • string

The resource location.

name
  • string

The resource name.

properties

Service specific properties for a provisioning service

sku

Sku info for a provisioning Service.

tags
  • object

The resource tags.

type
  • string

The resource type.

SharedAccessSignatureAuthorizationRule[AccessRightsDescription]

Description of the shared access key.

Name Type Description
keyName
  • string

Name of the key.

primaryKey
  • string

Primary SAS key value.

rights

Rights that this key has.

secondaryKey
  • string

Secondary SAS key value.

state

Current state of the provisioning service.

Name Type Description
Activating
  • string
ActivationFailed
  • string
Active
  • string
Deleted
  • string
Deleting
  • string
DeletionFailed
  • string
FailingOver
  • string
FailoverFailed
  • string
Resuming
  • string
Suspended
  • string
Suspending
  • string
Transitioning
  • string