We announced the upcoming end-of-support for AWS SDK for JavaScript v2.
We recommend that you migrate to AWS SDK for JavaScript v3. For dates, additional details, and information on how to migrate, please refer to the linked announcement.

Class: AWS.Account

Inherits:
AWS.Service show all
Identifier:
account
API Version:
2021-02-01
Defined in:
(unknown)

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Service Description

Operations for Amazon Web Services Account Management

Sending a Request Using Account

var account = new AWS.Account();
account.acceptPrimaryEmailUpdate(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the Account object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var account = new AWS.Account({apiVersion: '2021-02-01'});

You can also set the API version globally in AWS.config.apiVersions using the account service identifier:

AWS.config.apiVersions = {
  account: '2021-02-01',
  // other service API versions
};

var account = new AWS.Account();

Version:

  • 2021-02-01

Constructor Summary collapse

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService

Constructor Details

new AWS.Account(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Examples:

Constructing a Account object

var account = new AWS.Account({apiVersion: '2021-02-01'});

Options Hash (options):

  • params (map)

    An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.

  • endpoint (String|AWS.Endpoint)

    The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like 'https://{service}.{region}.amazonaws.com' or an Endpoint object.

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

    the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.

  • credentialProvider (AWS.CredentialProviderChain)

    the provider chain used to resolve credentials if no static credentials property is set.

  • region (String)

    the region to send service requests to. See AWS.Account.region for more information.

  • maxRetries (Integer)

    the maximum amount of retries to attempt with a request. See AWS.Account.maxRetries for more information.

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.Account.maxRedirects for more information.

  • sslEnabled (Boolean)

    whether to enable SSL for requests.

  • paramValidation (Boolean|map)

    whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:

    • min [Boolean] — Validates that a value meets the min constraint. This is enabled by default when paramValidation is set to true.
    • max [Boolean] — Validates that a value meets the max constraint.
    • pattern [Boolean] — Validates that a string value matches a regular expression.
    • enum [Boolean] — Validates that a string value matches one of the allowable enum values.
  • computeChecksums (Boolean)

    whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)

  • convertResponseTypes (Boolean)

    whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to true.

  • correctClockSkew (Boolean)

    whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to false.

  • s3ForcePathStyle (Boolean)

    whether to force path style URLs for S3 objects.

  • s3BucketEndpoint (Boolean)

    whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an endpoint to be provided explicitly to the service constructor.

  • s3DisableBodySigning (Boolean)

    whether S3 body signing should be disabled when using signature version v4. Body signing can only be disabled when using https. Defaults to true.

  • s3UsEast1RegionalEndpoint ('legacy'|'regional')

    when region is set to 'us-east-1', whether to send s3 request to global endpoints or 'us-east-1' regional endpoints. This config is only applicable to S3 client. Defaults to legacy

  • s3UseArnRegion (Boolean)

    whether to override the request region with the region inferred from requested resource's ARN. Only available for S3 buckets Defaults to true

  • retryDelayOptions (map)

    A set of options to configure the retry delay on retryable errors. Currently supported options are:

    • base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
    • customBackoff [function] — A custom function that accepts a retry count and error and returns the amount of time to delay in milliseconds. If the result is a non-zero negative value, no further retry attempts will be made. The base option will be ignored if this option is supplied. The function is only called for retryable errors.
  • httpOptions (map)

    A set of options to pass to the low-level HTTP request. Currently supported options are:

    • proxy [String] — the URL to proxy requests through
    • agent [http.Agent, https.Agent] — the Agent object to perform HTTP requests with. Used for connection pooling. Defaults to the global agent (http.globalAgent) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment.
    • connectTimeout [Integer] — Sets the socket to timeout after failing to establish a connection with the server after connectTimeout milliseconds. This timeout has no effect once a socket connection has been established.
    • timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
    • xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
    • xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
  • apiVersion (String, Date)

    a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by apiVersions). Specify 'latest' to use the latest possible version.

  • apiVersions (map<String, String|Date>)

    a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.

  • logger (#write, #log)

    an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests

  • systemClockOffset (Number)

    an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global AWS.config object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds.

  • signatureVersion (String)

    the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.

  • signatureCache (Boolean)

    whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to true.

  • dynamoDbCrc32 (Boolean)

    whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default: true.

  • useAccelerateEndpoint (Boolean)

    Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default: false.

  • clientSideMonitoring (Boolean)

    whether to collect and publish this client's performance metrics of all its API requests.

  • endpointDiscoveryEnabled (Boolean|undefined)

    whether to call operations with endpoints given by service dynamically. Setting this

  • endpointCacheSize (Number)

    the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000

  • hostPrefixEnabled (Boolean)

    whether to marshal request parameters to the prefix of hostname. Defaults to true.

  • stsRegionalEndpoints ('legacy'|'regional')

    whether to send sts request to global endpoints or regional endpoints. Defaults to 'legacy'.

  • useFipsEndpoint (Boolean)

    Enables FIPS compatible endpoints. Defaults to false.

  • useDualstackEndpoint (Boolean)

    Enables IPv6 dualstack endpoint. Defaults to false.

Property Details

endpointAWS.Endpoint (readwrite)

Returns an Endpoint object representing the endpoint URL for service requests.

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

Method Details

acceptPrimaryEmailUpdate(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the acceptPrimaryEmailUpdate operation

var params = {
  AccountId: 'STRING_VALUE', /* required */
  Otp: 'STRING_VALUE', /* required */
  PrimaryEmail: 'STRING_VALUE' /* required */
};
account.acceptPrimaryEmailUpdate(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AccountId — (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.

      Note: The management account can't specify its own AccountId.
    • Otp — (String)

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

    • PrimaryEmail — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Status — (String)

        Retrieves the status of the accepted primary email update request.

        Possible values include:
        • "PENDING"
        • "ACCEPTED"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteAlternateContact(params = {}, callback) ⇒ AWS.Request

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.

Note: 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.

Service Reference:

Examples:

Calling the deleteAlternateContact operation

var params = {
  AlternateContactType: BILLING | OPERATIONS | SECURITY, /* required */
  AccountId: 'STRING_VALUE'
};
account.deleteAlternateContact(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AccountId — (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.

      Note: 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 — (String)

      Specifies which of the alternate contacts to delete.

      Possible values include:
      • "BILLING"
      • "OPERATIONS"
      • "SECURITY"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

disableRegion(params = {}, callback) ⇒ AWS.Request

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

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

Service Reference:

Examples:

Calling the disableRegion operation

var params = {
  RegionName: 'STRING_VALUE', /* required */
  AccountId: 'STRING_VALUE'
};
account.disableRegion(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AccountId — (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.

      Note: 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 — (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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

enableRegion(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the enableRegion operation

var params = {
  RegionName: 'STRING_VALUE', /* required */
  AccountId: 'STRING_VALUE'
};
account.enableRegion(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AccountId — (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.

      Note: 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 — (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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getAlternateContact(params = {}, callback) ⇒ AWS.Request

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.

Note: 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.

Service Reference:

Examples:

Calling the getAlternateContact operation

var params = {
  AlternateContactType: BILLING | OPERATIONS | SECURITY, /* required */
  AccountId: 'STRING_VALUE'
};
account.getAlternateContact(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AccountId — (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.

      Note: 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 — (String)

      Specifies which alternate contact you want to retrieve.

      Possible values include:
      • "BILLING"
      • "OPERATIONS"
      • "SECURITY"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • AlternateContact — (map)

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

        • AlternateContactType — (String)

          The type of alternate contact.

          Possible values include:
          • "BILLING"
          • "OPERATIONS"
          • "SECURITY"
        • EmailAddress — (String)

          The email address associated with this alternate contact.

        • Name — (String)

          The name associated with this alternate contact.

        • PhoneNumber — (String)

          The phone number associated with this alternate contact.

        • Title — (String)

          The title associated with this alternate contact.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getContactInformation(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the getContactInformation operation

var params = {
  AccountId: 'STRING_VALUE'
};
account.getContactInformation(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AccountId — (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.

      Note: 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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ContactInformation — (map)

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

        • AddressLine1required — (String)

          The first line of the primary contact address.

        • AddressLine2 — (String)

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

        • AddressLine3 — (String)

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

        • Cityrequired — (String)

          The city of the primary contact address.

        • CompanyName — (String)

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

        • CountryCoderequired — (String)

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

        • DistrictOrCounty — (String)

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

        • FullNamerequired — (String)

          The full name of the primary contact address.

        • PhoneNumberrequired — (String)

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

        • PostalCoderequired — (String)

          The postal code of the primary contact address.

        • StateOrRegion — (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 — (String)

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

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getPrimaryEmail(params = {}, callback) ⇒ AWS.Request

Retrieves the primary email address for the specified account.

Service Reference:

Examples:

Calling the getPrimaryEmail operation

var params = {
  AccountId: 'STRING_VALUE' /* required */
};
account.getPrimaryEmail(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AccountId — (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.

      Note: The management account can't specify its own AccountId.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • PrimaryEmail — (String)

        Retrieves the primary email address associated with the specified account.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getRegionOptStatus(params = {}, callback) ⇒ AWS.Request

Retrieves the opt-in status of a particular Region.

Service Reference:

Examples:

Calling the getRegionOptStatus operation

var params = {
  RegionName: 'STRING_VALUE', /* required */
  AccountId: 'STRING_VALUE'
};
account.getRegionOptStatus(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AccountId — (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.

      Note: 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 — (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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • RegionName — (String)

        The Region code that was passed in.

      • RegionOptStatus — (String)

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

        Possible values include:
        • "ENABLED"
        • "ENABLING"
        • "DISABLING"
        • "DISABLED"
        • "ENABLED_BY_DEFAULT"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listRegions(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the listRegions operation

var params = {
  AccountId: 'STRING_VALUE',
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  RegionOptStatusContains: [
    ENABLED | ENABLING | DISABLING | DISABLED | ENABLED_BY_DEFAULT,
    /* more items */
  ]
};
account.listRegions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AccountId — (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.

      Note: 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 — (Integer)

      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 — (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 — (Array<String>)

      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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • NextToken — (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 — (Array<map>)

        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.

        • RegionName — (String)

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

        • RegionOptStatus — (String)

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

          Possible values include:
          • "ENABLED"
          • "ENABLING"
          • "DISABLING"
          • "DISABLED"
          • "ENABLED_BY_DEFAULT"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

putAlternateContact(params = {}, callback) ⇒ AWS.Request

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.

Note: 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.

Service Reference:

Examples:

Calling the putAlternateContact operation

var params = {
  AlternateContactType: BILLING | OPERATIONS | SECURITY, /* required */
  EmailAddress: 'STRING_VALUE', /* required */
  Name: 'STRING_VALUE', /* required */
  PhoneNumber: 'STRING_VALUE', /* required */
  Title: 'STRING_VALUE', /* required */
  AccountId: 'STRING_VALUE'
};
account.putAlternateContact(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AccountId — (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.

      Note: 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 — (String)

      Specifies which alternate contact you want to create or update.

      Possible values include:
      • "BILLING"
      • "OPERATIONS"
      • "SECURITY"
    • EmailAddress — (String)

      Specifies an email address for the alternate contact.

    • Name — (String)

      Specifies a name for the alternate contact.

    • PhoneNumber — (String)

      Specifies a phone number for the alternate contact.

    • Title — (String)

      Specifies a title for the alternate contact.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

putContactInformation(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the putContactInformation operation

var params = {
  ContactInformation: { /* required */
    AddressLine1: 'STRING_VALUE', /* required */
    City: 'STRING_VALUE', /* required */
    CountryCode: 'STRING_VALUE', /* required */
    FullName: 'STRING_VALUE', /* required */
    PhoneNumber: 'STRING_VALUE', /* required */
    PostalCode: 'STRING_VALUE', /* required */
    AddressLine2: 'STRING_VALUE',
    AddressLine3: 'STRING_VALUE',
    CompanyName: 'STRING_VALUE',
    DistrictOrCounty: 'STRING_VALUE',
    StateOrRegion: 'STRING_VALUE',
    WebsiteUrl: 'STRING_VALUE'
  },
  AccountId: 'STRING_VALUE'
};
account.putContactInformation(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AccountId — (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.

      Note: 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 — (map)

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

      • AddressLine1required — (String)

        The first line of the primary contact address.

      • AddressLine2 — (String)

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

      • AddressLine3 — (String)

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

      • Cityrequired — (String)

        The city of the primary contact address.

      • CompanyName — (String)

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

      • CountryCoderequired — (String)

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

      • DistrictOrCounty — (String)

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

      • FullNamerequired — (String)

        The full name of the primary contact address.

      • PhoneNumberrequired — (String)

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

      • PostalCoderequired — (String)

        The postal code of the primary contact address.

      • StateOrRegion — (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 — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

startPrimaryEmailUpdate(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the startPrimaryEmailUpdate operation

var params = {
  AccountId: 'STRING_VALUE', /* required */
  PrimaryEmail: 'STRING_VALUE' /* required */
};
account.startPrimaryEmailUpdate(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AccountId — (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.

      Note: The management account can't specify its own AccountId.
    • PrimaryEmail — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Status — (String)

        The status of the primary email update request.

        Possible values include:
        • "PENDING"
        • "ACCEPTED"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.