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=2023-06-30
Name | In | Required | Type | Description |
---|---|---|---|---|
subscription
|
path | True |
string |
The subscription identifier. |
api-version
|
query | True |
string |
The version of the API. |
Name | Required | Type | Description |
---|---|---|---|
name | True |
string |
The name of the IoT hub to check. |
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 |
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Sample request
Sample response
{
"nameAvailable": true,
"reason": "Invalid",
"message": ""
}
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. |
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. |
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. |
The reason for unavailability.
Value | Description |
---|---|
AlreadyExists | |
Invalid |
Input values.
Name | Type | Description |
---|---|---|
name |
string |
The name of the IoT hub to check. |