Skip to main content

postgres_instances

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

Overview

Namepostgres_instances
TypeResource
Idazure.azure_arc_data.postgres_instances

Fields

NameDatatypeDescription
admintextfield from the properties object
basic_login_informationtextfield from the properties object
data_controller_idtextfield from the properties object
extended_locationtextfield from the properties object
k8s_rawtextfield from the properties object
last_uploaded_datetextfield from the properties object
locationtextThe geo-location where the resource lives
postgresInstanceNametextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
skutextThe resource model definition representing SKU for Azure Database for PostgresSQL - Azure Arc
subscriptionIdtextfield from the properties object
tagstextResource tags.

Methods

NameAccessible byRequired ParamsDescription
getSELECTpostgresInstanceName, resourceGroupName, subscriptionIdRetrieves a postgres Instance resource
listSELECTsubscriptionId
list_by_resource_groupSELECTresourceGroupName, subscriptionIdGet a postgres Instances list by Resource group name.
createINSERTpostgresInstanceName, resourceGroupName, subscriptionId, data__propertiesCreates or replaces a postgres Instance resource
deleteDELETEpostgresInstanceName, resourceGroupName, subscriptionIdDeletes a postgres Instance resource
updateUPDATEpostgresInstanceName, resourceGroupName, subscriptionIdUpdates a postgres Instance resource

SELECT examples

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 }}';

INSERT example

Use the following StackQL query and manifest file to create a new postgres_instances resource.

/*+ 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 }}'
;

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 }}';