SDK for PHP 3.x

Client: Aws\Account\AccountClient
Service ID: account
Version: 2021-02-01

This page describes the parameters and results for the operations of the AWS Account (2021-02-01), and shows how to use the Aws\Account\AccountClient object to call the described operations. This documentation is specific to the 2021-02-01 API version of the service.

Operation Summary

Each of the following operations can be created from a client using $client->getCommand('CommandName'), where "CommandName" is the name of one of the following operations. Note: a command is a value that encapsulates an operation and the parameters used to create an HTTP request.

You can also create and send a command immediately using the magic methods available on a client object: $client->commandName(/* parameters */). You can send the command asynchronously (returning a promise) by appending the word "Async" to the operation name: $client->commandNameAsync(/* parameters */).

AcceptPrimaryEmailUpdate ( array $params = [] )
Accepts the request that originated from StartPrimaryEmailUpdate to update the primary email address (also known as the root user email address) for the specified account.
DeleteAlternateContact ( array $params = [] )
Deletes the specified alternate contact from an Amazon Web Services account.
DisableRegion ( array $params = [] )
Disables (opts-out) a particular Region for an account.
EnableRegion ( array $params = [] )
Enables (opts-in) a particular Region for an account.
GetAlternateContact ( array $params = [] )
Retrieves the specified alternate contact attached to an Amazon Web Services account.
GetContactInformation ( array $params = [] )
Retrieves the primary contact information of an Amazon Web Services account.
GetPrimaryEmail ( array $params = [] )
Retrieves the primary email address for the specified account.
GetRegionOptStatus ( array $params = [] )
Retrieves the opt-in status of a particular Region.
ListRegions ( array $params = [] )
Lists all the Regions for a given account and their respective opt-in statuses.
PutAlternateContact ( array $params = [] )
Modifies the specified alternate contact attached to an Amazon Web Services account.
PutContactInformation ( array $params = [] )
Updates the primary contact information of an Amazon Web Services account.
StartPrimaryEmailUpdate ( array $params = [] )
Starts the process to update the primary email address for the specified account.

Paginators

Paginators handle automatically iterating over paginated API results. Paginators are associated with specific API operations, and they accept the parameters that the corresponding API operation accepts. You can get a paginator from a client class using getPaginator($paginatorName, $operationParameters). This client supports the following paginators:

ListRegions

Operations

AcceptPrimaryEmailUpdate

$result = $client->acceptPrimaryEmailUpdate([/* ... */]);
$promise = $client->acceptPrimaryEmailUpdateAsync([/* ... */]);

Accepts the request that originated from StartPrimaryEmailUpdate to update the primary email address (also known as the root user email address) for the specified account.

Parameter Syntax

$result = $client->acceptPrimaryEmailUpdate([
    'AccountId' => '<string>', // REQUIRED
    'Otp' => '<string>', // REQUIRED
    'PrimaryEmail' => '<string>', // REQUIRED
]);

Parameter Details

Members
AccountId
Required: Yes
Type: string

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.

Otp
Required: Yes
Type: string

The OTP code sent to the PrimaryEmail specified on the StartPrimaryEmailUpdate API call.

PrimaryEmail
Required: Yes
Type: string

The new primary email address for use with the specified account. This must match the PrimaryEmail from the StartPrimaryEmailUpdate API call.

Result Syntax

[
    'Status' => 'PENDING|ACCEPTED',
]

Result Details

Members
Status
Type: string

Retrieves the status of the accepted primary email update request.

Errors

ResourceNotFoundException:

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

ValidationException:

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

ConflictException:

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).

AccessDeniedException:

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

TooManyRequestsException:

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

InternalServerException:

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

DeleteAlternateContact

$result = $client->deleteAlternateContact([/* ... */]);
$promise = $client->deleteAlternateContactAsync([/* ... */]);

Deletes the specified alternate contact from an Amazon Web Services account.

For complete details about how to use the alternate contact operations, see Access or updating the alternate contacts.

Before you can update the alternate contact information for an Amazon Web Services account that is managed by Organizations, you must first enable integration between Amazon Web Services Account Management and Organizations. For more information, see Enabling trusted access for Amazon Web Services Account Management.

Parameter Syntax

$result = $client->deleteAlternateContact([
    'AccountId' => '<string>',
    'AlternateContactType' => 'BILLING|OPERATIONS|SECURITY', // REQUIRED
]);

Parameter Details

Members
AccountId
Type: string

Specifies the 12 digit account ID number of the Amazon Web Services account that you want to access or modify with this operation.

If you do not specify this parameter, it defaults to the Amazon Web Services account of the identity used to call the operation.

To use this parameter, the caller must be an identity in the organization's management account or a delegated administrator account, and 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.

The management account can't specify its own AccountId; it must call the operation in standalone context by not including the AccountId parameter.

To call this operation on an account that is not a member of an organization, then don't specify this parameter, and call the operation using an identity belonging to the account whose contacts you wish to retrieve or modify.

AlternateContactType
Required: Yes
Type: string

Specifies which of the alternate contacts to delete.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ResourceNotFoundException:

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

ValidationException:

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

AccessDeniedException:

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

TooManyRequestsException:

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

InternalServerException:

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

DisableRegion

$result = $client->disableRegion([/* ... */]);
$promise = $client->disableRegionAsync([/* ... */]);

Disables (opts-out) a particular Region for an account.

The act of disabling a Region will remove all IAM access to any resources that reside in that Region.

Parameter Syntax

$result = $client->disableRegion([
    'AccountId' => '<string>',
    'RegionName' => '<string>', // REQUIRED
]);

Parameter Details

Members
AccountId
Type: string

Specifies the 12-digit account ID number of the Amazon Web Services account that you want to access or modify with this operation. If you don't specify this parameter, it defaults to the Amazon Web Services account of the identity used to call the 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.

The management account can't specify its own AccountId. It must call the operation in standalone context by not including the AccountId parameter.

To call this operation on an account that is not a member of an organization, don't specify this parameter. Instead, call the operation using an identity belonging to the account whose contacts you wish to retrieve or modify.

RegionName
Required: Yes
Type: string

Specifies the Region-code for a given Region name (for example, af-south-1). When you disable a Region, Amazon Web Services performs actions to deactivate that Region in your account, such as destroying IAM resources in the Region. This process takes a few minutes for most accounts, but this can take several hours. You cannot enable the Region until the disabling process is fully completed.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

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

ConflictException:

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).

AccessDeniedException:

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

TooManyRequestsException:

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

InternalServerException:

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

EnableRegion

$result = $client->enableRegion([/* ... */]);
$promise = $client->enableRegionAsync([/* ... */]);

Enables (opts-in) a particular Region for an account.

Parameter Syntax

$result = $client->enableRegion([
    'AccountId' => '<string>',
    'RegionName' => '<string>', // REQUIRED
]);

Parameter Details

Members
AccountId
Type: string

Specifies the 12-digit account ID number of the Amazon Web Services account that you want to access or modify with this operation. If you don't specify this parameter, it defaults to the Amazon Web Services account of the identity used to call the 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.

The management account can't specify its own AccountId. It must call the operation in standalone context by not including the AccountId parameter.

To call this operation on an account that is not a member of an organization, don't specify this parameter. Instead, call the operation using an identity belonging to the account whose contacts you wish to retrieve or modify.

RegionName
Required: Yes
Type: string

Specifies the Region-code for a given Region name (for example, af-south-1). When you enable a Region, Amazon Web Services performs actions to prepare your account in that Region, such as distributing your IAM resources to the Region. This process takes a few minutes for most accounts, but it can take several hours. You cannot use the Region until this process is complete. Furthermore, you cannot disable the Region until the enabling process is fully completed.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

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

ConflictException:

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).

AccessDeniedException:

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

TooManyRequestsException:

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

InternalServerException:

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

GetAlternateContact

$result = $client->getAlternateContact([/* ... */]);
$promise = $client->getAlternateContactAsync([/* ... */]);

Retrieves the specified alternate contact attached to an Amazon Web Services account.

For complete details about how to use the alternate contact operations, see Access or updating the alternate contacts.

Before you can update the alternate contact information for an Amazon Web Services account that is managed by Organizations, you must first enable integration between Amazon Web Services Account Management and Organizations. For more information, see Enabling trusted access for Amazon Web Services Account Management.

Parameter Syntax

$result = $client->getAlternateContact([
    'AccountId' => '<string>',
    'AlternateContactType' => 'BILLING|OPERATIONS|SECURITY', // REQUIRED
]);

Parameter Details

Members
AccountId
Type: string

Specifies the 12 digit account ID number of the Amazon Web Services account that you want to access or modify with this operation.

If you do not specify this parameter, it defaults to the Amazon Web Services account of the identity used to call the operation.

To use this parameter, the caller must be an identity in the organization's management account or a delegated administrator account, and 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.

The management account can't specify its own AccountId; it must call the operation in standalone context by not including the AccountId parameter.

To call this operation on an account that is not a member of an organization, then don't specify this parameter, and call the operation using an identity belonging to the account whose contacts you wish to retrieve or modify.

AlternateContactType
Required: Yes
Type: string

Specifies which alternate contact you want to retrieve.

Result Syntax

[
    'AlternateContact' => [
        'AlternateContactType' => 'BILLING|OPERATIONS|SECURITY',
        'EmailAddress' => '<string>',
        'Name' => '<string>',
        'PhoneNumber' => '<string>',
        'Title' => '<string>',
    ],
]

Result Details

Members
AlternateContact
Type: AlternateContact structure

A structure that contains the details for the specified alternate contact.

Errors

ResourceNotFoundException:

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

ValidationException:

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

AccessDeniedException:

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

TooManyRequestsException:

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

InternalServerException:

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

GetContactInformation

$result = $client->getContactInformation([/* ... */]);
$promise = $client->getContactInformationAsync([/* ... */]);

Retrieves the primary contact information of an Amazon Web Services account.

For complete details about how to use the primary contact operations, see Update the primary and alternate contact information.

Parameter Syntax

$result = $client->getContactInformation([
    'AccountId' => '<string>',
]);

Parameter Details

Members
AccountId
Type: string

Specifies the 12-digit account ID number of the Amazon Web Services account that you want to access or modify with this operation. If you don't specify this parameter, it defaults to the Amazon Web Services account of the identity used to call the 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.

The management account can't specify its own AccountId. It must call the operation in standalone context by not including the AccountId parameter.

To call this operation on an account that is not a member of an organization, don't specify this parameter. Instead, call the operation using an identity belonging to the account whose contacts you wish to retrieve or modify.

Result Syntax

[
    'ContactInformation' => [
        'AddressLine1' => '<string>',
        'AddressLine2' => '<string>',
        'AddressLine3' => '<string>',
        'City' => '<string>',
        'CompanyName' => '<string>',
        'CountryCode' => '<string>',
        'DistrictOrCounty' => '<string>',
        'FullName' => '<string>',
        'PhoneNumber' => '<string>',
        'PostalCode' => '<string>',
        'StateOrRegion' => '<string>',
        'WebsiteUrl' => '<string>',
    ],
]

Result Details

Members
ContactInformation
Type: ContactInformation structure

Contains the details of the primary contact information associated with an Amazon Web Services account.

Errors

ResourceNotFoundException:

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

ValidationException:

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

AccessDeniedException:

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

TooManyRequestsException:

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

InternalServerException:

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

GetPrimaryEmail

$result = $client->getPrimaryEmail([/* ... */]);
$promise = $client->getPrimaryEmailAsync([/* ... */]);

Retrieves the primary email address for the specified account.

Parameter Syntax

$result = $client->getPrimaryEmail([
    'AccountId' => '<string>', // REQUIRED
]);

Parameter Details

Members
AccountId
Required: Yes
Type: string

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.

Result Syntax

[
    'PrimaryEmail' => '<string>',
]

Result Details

Members
PrimaryEmail
Type: string

Retrieves the primary email address associated with the specified account.

Errors

ResourceNotFoundException:

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

ValidationException:

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

AccessDeniedException:

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

TooManyRequestsException:

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

InternalServerException:

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

GetRegionOptStatus

$result = $client->getRegionOptStatus([/* ... */]);
$promise = $client->getRegionOptStatusAsync([/* ... */]);

Retrieves the opt-in status of a particular Region.

Parameter Syntax

$result = $client->getRegionOptStatus([
    'AccountId' => '<string>',
    'RegionName' => '<string>', // REQUIRED
]);

Parameter Details

Members
AccountId
Type: string

Specifies the 12-digit account ID number of the Amazon Web Services account that you want to access or modify with this operation. If you don't specify this parameter, it defaults to the Amazon Web Services account of the identity used to call the 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.

The management account can't specify its own AccountId. It must call the operation in standalone context by not including the AccountId parameter.

To call this operation on an account that is not a member of an organization, don't specify this parameter. Instead, call the operation using an identity belonging to the account whose contacts you wish to retrieve or modify.

RegionName
Required: Yes
Type: string

Specifies the Region-code for a given Region name (for example, af-south-1). This function will return the status of whatever Region you pass into this parameter.

Result Syntax

[
    'RegionName' => '<string>',
    'RegionOptStatus' => 'ENABLED|ENABLING|DISABLING|DISABLED|ENABLED_BY_DEFAULT',
]

Result Details

Members
RegionName
Type: string

The Region code that was passed in.

RegionOptStatus
Type: string

One of the potential statuses a Region can undergo (Enabled, Enabling, Disabled, Disabling, Enabled_By_Default).

Errors

ValidationException:

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

AccessDeniedException:

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

TooManyRequestsException:

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

InternalServerException:

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

ListRegions

$result = $client->listRegions([/* ... */]);
$promise = $client->listRegionsAsync([/* ... */]);

Lists all the Regions for a given account and their respective opt-in statuses. Optionally, this list can be filtered by the region-opt-status-contains parameter.

Parameter Syntax

$result = $client->listRegions([
    'AccountId' => '<string>',
    'MaxResults' => <integer>,
    'NextToken' => '<string>',
    'RegionOptStatusContains' => ['<string>', ...],
]);

Parameter Details

Members
AccountId
Type: string

Specifies the 12-digit account ID number of the Amazon Web Services account that you want to access or modify with this operation. If you don't specify this parameter, it defaults to the Amazon Web Services account of the identity used to call the 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.

The management account can't specify its own AccountId. It must call the operation in standalone context by not including the AccountId parameter.

To call this operation on an account that is not a member of an organization, don't specify this parameter. Instead, call the operation using an identity belonging to the account whose contacts you wish to retrieve or modify.

MaxResults
Type: int

The total number of items to return in the command’s output. If the total number of items available is more than the value specified, a NextToken is provided in the command’s output. To resume pagination, provide the NextToken value in the starting-token argument of a subsequent command. Do not use the NextToken response element directly outside of the Amazon Web Services CLI. For usage examples, see Pagination in the Amazon Web Services Command Line Interface User Guide.

NextToken
Type: string

A token used to specify where to start paginating. This is the NextToken from a previously truncated response. For usage examples, see Pagination in the Amazon Web Services Command Line Interface User Guide.

RegionOptStatusContains
Type: Array of strings

A list of Region statuses (Enabling, Enabled, Disabling, Disabled, Enabled_by_default) to use to filter the list of Regions for a given account. For example, passing in a value of ENABLING will only return a list of Regions with a Region status of ENABLING.

Result Syntax

[
    'NextToken' => '<string>',
    'Regions' => [
        [
            'RegionName' => '<string>',
            'RegionOptStatus' => 'ENABLED|ENABLING|DISABLING|DISABLED|ENABLED_BY_DEFAULT',
        ],
        // ...
    ],
]

Result Details

Members
NextToken
Type: string

If there is more data to be returned, this will be populated. It should be passed into the next-token request parameter of list-regions.

Regions
Type: Array of Region structures

This is a list of Regions for a given account, or if the filtered parameter was used, a list of Regions that match the filter criteria set in the filter parameter.

Errors

ValidationException:

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

AccessDeniedException:

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

TooManyRequestsException:

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

InternalServerException:

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

PutAlternateContact

$result = $client->putAlternateContact([/* ... */]);
$promise = $client->putAlternateContactAsync([/* ... */]);

Modifies the specified alternate contact attached to an Amazon Web Services account.

For complete details about how to use the alternate contact operations, see Access or updating the alternate contacts.

Before you can update the alternate contact information for an Amazon Web Services account that is managed by Organizations, you must first enable integration between Amazon Web Services Account Management and Organizations. For more information, see Enabling trusted access for Amazon Web Services Account Management.

Parameter Syntax

$result = $client->putAlternateContact([
    'AccountId' => '<string>',
    'AlternateContactType' => 'BILLING|OPERATIONS|SECURITY', // REQUIRED
    'EmailAddress' => '<string>', // REQUIRED
    'Name' => '<string>', // REQUIRED
    'PhoneNumber' => '<string>', // REQUIRED
    'Title' => '<string>', // REQUIRED
]);

Parameter Details

Members
AccountId
Type: string

Specifies the 12 digit account ID number of the Amazon Web Services account that you want to access or modify with this operation.

If you do not specify this parameter, it defaults to the Amazon Web Services account of the identity used to call the operation.

To use this parameter, the caller must be an identity in the organization's management account or a delegated administrator account, and 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.

The management account can't specify its own AccountId; it must call the operation in standalone context by not including the AccountId parameter.

To call this operation on an account that is not a member of an organization, then don't specify this parameter, and call the operation using an identity belonging to the account whose contacts you wish to retrieve or modify.

AlternateContactType
Required: Yes
Type: string

Specifies which alternate contact you want to create or update.

EmailAddress
Required: Yes
Type: string

Specifies an email address for the alternate contact.

Name
Required: Yes
Type: string

Specifies a name for the alternate contact.

PhoneNumber
Required: Yes
Type: string

Specifies a phone number for the alternate contact.

Title
Required: Yes
Type: string

Specifies a title for the alternate contact.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

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

AccessDeniedException:

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

TooManyRequestsException:

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

InternalServerException:

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

PutContactInformation

$result = $client->putContactInformation([/* ... */]);
$promise = $client->putContactInformationAsync([/* ... */]);

Updates the primary contact information of an Amazon Web Services account.

For complete details about how to use the primary contact operations, see Update the primary and alternate contact information.

Parameter Syntax

$result = $client->putContactInformation([
    'AccountId' => '<string>',
    'ContactInformation' => [ // REQUIRED
        'AddressLine1' => '<string>', // REQUIRED
        'AddressLine2' => '<string>',
        'AddressLine3' => '<string>',
        'City' => '<string>', // REQUIRED
        'CompanyName' => '<string>',
        'CountryCode' => '<string>', // REQUIRED
        'DistrictOrCounty' => '<string>',
        'FullName' => '<string>', // REQUIRED
        'PhoneNumber' => '<string>', // REQUIRED
        'PostalCode' => '<string>', // REQUIRED
        'StateOrRegion' => '<string>',
        'WebsiteUrl' => '<string>',
    ],
]);

Parameter Details

Members
AccountId
Type: string

Specifies the 12-digit account ID number of the Amazon Web Services account that you want to access or modify with this operation. If you don't specify this parameter, it defaults to the Amazon Web Services account of the identity used to call the 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.

The management account can't specify its own AccountId. It must call the operation in standalone context by not including the AccountId parameter.

To call this operation on an account that is not a member of an organization, don't specify this parameter. Instead, call the operation using an identity belonging to the account whose contacts you wish to retrieve or modify.

ContactInformation
Required: Yes
Type: ContactInformation structure

Contains the details of the primary contact information associated with an Amazon Web Services account.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

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

AccessDeniedException:

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

TooManyRequestsException:

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

InternalServerException:

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

StartPrimaryEmailUpdate

$result = $client->startPrimaryEmailUpdate([/* ... */]);
$promise = $client->startPrimaryEmailUpdateAsync([/* ... */]);

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

Parameter Syntax

$result = $client->startPrimaryEmailUpdate([
    'AccountId' => '<string>', // REQUIRED
    'PrimaryEmail' => '<string>', // REQUIRED
]);

Parameter Details

Members
AccountId
Required: Yes
Type: string

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: Yes
Type: string

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

Result Syntax

[
    'Status' => 'PENDING|ACCEPTED',
]

Result Details

Members
Status
Type: string

The status of the primary email update request.

Errors

ResourceNotFoundException:

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

ValidationException:

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

ConflictException:

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).

AccessDeniedException:

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

TooManyRequestsException:

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

InternalServerException:

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

Shapes

AccessDeniedException

Description

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

Members
message
Required: Yes
Type: string

AlternateContact

Description

A structure that contains the details of an alternate contact associated with an Amazon Web Services account

Members
AlternateContactType
Type: string

The type of alternate contact.

EmailAddress
Type: string

The email address associated with this alternate contact.

Name
Type: string

The name associated with this alternate contact.

PhoneNumber
Type: string

The phone number associated with this alternate contact.

Title
Type: string

The title associated with this alternate contact.

ConflictException

Description

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).

Members
message
Required: Yes
Type: string

ContactInformation

Description

Contains the details of the primary contact information associated with an Amazon Web Services account.

Members
AddressLine1
Required: Yes
Type: string

The first line of the primary contact address.

AddressLine2
Type: string

The second line of the primary contact address, if any.

AddressLine3
Type: string

The third line of the primary contact address, if any.

City
Required: Yes
Type: string

The city of the primary contact address.

CompanyName
Type: string

The name of the company associated with the primary contact information, if any.

CountryCode
Required: Yes
Type: string

The ISO-3166 two-letter country code for the primary contact address.

DistrictOrCounty
Type: string

The district or county of the primary contact address, if any.

FullName
Required: Yes
Type: string

The full name of the primary contact address.

PhoneNumber
Required: Yes
Type: string

The phone number of the primary contact information. The number will be validated and, in some countries, checked for activation.

PostalCode
Required: Yes
Type: string

The postal code of the primary contact address.

StateOrRegion
Type: string

The state or region of the primary contact address. If the mailing address is within the United States (US), the value in this field can be either a two character state code (for example, NJ) or the full state name (for example, New Jersey). This field is required in the following countries: US, CA, GB, DE, JP, IN, and BR.

WebsiteUrl
Type: string

The URL of the website associated with the primary contact information, if any.

InternalServerException

Description

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

Members
message
Required: Yes
Type: string

Region

Description

This is a structure that expresses the Region for a given account, consisting of a name and opt-in status.

Members
RegionName
Type: string

The Region code of a given Region (for example, us-east-1).

RegionOptStatus
Type: string

One of potential statuses a Region can undergo (Enabled, Enabling, Disabled, Disabling, Enabled_By_Default).

ResourceNotFoundException

Description

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

Members
message
Required: Yes
Type: string

TooManyRequestsException

Description

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

Members
message
Required: Yes
Type: string

ValidationException

Description

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

Members
fieldList
Type: Array of ValidationExceptionField structures

The field where the invalid entry was detected.

message
Required: Yes
Type: string

The message that informs you about what was invalid about the request.

reason
Type: string

The reason that validation failed.

ValidationExceptionField

Description

The input failed to meet the constraints specified by the Amazon Web Services service in a specified field.

Members
message
Required: Yes
Type: string

A message about the validation exception.

name
Required: Yes
Type: string

The field name where the invalid entry was detected.