name_availability
Creates, updates, deletes, gets or lists a name_availability resource.
Overview
| Name | name_availability |
| Type | Resource |
| Id | azure.postgresql_flexible_servers.name_availability |
Fields
The following fields are returned by SELECT queries:
- check_with_location
- check_globally
| Name | Datatype | Description |
|---|---|---|
name | string | Name for which validity and availability was checked. |
message | string | Detailed reason why the given name is not available. |
nameAvailable | boolean | Indicates if the resource name is available. |
reason | string | The reason why the given name is not available. Known values are: "Invalid" and "AlreadyExists". (Invalid, AlreadyExists) |
type | string | Type of resource. It can be 'Microsoft.DBforPostgreSQL/flexibleServers' or 'Microsoft.DBforPostgreSQL/flexibleServers/virtualendpoints'. |
| Name | Datatype | Description |
|---|---|---|
name | string | Name for which validity and availability was checked. |
message | string | Detailed reason why the given name is not available. |
nameAvailable | boolean | Indicates if the resource name is available. |
reason | string | The reason why the given name is not available. Known values are: "Invalid" and "AlreadyExists". (Invalid, AlreadyExists) |
type | string | Type of resource. It can be 'Microsoft.DBforPostgreSQL/flexibleServers' or 'Microsoft.DBforPostgreSQL/flexibleServers/virtualendpoints'. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
check_with_location | select | location_name, subscription_id | Check the availability of name for resource. | |
check_globally | select | subscription_id | Checks 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.
| Name | Datatype | Description |
|---|---|---|
location_name | string | The name of the location. Required. |
subscription_id | string |
SELECT examples
- check_with_location
- check_globally
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
;
Checks 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.
SELECT
name,
message,
nameAvailable,
reason,
type
FROM azure.postgresql_flexible_servers.name_availability
WHERE subscription_id = '{{ subscription_id }}' -- required
;