Partilhar via


Support Tickets - Check Name Availability

Check the availability of a resource name. This API should be used to check the uniqueness of the name for support ticket creation for the selected subscription.

POST https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Support/checkNameAvailability?api-version=2024-04-01

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 resource name to validate.

type True

Type

The type of resource.

Responses

Name Type Description
200 OK

CheckNameAvailabilityOutput

OK. The request has succeeded.

Other Status Codes

ErrorResponse

Error response describing why the operation failed.

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

Checks whether name is available for a subscription support ticket resource

Sample request

POST https://management.azure.com/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/providers/Microsoft.Support/checkNameAvailability?api-version=2024-04-01

{
  "name": "sampleName",
  "type": "Microsoft.Support/supportTickets"
}

Sample response

{
  "nameAvailable": false,
  "reason": "Name is already in use",
  "message": "Name not available"
}

Definitions

Name Description
CheckNameAvailabilityInput

Input of CheckNameAvailability API.

CheckNameAvailabilityOutput

Output of check name availability API.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

Type

The type of resource.

CheckNameAvailabilityInput

Input of CheckNameAvailability API.

Name Type Description
name

string

The resource name to validate.

type

Type

The type of resource.

CheckNameAvailabilityOutput

Output of check name availability API.

Name Type Description
message

string

The detailed error message describing why the name is not available.

nameAvailable

boolean

Indicates whether the name is available.

reason

string

The reason why 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.

Type

The type of resource.

Name Type Description
Microsoft.Support/communications

string

Microsoft.Support/supportTickets

string