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=2018-04-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
subscription
|
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 |
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
IotHubResource_CheckNameAvailability
Sample Request
POST https://management.azure.com/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/providers/Microsoft.Devices/checkNameAvailability?api-version=2018-04-01
{
"name": "test-request"
}
Sample Response
{
"nameAvailable": true,
"reason": "Invalid",
"message": ""
}
Definitions
Name | Description |
---|---|
Error |
Error details. |
Iot |
The properties indicating whether a given IoT hub name is available. |
Iot |
The reason for unavailability. |
Operation |
Input values. |
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. |
IotHubNameAvailabilityInfo
The properties indicating whether a given IoT hub name is available.
Name | Type | Description |
---|---|---|
message |
string |
The detailed reason message. |
nameAvailable |
boolean |
The value which indicates whether the provided name is available. |
reason |
The reason for unavailability. |
IotHubNameUnavailabilityReason
The reason for unavailability.
Name | Type | Description |
---|---|---|
AlreadyExists |
string |
|
Invalid |
string |
OperationInputs
Input values.
Name | Type | Description |
---|---|---|
name |
string |
The name of the IoT hub to check. |