role_definitions
Creates, updates, deletes, gets or lists a role_definitions
resource.
Overview
Name | role_definitions |
Type | Resource |
Id | azure.authorization.role_definitions |
Fields
- vw_role_definitions
- role_definitions
Name | Datatype | Description |
---|---|---|
id | text | The role definition ID. |
name | text | The role definition name. |
description | text | field from the properties object |
assignable_scopes | text | field from the properties object |
created_by | text | field from the properties object |
created_on | text | field from the properties object |
permissions | text | field from the properties object |
roleDefinitionId | text | field from the properties object |
role_name | text | field from the properties object |
scope | text | field from the properties object |
type | text | The role definition type. |
updated_by | text | field from the properties object |
updated_on | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
id | string | The role definition ID. |
name | string | The role definition name. |
properties | object | Role definition properties. |
type | string | The role definition type. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | roleDefinitionId, scope | Get role definition by ID (GUID). |
list | SELECT | scope | Get all role definitions that are applicable at scope and above. |
create_or_update | INSERT | roleDefinitionId, scope | Creates or updates a role definition. |
delete | DELETE | roleDefinitionId, scope | Deletes a role definition. |
SELECT
examples
Get all role definitions that are applicable at scope and above.
- vw_role_definitions
- role_definitions
SELECT
id,
name,
description,
assignable_scopes,
created_by,
created_on,
permissions,
roleDefinitionId,
role_name,
scope,
type,
updated_by,
updated_on
FROM azure.authorization.vw_role_definitions
WHERE scope = '{{ scope }}';
SELECT
id,
name,
properties,
type
FROM azure.authorization.role_definitions
WHERE scope = '{{ scope }}';
INSERT
example
Use the following StackQL query and manifest file to create a new role_definitions
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.authorization.role_definitions (
roleDefinitionId,
scope,
properties
)
SELECT
'{{ roleDefinitionId }}',
'{{ scope }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: id
value: string
- name: name
value: string
- name: type
value: string
- name: properties
value:
- name: roleName
value: string
- name: description
value: string
- name: type
value: string
- name: permissions
value:
- - name: actions
value:
- string
- name: notActions
value:
- string
- name: dataActions
value:
- string
- name: notDataActions
value:
- string
- name: assignableScopes
value:
- string
- name: createdOn
value: string
- name: updatedOn
value: string
- name: createdBy
value: string
- name: updatedBy
value: string
DELETE
example
Deletes the specified role_definitions
resource.
/*+ delete */
DELETE FROM azure.authorization.role_definitions
WHERE roleDefinitionId = '{{ roleDefinitionId }}'
AND scope = '{{ scope }}';