StartPrimaryEmailUpdateCommand

Starts the process to update the primary email address for the specified account.

Example Syntax

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

import { AccountClient, StartPrimaryEmailUpdateCommand } from "@aws-sdk/client-account"; // ES Modules import
// const { AccountClient, StartPrimaryEmailUpdateCommand } = require("@aws-sdk/client-account"); // CommonJS import
const client = new AccountClient(config);
const input = { // StartPrimaryEmailUpdateRequest
  AccountId: "STRING_VALUE", // required
  PrimaryEmail: "STRING_VALUE", // required
};
const command = new StartPrimaryEmailUpdateCommand(input);
const response = await client.send(command);
// { // StartPrimaryEmailUpdateResponse
//   Status: "STRING_VALUE",
// };

StartPrimaryEmailUpdateCommand Input

Parameter
Type
Description
AccountId
Required
string | undefined

Specifies the 12-digit account ID number of the Amazon Web Services account that you want to access or modify with this operation. To use this parameter, the caller must be an identity in the organization's management account  or a delegated administrator account. The specified account ID must be a member account in the same organization. The organization must have all features enabled , and the organization must have trusted access  enabled for the Account Management service, and optionally a delegated admin  account assigned.

This operation can only be called from the management account or the delegated administrator account of an organization for a member account.

The management account can't specify its own AccountId.

PrimaryEmail
Required
string | undefined

The new primary email address (also known as the root user email address) to use in the specified account.

StartPrimaryEmailUpdateCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
Status
PrimaryEmailUpdateStatus | undefined

The status of the primary email update request.

Throws

Name
Fault
Details
AccessDeniedException
client

The operation failed because the calling identity doesn't have the minimum required permissions.

ConflictException
client

The request could not be processed because of a conflict in the current status of the resource. For example, this happens if you try to enable a Region that is currently being disabled (in a status of DISABLING).

InternalServerException
server

The operation failed because of an error internal to Amazon Web Services. Try your operation again later.

ResourceNotFoundException
client

The operation failed because it specified a resource that can't be found.

TooManyRequestsException
client

The operation failed because it was called too frequently and exceeded a throttle limit.

ValidationException
client

The operation failed because one of the input parameters was invalid.

AccountServiceException
Base exception class for all service exceptions from Account service.