Media Service - Check Name Availability

Checks whether the Media Service resource name is available. The name must be globally unique.

POST https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Media/CheckNameAvailability?api-version={api-version}

URI Parameters

Name In Required Type Description
resourceGroupName
path True
  • string
Name of the resource group within the Azure subscription.
mediaServiceName
path True
  • string
Name of the Media Service.

Regex pattern: ^[a-z0-9]{3,24}$

subscriptionId
path True
  • string

The unique identifier for a Microsoft Azure subscription.

api-version
query True
  • string

Version of the API to be used with the client request. The current version is 2015-10-01.

Request Body

Name Required Type Description
name True
  • string

The name of the resource. A name must be globally unique.

Regex pattern: ^[a-z0-9]{3,24}$

type True
  • enum:
    • mediaservices

The type of the resource - mediaservices.

Responses

Name Type Description
200 OK

Success. Returns details about whether a Media Service resource name is available.

Other Status Codes

CheckNameAvailability of a Media Service failed.

Examples

MediaServiceCheckNameAvailability

Sample Request

POST https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Media/CheckNameAvailability?api-version=2015-10-01
{
  "name": "contosomedia",
  "type": "mediaservices"
}

Sample Response

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

Definitions

ApiError
CheckNameAvailabilityOutput
Name Type Description
code
  • string

Error code.

message
  • string

Error message.

Name Type Description
message
  • string

Specifies the detailed reason if the name is not available.

nameAvailable
  • boolean

Specifies if the name is available.

reason
  • enum:
    • None
    • Invalid
    • AlreadyExists

Specifies the reason if the name is not available.