Services - Check Name Availability
Check if a service instance name is available.
POST https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.HealthcareApis/checkNameAvailability?api-version=2022-06-01
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
subscription
|
path | True |
string |
The subscription identifier. |
|
api-version
|
query | True |
string |
Client Api Version. |
Request Body
| Name | Required | Type | Description |
|---|---|---|---|
| name | True |
string |
The name of the service instance to check. |
| type | True |
string |
The fully qualified resource type which includes provider namespace. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
This is a synchronous operation. The body contains a JSON-serialized response that specifies whether the service 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
Check name availability
Sample request
POST https://management.azure.com/subscriptions/subid/providers/Microsoft.HealthcareApis/checkNameAvailability?api-version=2022-06-01
{
"type": "Microsoft.HealthcareApis/services",
"name": "serviceName"
}
Sample response
{
"nameAvailable": false,
"reason": "AlreadyExists",
"message": "Service name is not available."
}
Definitions
| Name | Description |
|---|---|
|
Check |
Input values. |
|
Error |
Error details. |
|
Error |
Error details. |
|
Service |
The reason for unavailability. |
|
Services |
The properties indicating whether a given service name is available. |
CheckNameAvailabilityParameters
Input values.
| Name | Type | Description |
|---|---|---|
| name |
string |
The name of the service instance to check. |
| type |
string |
The fully qualified resource type which includes provider namespace. |
ErrorDetails
Error details.
| Name | Type | Description |
|---|---|---|
| error |
Error details |
ErrorDetailsInternal
Error details.
| Name | Type | Description |
|---|---|---|
| code |
string |
The error code. |
| message |
string |
The error message. |
| target |
string |
The target of the particular error. |
ServiceNameUnavailabilityReason
The reason for unavailability.
| Value | Description |
|---|---|
| Invalid | |
| AlreadyExists |
ServicesNameAvailabilityInfo
The properties indicating whether a given service 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. |