Communication Services - Check Name Availability

Check Name Availability
Checks that the CommunicationService name is valid and is not already in use.

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

URI Parameters

Name In Required Type Description
subscriptionId
path True

string

uuid

The ID of the target subscription. The value must be an UUID.

api-version
query True

string

The API version to use for this operation.

Request Body

Name Required Type Description
name True

string

The name of the resource for which availability needs to be checked.

type True

string

The resource type.

Responses

Name Type Description
200 OK

CheckNameAvailabilityResponse

Success. The response describes the name availability.

Other Status Codes

ErrorResponse

Error response describing why the operation failed.

Examples

Check name availability available
Check name availability unavailable

Check name availability available

Sample request

POST https://management.azure.com/subscriptions/11112222-3333-4444-5555-666677778888/providers/Microsoft.Communication/checkNameAvailability?api-version=2023-03-31

{
  "type": "Microsoft.Communication/CommunicationServices",
  "name": "MyCommunicationService"
}

Sample response

{
  "nameAvailable": true,
  "reason": "NameAvailable",
  "message": "Requested name is available for the requested type"
}

Check name availability unavailable

Sample request

POST https://management.azure.com/subscriptions/11112222-3333-4444-5555-666677778888/providers/Microsoft.Communication/checkNameAvailability?api-version=2023-03-31

{
  "type": "Microsoft.Communication/CommunicationServices",
  "name": "MyCommunicationService"
}

Sample response

{
  "nameAvailable": false,
  "reason": "AlreadyExists",
  "message": "Requested name is unavailable for the requested type"
}

Definitions

Name Description
CheckNameAvailabilityReason

The reason why the given name is not available.

CheckNameAvailabilityResponse

The check availability result.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

NameAvailabilityParameters

Data POST-ed to the nameAvailability action

CheckNameAvailabilityReason

The reason why the given name is not available.

Name Type Description
AlreadyExists

string

Invalid

string

CheckNameAvailabilityResponse

The check availability result.

Name Type Description
message

string

Detailed reason why the given name is available.

nameAvailable

boolean

Indicates if the resource name is available.

reason

CheckNameAvailabilityReason

The reason why the given name is not available.

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

NameAvailabilityParameters

Data POST-ed to the nameAvailability action

Name Type Description
name

string

The name of the resource for which availability needs to be checked.

type

string

The resource type.