Locations - Check Name Availability

Check Name Availability
Checks whether the Media Service resource name is available.

POST https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Media/locations/{locationName}/checkNameAvailability?api-version=2023-01-01

URI Parameters

Name In Required Type Description
locationName
path True

string

Location name.

subscriptionId
path True

string

The unique identifier for a Microsoft Azure subscription.

api-version
query True

string

The version of the API to be used with the client request.

Request Body

Name Type Description
name

string

The account name.

type

string

The account type. For a Media Services account, this should be 'MediaServices'.

Responses

Name Type Description
200 OK

EntityNameAvailabilityCheckOutput

OK

Other Status Codes

ErrorResponse

Detailed error information.

Examples

Check Name Availability

Sample Request

POST https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Media/locations/japanwest/checkNameAvailability?api-version=2023-01-01

{
  "name": "contosotv",
  "type": "Microsoft.Media/mediaservices"
}

Sample Response

{
  "nameAvailable": true,
  "reason": "None",
  "message": ""
}

Definitions

Name Description
CheckNameAvailabilityInput

The input to the check name availability request.

EntityNameAvailabilityCheckOutput

The response from the check name availability request.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

CheckNameAvailabilityInput

The input to the check name availability request.

Name Type Description
name

string

The account name.

type

string

The account type. For a Media Services account, this should be 'MediaServices'.

EntityNameAvailabilityCheckOutput

The response from the check name availability request.

Name Type Description
message

string

Specifies the detailed reason if the name is not available.

nameAvailable

boolean

Specifies if the name is available.

reason

string

Specifies the reason if the 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.