Iot Hub Resource - Check Name Availability

Check if an IoT hub name is available.

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

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 IoT hub to check.

Responses

Name Type Description
200 OK

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.

Other Status Codes

DefaultErrorResponse

Definitions

ErrorDetails
IotHubNameAvailabilityInfo
Name Type Description
Code
  • string

The error code.

Details
  • string

The error details.

HttpStatusCode
  • string

The HTTP status code.

Message
  • string

The error message.

Name Type Description
message
  • string

The detailed reason message.

nameAvailable
  • boolean

The value which indicates whether the provided name is available.

reason
  • enum:
    • Invalid
    • AlreadyExists

The reason for unavailability.