Check Domain Availability - Check Domain Availability

Check whether a domain is available.

POST https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/checkDomainAvailability?api-version=2023-05-01

URI Parameters

Name In Required Type Description
subscriptionId
path True

string

The ID of the target subscription.

api-version
query True

string

The API version to use for this operation.

Request Body

Name Required Type Description
subdomainName True

string

The subdomain name to use.

type True

string

The Type of the resource.

kind

string

The Kind of the resource.

Responses

Name Type Description
200 OK

DomainAvailability

OK.

Other Status Codes

ErrorResponse

Error response describing why the operation failed.

Examples

Check SKU Availability

Sample Request

POST https://management.azure.com/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/Microsoft.CognitiveServices/checkDomainAvailability?api-version=2023-05-01

{
  "subdomainName": "contosodemoapp1",
  "type": "Microsoft.CognitiveServices/accounts"
}

Sample Response

{
  "isSubdomainAvailable": false,
  "reason": "Sub domain name 'contosodemoapp1' is not valid",
  "subdomainName": "contosodemoapp1",
  "type": "Microsoft.CognitiveServices/accounts"
}

Definitions

Name Description
CheckDomainAvailabilityParameter

Check Domain availability parameter.

DomainAvailability

Domain availability.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

CheckDomainAvailabilityParameter

Check Domain availability parameter.

Name Type Description
kind

string

The Kind of the resource.

subdomainName

string

The subdomain name to use.

type

string

The Type of the resource.

DomainAvailability

Domain availability.

Name Type Description
isSubdomainAvailable

boolean

Indicates the given SKU is available or not.

kind

string

The Kind of the resource.

reason

string

Reason why the SKU is not available.

subdomainName

string

The subdomain name to use.

type

string

The Type of the resource.

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.