postgres_instances
Creates, updates, deletes, gets or lists a postgres_instances
resource.
Overview
Name | postgres_instances |
Type | Resource |
Id | azure.azure_arc_data.postgres_instances |
Fields
- vw_postgres_instances
- postgres_instances
Name | Datatype | Description |
---|---|---|
admin | text | field from the properties object |
basic_login_information | text | field from the properties object |
data_controller_id | text | field from the properties object |
extended_location | text | field from the properties object |
k8s_raw | text | field from the properties object |
last_uploaded_date | text | field from the properties object |
location | text | The geo-location where the resource lives |
postgresInstanceName | text | field from the properties object |
provisioning_state | text | field from the properties object |
resourceGroupName | text | field from the properties object |
sku | text | The resource model definition representing SKU for Azure Database for PostgresSQL - Azure Arc |
subscriptionId | text | field from the properties object |
tags | text | Resource tags. |
Name | Datatype | Description |
---|---|---|
extendedLocation | object | The complex type of the extended location. |
location | string | The geo-location where the resource lives |
properties | object | Postgres Instance properties. |
sku | object | The resource model definition representing SKU for Azure Database for PostgresSQL - Azure Arc |
tags | object | Resource tags. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | postgresInstanceName, resourceGroupName, subscriptionId | Retrieves a postgres Instance resource |
list | SELECT | subscriptionId | |
list_by_resource_group | SELECT | resourceGroupName, subscriptionId | Get a postgres Instances list by Resource group name. |
create | INSERT | postgresInstanceName, resourceGroupName, subscriptionId, data__properties | Creates or replaces a postgres Instance resource |
delete | DELETE | postgresInstanceName, resourceGroupName, subscriptionId | Deletes a postgres Instance resource |
update | UPDATE | postgresInstanceName, resourceGroupName, subscriptionId | Updates a postgres Instance resource |
SELECT
examples
- vw_postgres_instances
- postgres_instances
SELECT
admin,
basic_login_information,
data_controller_id,
extended_location,
k8s_raw,
last_uploaded_date,
location,
postgresInstanceName,
provisioning_state,
resourceGroupName,
sku,
subscriptionId,
tags
FROM azure.azure_arc_data.vw_postgres_instances
WHERE subscriptionId = '{{ subscriptionId }}';
SELECT
extendedLocation,
location,
properties,
sku,
tags
FROM azure.azure_arc_data.postgres_instances
WHERE subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new postgres_instances
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.azure_arc_data.postgres_instances (
postgresInstanceName,
resourceGroupName,
subscriptionId,
data__properties,
tags,
location,
extendedLocation,
properties,
sku
)
SELECT
'{{ postgresInstanceName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ data__properties }}',
'{{ tags }}',
'{{ location }}',
'{{ extendedLocation }}',
'{{ properties }}',
'{{ sku }}'
;
- name: your_resource_model_name
props:
- name: tags
value: object
- name: location
value: string
- name: extendedLocation
value:
- name: name
value: string
- name: type
value: []
- name: properties
value:
- name: dataControllerId
value: string
- name: admin
value: string
- name: basicLoginInformation
value:
- name: username
value: string
- name: password
value: string
- name: k8sRaw
value: object
- name: lastUploadedDate
value: string
- name: provisioningState
value: string
- name: sku
value:
- name: tier
value: string
- name: name
value: string
- name: dev
value: boolean
- name: size
value: string
- name: family
value: string
- name: capacity
value: integer
UPDATE
example
Updates a postgres_instances
resource.
/*+ update */
UPDATE azure.azure_arc_data.postgres_instances
SET
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
postgresInstanceName = '{{ postgresInstanceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
DELETE
example
Deletes the specified postgres_instances
resource.
/*+ delete */
DELETE FROM azure.azure_arc_data.postgres_instances
WHERE postgresInstanceName = '{{ postgresInstanceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';