Iot Dps Resource - Check Provisioning Service Name Availability

Check if a provisioning service name is available. This will validate if the name is syntactically valid and if the name is usable

POST https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Devices/checkProvisioningServiceNameAvailability?api-version=2022-12-12

URI Parameters

Name In Required Type Description
subscriptionId
path True

string

The subscription identifier.

api-version
query True

string

The version of the API.

Request Body

Name Required Type Description
name True

string

The name of the Provisioning Service to check.

Responses

Name Type Description
200 OK

NameAvailabilityInfo

This is a synchronous operation. The body contains a JSON-serialized response that specifies whether the provisioning service name is available. If the name is not available, the body contains the reason.

Other Status Codes

ErrorDetails

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

DPSCheckName

Sample Request

POST https://management.azure.com/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/providers/Microsoft.Devices/checkProvisioningServiceNameAvailability?api-version=2022-12-12

{
  "name": "test213123"
}

Sample Response

{
  "nameAvailable": true,
  "reason": "Invalid",
  "message": "name is valid"
}

Definitions

Name Description
ErrorDetails

Error details.

NameAvailabilityInfo

Description of name availability.

NameUnavailabilityReason

specifies the reason a name is unavailable

OperationInputs

Input values for operation results call.

ErrorDetails

Error details.

Name Type Description
code

integer

The error code.

details

string

The error details.

httpStatusCode

string

The HTTP status code.

message

string

The error message.

NameAvailabilityInfo

Description of name availability.

Name Type Description
message

string

message containing a detailed reason name is unavailable

nameAvailable

boolean

specifies if a name is available or not

reason

NameUnavailabilityReason

specifies the reason a name is unavailable

NameUnavailabilityReason

specifies the reason a name is unavailable

Name Type Description
AlreadyExists

string

Invalid

string

OperationInputs

Input values for operation results call.

Name Type Description
name

string

The name of the Provisioning Service to check.