Skip to main content

roles

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

Overview

Nameroles
TypeResource
Idazure.postgresql_hsc.roles

Fields

NameDatatypeDescription
clusterNametextfield from the properties object
external_identitytextfield from the properties object
passwordtextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
roleNametextfield from the properties object
role_typetextfield from the properties object
subscriptionIdtextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTclusterName, resourceGroupName, roleName, subscriptionIdGets information about a cluster role.
list_by_clusterSELECTclusterName, resourceGroupName, subscriptionIdList all the roles in a given cluster.
createINSERTclusterName, resourceGroupName, roleName, subscriptionId, data__propertiesCreates a new role or updates an existing role.
deleteDELETEclusterName, resourceGroupName, roleName, subscriptionIdDeletes a cluster role.

SELECT examples

List all the roles in a given cluster.

SELECT
clusterName,
external_identity,
password,
provisioning_state,
resourceGroupName,
roleName,
role_type,
subscriptionId
FROM azure.postgresql_hsc.vw_roles
WHERE clusterName = '{{ clusterName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.postgresql_hsc.roles (
clusterName,
resourceGroupName,
roleName,
subscriptionId,
data__properties,
properties
)
SELECT
'{{ clusterName }}',
'{{ resourceGroupName }}',
'{{ roleName }}',
'{{ subscriptionId }}',
'{{ data__properties }}',
'{{ properties }}'
;

DELETE example

Deletes the specified roles resource.

/*+ delete */
DELETE FROM azure.postgresql_hsc.roles
WHERE clusterName = '{{ clusterName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND roleName = '{{ roleName }}'
AND subscriptionId = '{{ subscriptionId }}';