roles
Creates, updates, deletes, gets or lists a roles
resource.
Overview
Name | roles |
Type | Resource |
Id | azure.postgresql_hsc.roles |
Fields
- vw_roles
- roles
Name | Datatype | Description |
---|---|---|
clusterName | text | field from the properties object |
external_identity | text | field from the properties object |
password | text | field from the properties object |
provisioning_state | text | field from the properties object |
resourceGroupName | text | field from the properties object |
roleName | text | field from the properties object |
role_type | text | field from the properties object |
subscriptionId | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
properties | object | The properties of a cluster role. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | clusterName, resourceGroupName, roleName, subscriptionId | Gets information about a cluster role. |
list_by_cluster | SELECT | clusterName, resourceGroupName, subscriptionId | List all the roles in a given cluster. |
create | INSERT | clusterName, resourceGroupName, roleName, subscriptionId, data__properties | Creates a new role or updates an existing role. |
delete | DELETE | clusterName, resourceGroupName, roleName, subscriptionId | Deletes a cluster role. |
SELECT
examples
List all the roles in a given cluster.
- vw_roles
- roles
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 }}';
SELECT
properties
FROM azure.postgresql_hsc.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.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.postgresql_hsc.roles (
clusterName,
resourceGroupName,
roleName,
subscriptionId,
data__properties,
properties
)
SELECT
'{{ clusterName }}',
'{{ resourceGroupName }}',
'{{ roleName }}',
'{{ subscriptionId }}',
'{{ data__properties }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: roleType
value: string
- name: password
value: string
- name: externalIdentity
value:
- name: objectId
value: string
- name: principalType
value: string
- name: tenantId
value: string
- name: provisioningState
value: []
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 }}';