- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
UpdateIAMPolicyAssignmentCommand
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
.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { QuickSightClient, UpdateIAMPolicyAssignmentCommand } from "@aws-sdk/client-quicksight"; // ES Modules import
// const { QuickSightClient, UpdateIAMPolicyAssignmentCommand } = require("@aws-sdk/client-quicksight"); // CommonJS import
const client = new QuickSightClient(config);
const input = { // UpdateIAMPolicyAssignmentRequest
AwsAccountId: "STRING_VALUE", // required
AssignmentName: "STRING_VALUE", // required
Namespace: "STRING_VALUE", // required
AssignmentStatus: "ENABLED" || "DRAFT" || "DISABLED",
PolicyArn: "STRING_VALUE",
Identities: { // IdentityMap
"<keys>": [ // IdentityNameList
"STRING_VALUE",
],
},
};
const command = new UpdateIAMPolicyAssignmentCommand(input);
const response = await client.send(command);
// { // UpdateIAMPolicyAssignmentResponse
// AssignmentName: "STRING_VALUE",
// AssignmentId: "STRING_VALUE",
// PolicyArn: "STRING_VALUE",
// Identities: { // IdentityMap
// "<keys>": [ // IdentityNameList
// "STRING_VALUE",
// ],
// },
// AssignmentStatus: "ENABLED" || "DRAFT" || "DISABLED",
// RequestId: "STRING_VALUE",
// Status: Number("int"),
// };
UpdateIAMPolicyAssignmentCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
AssignmentName Required | string | undefined | The name of the assignment, also called a rule. The name must be unique within the Amazon Web Services account. |
AwsAccountId Required | string | undefined | The ID of the Amazon Web Services account that contains the IAM policy assignment. |
Namespace Required | string | undefined | The namespace of the assignment. |
AssignmentStatus | AssignmentStatus | undefined | The status of the assignment. Possible values are as follows:
|
Identities | Record<string, string[]> | undefined | The Amazon QuickSight users, groups, or both that you want to assign the policy to. |
PolicyArn | string | undefined | The ARN for the IAM policy to apply to the Amazon QuickSight users and groups specified in this assignment. |
UpdateIAMPolicyAssignmentCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
AssignmentId | string | undefined | The ID of the assignment. |
AssignmentName | string | undefined | The name of the assignment or rule. |
AssignmentStatus | AssignmentStatus | undefined | The status of the assignment. Possible values are as follows:
|
Identities | Record<string, string[]> | undefined | The Amazon QuickSight users, groups, or both that the IAM policy is assigned to. |
PolicyArn | string | undefined | The ARN for the IAM policy applied to the Amazon QuickSight users and groups specified in this assignment. |
RequestId | string | undefined | The Amazon Web Services request ID for this operation. |
Status | number | undefined | The HTTP status of the request. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | You don't have access to this item. The provided credentials couldn't be validated. You might not be authorized to carry out the request. Make sure that your account is authorized to use the Amazon QuickSight service, that your policies have the correct permissions, and that you are using the correct credentials. |
ConcurrentUpdatingException | server | A resource is already in a state that indicates an operation is happening that must complete before a new update can be applied. |
InternalFailureException | server | An internal failure occurred. |
InvalidParameterValueException | client | One or more parameters has a value that isn't valid. |
ResourceExistsException | client | The resource specified already exists. |
ResourceNotFoundException | client | One or more resources can't be found. |
ThrottlingException | client | Access is throttled. |
QuickSightServiceException | Base exception class for all service exceptions from QuickSight service. |