Namespaces - Check Availability

Checks the availability of the given service namespace across all Azure subscriptions. This is useful because the domain name is created based on the service namespace name.

POST https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.NotificationHubs/checkNamespaceAvailability?api-version=2023-09-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

Gets or sets resource name

isAvailiable

boolean

Not used and deprecated since API version 2023-09-01

location

string

Gets or sets resource location

sku

Sku

The Sku description for a namespace

tags

object

Gets or sets resource tags

Responses

Name Type Description
200 OK

CheckAvailabilityResult

Success

Other Status Codes

ErrorResponse

Error code with reason.

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

Namespaces_CheckAvailability

Sample request

POST https://management.azure.com/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/providers/Microsoft.NotificationHubs/checkNamespaceAvailability?api-version=2023-09-01

{
  "name": "sdk-Namespace-2924"
}

Sample response

{
  "isAvailiable": true,
  "id": "/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/providers/Microsoft.NotificationHubs/namespaces/sdk-Namespace-2924",
  "name": "sdk-Namespace-2924",
  "type": "Microsoft.NotificationHubs/namespaces/checkNamespaceAvailability"
}

Definitions

Name Description
CheckAvailabilityParameters

Parameters supplied to the Check Name Availability for Namespace and NotificationHubs.

CheckAvailabilityResult

Description of a CheckAvailability resource.

createdByType

The type of identity that created the resource.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

Sku

The Sku description for a namespace

SkuName

Namespace SKU name.

systemData

Metadata pertaining to creation and last modification of the resource.

CheckAvailabilityParameters

Parameters supplied to the Check Name Availability for Namespace and NotificationHubs.

Name Type Description
id

string

Gets resource Id

isAvailiable

boolean

Not used and deprecated since API version 2023-09-01

location

string

Gets or sets resource location

name

string

Gets or sets resource name

sku

Sku

The Sku description for a namespace

tags

object

Gets or sets resource tags

type

string

Gets resource type

CheckAvailabilityResult

Description of a CheckAvailability resource.

Name Type Description
id

string

Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"

isAvailiable

boolean

Gets or sets true if the name is available and can be used to create new Namespace/NotificationHub. Otherwise false.

location

string

Deprecated - only for compatibility.

name

string

The name of the resource

sku

Sku

The Sku description for a namespace

systemData

systemData

Azure Resource Manager metadata containing createdBy and modifiedBy information.

tags

object

Deprecated - only for compatibility.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

createdByType

The type of identity that created the resource.

Name Type Description
Application

string

Key

string

ManagedIdentity

string

User

string

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.

Sku

The Sku description for a namespace

Name Type Description
capacity

integer

Gets or sets the capacity of the resource

family

string

Gets or sets the Sku Family

name

SkuName

Namespace SKU name.

size

string

Gets or sets the Sku size

tier

string

Gets or sets the tier of particular sku

SkuName

Namespace SKU name.

Name Type Description
Basic

string

Free

string

Standard

string

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.