Skip to main content

iam_policy_assignments

Creates, updates, deletes, gets or lists an iam_policy_assignments resource.

Overview

Nameiam_policy_assignments
TypeResource
Idaws.quicksight.iam_policy_assignments

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
iam_policy_assignmentobjectInformation describing the IAM policy assignment.
request_idstringThe Amazon Web Services request ID for this operation.
statusintegerThe HTTP status of the request.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_iam_policy_assignmentselectaws_account_id, assignment_name, namespace, regionDescribes an existing IAM policy assignment, as specified by the assignment name.
list_iam_policy_assignmentsselectaws_account_id, namespace, regionassignment-status, next-token, max-resultsLists the IAM policy assignments in the current Amazon Quick Sight account.
create_iam_policy_assignmentinsertaws_account_id, namespace, region, AssignmentName, AssignmentStatusCreates 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_assignmentupdateaws_account_id, assignment_name, namespace, regionUpdates 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_assignmentdeleteaws_account_id, assignment_name, namespace, regionDeletes 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.

NameDatatypeDescription
assignment_namestringThe name of the assignment.
aws_account_idstringThe Amazon Web Services account ID where you want to delete the IAM policy assignment.
namespacestringThe namespace that contains the assignment.
regionstringAWS region (default: us-east-1)
assignment-statusstringThe status of the assignments.
max-resultsintegerThe maximum number of results to be returned per request.
next-tokenstringThe token for the next set of results, or null if there are no more results.

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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

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
;