role_management_policy_assignments
Creates, updates, deletes, gets or lists a role_management_policy_assignments resource.
Overview
| Name | role_management_policy_assignments |
| Type | Resource |
| Id | azure.authorization.role_management_policy_assignments |
Fields
The following fields are returned by SELECT queries:
- get
- list_for_scope
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
effectiveRules | array | The readonly computed rule applied to the policy. |
policyAssignmentProperties | object | Additional properties of scope, role definition and policy. |
policyId | string | The policy id role management policy assignment. |
roleDefinitionId | string | The role definition of management policy assignment. |
scope | string | The role management policy scope. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
effectiveRules | array | The readonly computed rule applied to the policy. |
policyAssignmentProperties | object | Additional properties of scope, role definition and policy. |
policyId | string | The policy id role management policy assignment. |
roleDefinitionId | string | The role definition of management policy assignment. |
scope | string | The role management policy scope. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | scope, role_management_policy_assignment_name | Get the specified role management policy assignment for a resource scope. | |
list_for_scope | select | scope | Gets role management assignment policies for a resource scope. | |
create | insert | scope, role_management_policy_assignment_name | Create a role management policy assignment. | |
delete | delete | scope, role_management_policy_assignment_name | Delete a role management policy assignment. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
role_management_policy_assignment_name | string | The name of format {guid_guid} the role management policy assignment to get. Required. |
scope | string | The fully qualified Azure Resource manager identifier of the resource. Required. |
SELECT examples
- get
- list_for_scope
Get the specified role management policy assignment for a resource scope.
SELECT
id,
name,
effectiveRules,
policyAssignmentProperties,
policyId,
roleDefinitionId,
scope,
systemData,
type
FROM azure.authorization.role_management_policy_assignments
WHERE scope = '{{ scope }}' -- required
AND role_management_policy_assignment_name = '{{ role_management_policy_assignment_name }}' -- required
;
Gets role management assignment policies for a resource scope.
SELECT
id,
name,
effectiveRules,
policyAssignmentProperties,
policyId,
roleDefinitionId,
scope,
systemData,
type
FROM azure.authorization.role_management_policy_assignments
WHERE scope = '{{ scope }}' -- required
;
INSERT examples
- create
- Manifest
Create a role management policy assignment.
INSERT INTO azure.authorization.role_management_policy_assignments (
properties,
scope,
role_management_policy_assignment_name
)
SELECT
'{{ properties }}',
'{{ scope }}',
'{{ role_management_policy_assignment_name }}'
RETURNING
id,
name,
properties,
systemData,
type
;
# Description fields are for documentation purposes
- name: role_management_policy_assignments
props:
- name: scope
value: "{{ scope }}"
description: Required parameter for the role_management_policy_assignments resource.
- name: role_management_policy_assignment_name
value: "{{ role_management_policy_assignment_name }}"
description: Required parameter for the role_management_policy_assignments resource.
- name: properties
description: |
Role management policy properties.
value:
scope: "{{ scope }}"
roleDefinitionId: "{{ roleDefinitionId }}"
policyId: "{{ policyId }}"
effectiveRules:
- id: "{{ id }}"
ruleType: "{{ ruleType }}"
target:
caller: "{{ caller }}"
operations:
- "{{ operations }}"
level: "{{ level }}"
targetObjects:
- "{{ targetObjects }}"
inheritableSettings:
- "{{ inheritableSettings }}"
enforcedSettings:
- "{{ enforcedSettings }}"
policyAssignmentProperties:
scope:
id: "{{ id }}"
displayName: "{{ displayName }}"
type: "{{ type }}"
roleDefinition:
id: "{{ id }}"
displayName: "{{ displayName }}"
type: "{{ type }}"
policy:
id: "{{ id }}"
lastModifiedBy:
id: "{{ id }}"
displayName: "{{ displayName }}"
type: "{{ type }}"
email: "{{ email }}"
lastModifiedDateTime: "{{ lastModifiedDateTime }}"
DELETE examples
- delete
Delete a role management policy assignment.
DELETE FROM azure.authorization.role_management_policy_assignments
WHERE scope = '{{ scope }}' --required
AND role_management_policy_assignment_name = '{{ role_management_policy_assignment_name }}' --required
;