iam_policy_assignments
Creates, updates, deletes, gets or lists an iam_policy_assignments resource.
Overview
| Name | iam_policy_assignments |
| Type | Resource |
| Id | aws.quicksight.iam_policy_assignments |
Fields
The following fields are returned by SELECT queries:
- describe_iam_policy_assignment
- list_iam_policy_assignments
| Name | Datatype | Description |
|---|---|---|
iam_policy_assignment | object | Information describing the IAM policy assignment. |
request_id | string | The Amazon Web Services request ID for this operation. |
status | integer | The HTTP status of the request. |
| Name | Datatype | Description |
|---|---|---|
assignment_name | string | Assignment name. (pattern: <code>(?=^.{2,256}$)(?!.\s)[0-9a-zA-Z-_.:=+@]$</code>) |
assignment_status | string | Assignment status. (ENABLED, DRAFT, DISABLED) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_iam_policy_assignment | select | aws_account_id, assignment_name, namespace, region | Describes an existing IAM policy assignment, as specified by the assignment name. | |
list_iam_policy_assignments | select | aws_account_id, namespace, region | assignment-status, next-token, max-results | Lists the IAM policy assignments in the current Amazon Quick Sight account. |
create_iam_policy_assignment | insert | aws_account_id, namespace, region, AssignmentName, AssignmentStatus | Creates an assignment with one specified IAM policy, identified by its Amazon Resource Name (ARN). This policy assignment is attached to the specified groups or users of Amazon Quick Sight. Assignment names are unique per Amazon Web Services account. To avoid overwriting rules in other namespaces, use assignment names that are unique. | |
update_iam_policy_assignment | update | aws_account_id, assignment_name, namespace, region | Updates an existing IAM policy assignment. This operation updates only the optional parameter or parameters that are specified in the request. This overwrites all of the users included in Identities. | |
delete_iam_policy_assignment | delete | aws_account_id, assignment_name, namespace, region | Deletes an existing IAM 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 |
|---|---|---|
assignment_name | string | The name of the assignment. |
aws_account_id | string | The Amazon Web Services account ID where you want to delete the IAM policy assignment. |
namespace | string | The namespace that contains the assignment. |
region | string | AWS region (default: us-east-1) |
assignment-status | string | The status of the assignments. |
max-results | integer | The maximum number of results to be returned per request. |
next-token | string | The token for the next set of results, or null if there are no more results. |
SELECT examples
- describe_iam_policy_assignment
- list_iam_policy_assignments
Describes an existing IAM policy assignment, as specified by the assignment name.
SELECT
iam_policy_assignment,
request_id,
status
FROM aws.quicksight.iam_policy_assignments
WHERE aws_account_id = '{{ aws_account_id }}' -- required
AND assignment_name = '{{ assignment_name }}' -- required
AND namespace = '{{ namespace }}' -- required
AND region = '{{ region }}' -- required
;
Lists the IAM policy assignments in the current Amazon Quick Sight account.
SELECT
assignment_name,
assignment_status
FROM aws.quicksight.iam_policy_assignments
WHERE aws_account_id = '{{ aws_account_id }}' -- required
AND namespace = '{{ namespace }}' -- required
AND region = '{{ region }}' -- required
AND `assignment-status` = '{{ assignment-status }}'
AND `next-token` = '{{ next-token }}'
AND `max-results` = '{{ max-results }}'
;
INSERT examples
- create_iam_policy_assignment
- Manifest
Creates an assignment with one specified IAM policy, identified by its Amazon Resource Name (ARN). This policy assignment is attached to the specified groups or users of Amazon Quick Sight. Assignment names are unique per Amazon Web Services account. To avoid overwriting rules in other namespaces, use assignment names that are unique.
INSERT INTO aws.quicksight.iam_policy_assignments (
AssignmentName,
AssignmentStatus,
PolicyArn,
Identities,
aws_account_id,
namespace,
region
)
SELECT
'{{ AssignmentName }}' /* required */,
'{{ AssignmentStatus }}' /* required */,
'{{ PolicyArn }}',
'{{ Identities }}',
'{{ aws_account_id }}',
'{{ namespace }}',
'{{ region }}'
RETURNING
assignment_id,
assignment_name,
assignment_status,
identities,
policy_arn,
request_id,
status
;
# Description fields are for documentation purposes
- name: iam_policy_assignments
props:
- name: aws_account_id
value: "{{ aws_account_id }}"
description: Required parameter for the iam_policy_assignments resource.
- name: namespace
value: "{{ namespace }}"
description: Required parameter for the iam_policy_assignments resource.
- name: region
value: "{{ region }}"
description: Required parameter for the iam_policy_assignments resource.
- name: AssignmentName
value: "{{ AssignmentName }}"
- name: AssignmentStatus
value: "{{ AssignmentStatus }}"
valid_values: ['ENABLED', 'DRAFT', 'DISABLED']
- name: PolicyArn
value: "{{ PolicyArn }}"
- name: Identities
value: "{{ Identities }}"
UPDATE examples
- update_iam_policy_assignment
Updates an existing IAM policy assignment. This operation updates only the optional parameter or parameters that are specified in the request. This overwrites all of the users included in Identities.
UPDATE aws.quicksight.iam_policy_assignments
SET
AssignmentStatus = '{{ AssignmentStatus }}',
PolicyArn = '{{ PolicyArn }}',
Identities = '{{ Identities }}'
WHERE
aws_account_id = '{{ aws_account_id }}' --required
AND assignment_name = '{{ assignment_name }}' --required
AND namespace = '{{ namespace }}' --required
AND region = '{{ region }}' --required
RETURNING
assignment_id,
assignment_name,
assignment_status,
identities,
policy_arn,
request_id,
status;
DELETE examples
- delete_iam_policy_assignment
Deletes an existing IAM policy assignment.
DELETE FROM aws.quicksight.iam_policy_assignments
WHERE aws_account_id = '{{ aws_account_id }}' --required
AND assignment_name = '{{ assignment_name }}' --required
AND namespace = '{{ namespace }}' --required
AND region = '{{ region }}' --required
;