Skip to main content

name_availability

Creates, updates, deletes, gets or lists a name_availability resource.

Overview

Namename_availability
TypeResource
Idazure.postgresql_flexible_servers.name_availability

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringName for which validity and availability was checked.
messagestringDetailed reason why the given name is not available.
nameAvailablebooleanIndicates if the resource name is available.
reasonstringThe reason why the given name is not available. Known values are: "Invalid" and "AlreadyExists". (Invalid, AlreadyExists)
typestringType of resource. It can be 'Microsoft.DBforPostgreSQL/flexibleServers' or 'Microsoft.DBforPostgreSQL/flexibleServers/virtualendpoints'.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
check_with_locationselectlocation_name, subscription_idCheck the availability of name for resource.
check_globallyselectsubscription_idChecks the validity and availability of the given name, to assign it to a new server or to use it as the base name of a new pair of virtual endpoints.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
location_namestringThe name of the location. Required.
subscription_idstring

SELECT examples

Check the availability of name for resource.

SELECT
name,
message,
nameAvailable,
reason,
type
FROM azure.postgresql_flexible_servers.name_availability
WHERE location_name = '{{ location_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;