UpdateImpersonationRoleCommand

Updates an impersonation role for the given WorkMail organization.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { WorkMailClient, UpdateImpersonationRoleCommand } from "@aws-sdk/client-workmail"; // ES Modules import
// const { WorkMailClient, UpdateImpersonationRoleCommand } = require("@aws-sdk/client-workmail"); // CommonJS import
const client = new WorkMailClient(config);
const input = { // UpdateImpersonationRoleRequest
  OrganizationId: "STRING_VALUE", // required
  ImpersonationRoleId: "STRING_VALUE", // required
  Name: "STRING_VALUE", // required
  Type: "FULL_ACCESS" || "READ_ONLY", // required
  Description: "STRING_VALUE",
  Rules: [ // ImpersonationRuleList // required
    { // ImpersonationRule
      ImpersonationRuleId: "STRING_VALUE", // required
      Name: "STRING_VALUE",
      Description: "STRING_VALUE",
      Effect: "ALLOW" || "DENY", // required
      TargetUsers: [ // TargetUsers
        "STRING_VALUE",
      ],
      NotTargetUsers: [
        "STRING_VALUE",
      ],
    },
  ],
};
const command = new UpdateImpersonationRoleCommand(input);
const response = await client.send(command);
// {};

UpdateImpersonationRoleCommand Input

Parameter
Type
Description
ImpersonationRoleId
Required
string | undefined

The ID of the impersonation role to update.

Name
Required
string | undefined

The updated impersonation role name.

OrganizationId
Required
string | undefined

The WorkMail organization that contains the impersonation role to update.

Rules
Required
ImpersonationRule[] | undefined

The updated list of rules.

Type
Required
ImpersonationRoleType | undefined

The updated impersonation role type.

Description
string | undefined

The updated impersonation role description.

UpdateImpersonationRoleCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.

Throws

Name
Fault
Details
EntityNotFoundException
client

The identifier supplied for the user, group, or resource does not exist in your organization.

EntityStateException
client

You are performing an operation on a user, group, or resource that isn't in the expected state, such as trying to delete an active user.

InvalidParameterException
client

One or more of the input parameters don't match the service's restrictions.

LimitExceededException
client

The request exceeds the limit of the resource.

OrganizationNotFoundException
client

An operation received a valid organization identifier that either doesn't belong or exist in the system.

OrganizationStateException
client

The organization must have a valid state to perform certain operations on the organization or its members.

ResourceNotFoundException
client

The resource cannot be found.

WorkMailServiceException
Base exception class for all service exceptions from WorkMail service.