AWS Organizations

2017/10/23 - AWS Organizations - 11 updated api methods

Changes  This release supports integrating other AWS services with AWS Organizations through the use of an IAM service-linked role called AWSServiceRoleForOrganizations. Certain operations automatically create that role if it does not already exist.

AcceptHandshake (updated) Link ¶
Changes (response)
{'Handshake': {'Action': ['ADD_ORGANIZATIONS_SERVICE_LINKED_ROLE']}}

Sends a response to the originator of a handshake agreeing to the action proposed by the handshake request.

This operation can be called only by the following principals when they also have the relevant IAM permissions:

  • Invitation to join or Approve all features request handshakes: only a principal from the member account. The user who calls the API for an invitation to join must have the organizations:AcceptHandshake permission. If you enabled all features in the organization, then the user must also have the iam:CreateServiceLinkedRole permission so that Organizations can create the required service-linked role named OrgsServiceLinkedRoleName . For more information, see AWS Organizations and Service-Linked Roles in the AWS Organizations User Guide .

  • Enable all features final confirmation handshake: only a principal from the master account. For more information about invitations, see Inviting an AWS Account to Join Your Organization in the AWS Organizations User Guide . For more information about requests to enable all features in the organization, see Enabling All Features in Your Organization in the AWS Organizations User Guide .

After you accept a handshake, it continues to appear in the results of relevant APIs for only 30 days. After that it is deleted.

See also: AWS API Documentation

Request Syntax

client.accept_handshake(
    HandshakeId='string'
)
type HandshakeId

string

param HandshakeId

[REQUIRED]

The unique identifier (ID) of the handshake that you want to accept.

The regex pattern for handshake ID string requires "h-" followed by from 8 to 32 lower-case letters or digits.

rtype

dict

returns

Response Syntax

{
    'Handshake': {
        'Id': 'string',
        'Arn': 'string',
        'Parties': [
            {
                'Id': 'string',
                'Type': 'ACCOUNT'|'ORGANIZATION'|'EMAIL'
            },
        ],
        'State': 'REQUESTED'|'OPEN'|'CANCELED'|'ACCEPTED'|'DECLINED'|'EXPIRED',
        'RequestedTimestamp': datetime(2015, 1, 1),
        'ExpirationTimestamp': datetime(2015, 1, 1),
        'Action': 'INVITE'|'ENABLE_ALL_FEATURES'|'APPROVE_ALL_FEATURES'|'ADD_ORGANIZATIONS_SERVICE_LINKED_ROLE',
        'Resources': [
            {
                'Value': 'string',
                'Type': 'ACCOUNT'|'ORGANIZATION'|'ORGANIZATION_FEATURE_SET'|'EMAIL'|'MASTER_EMAIL'|'MASTER_NAME'|'NOTES'|'PARENT_HANDSHAKE',
                'Resources': {'... recursive ...'}
            },
        ]
    }
}

Response Structure

  • (dict) --

    • Handshake (dict) --

      A structure that contains details about the accepted handshake.

      • Id (string) --

        The unique identifier (ID) of a handshake. The originating account creates the ID when it initiates the handshake.

        The regex pattern for handshake ID string requires "h-" followed by from 8 to 32 lower-case letters or digits.

      • Arn (string) --

        The Amazon Resource Name (ARN) of a handshake.

        For more information about ARNs in Organizations, see ARN Formats Supported by Organizations in the AWS Organizations User Guide .

      • Parties (list) --

        Information about the two accounts that are participating in the handshake.

        • (dict) --

          Identifies a participant in a handshake.

          • Id (string) --

            The unique identifier (ID) for the party.

            The regex pattern for handshake ID string requires "h-" followed by from 8 to 32 lower-case letters or digits.

          • Type (string) --

            The type of party.

      • State (string) --

        The current state of the handshake. Use the state to trace the flow of the handshake through the process from its creation to its acceptance. The meaning of each of the valid values is as follows:

        • REQUESTED : This handshake was sent to multiple recipients (applicable to only some handshake types) and not all recipients have responded yet. The request stays in this state until all recipients respond.

        • OPEN : This handshake was sent to multiple recipients (applicable to only some policy types) and all recipients have responded, allowing the originator to complete the handshake action.

        • CANCELED : This handshake is no longer active because it was canceled by the originating account.

        • ACCEPTED : This handshake is complete because it has been accepted by the recipient.

        • DECLINED : This handshake is no longer active because it was declined by the recipient account.

        • EXPIRED : This handshake is no longer active because the originator did not receive a response of any kind from the recipient before the expiration time (15 days).

      • RequestedTimestamp (datetime) --

        The date and time that the handshake request was made.

      • ExpirationTimestamp (datetime) --

        The date and time that the handshake expires. If the recipient of the handshake request fails to respond before the specified date and time, the handshake becomes inactive and is no longer valid.

      • Action (string) --

        The type of handshake, indicating what action occurs when the recipient accepts the handshake. The following handshake types are supported:

        • INVITE : This type of handshake represents a request to join an organization. It is always sent from the master account to only non-member accounts.

        • ENABLE_ALL_FEATURES : This type of handshake represents a request to enable all features in an organization. It is always sent from the master account to only invited member accounts. Created accounts do not receive this because those accounts were created by the organization's master account and approval is inferred.

        • APPROVE_ALL_FEATURES : This type of handshake is sent from the Organizations service when all member accounts have approved the ENABLE_ALL_FEATURES invitation. It is sent only to the master account and signals the master that it can finalize the process to enable all features.

      • Resources (list) --

        Additional information that is needed to process the handshake.

        • (dict) --

          Contains additional data that is needed to process a handshake.

          • Value (string) --

            The information that is passed to the other party in the handshake. The format of the value string must match the requirements of the specified type.

          • Type (string) --

            The type of information being passed, specifying how the value is to be interpreted by the other party:

            • ACCOUNT - Specifies an AWS account ID number.

            • ORGANIZATION - Specifies an organization ID number.

            • EMAIL - Specifies the email address that is associated with the account that receives the handshake.

            • OWNER_EMAIL - Specifies the email address associated with the master account. Included as information about an organization.

            • OWNER_NAME - Specifies the name associated with the master account. Included as information about an organization.

            • NOTES - Additional text provided by the handshake initiator and intended for the recipient to read.

          • Resources (list) --

            When needed, contains an additional array of HandshakeResource objects.

CancelHandshake (updated) Link ¶
Changes (response)
{'Handshake': {'Action': ['ADD_ORGANIZATIONS_SERVICE_LINKED_ROLE']}}

Cancels a handshake. Canceling a handshake sets the handshake state to CANCELED .

This operation can be called only from the account that originated the handshake. The recipient of the handshake can't cancel it, but can use DeclineHandshake instead. After a handshake is canceled, the recipient can no longer respond to that handshake.

After you cancel a handshake, it continues to appear in the results of relevant APIs for only 30 days. After that it is deleted.

See also: AWS API Documentation

Request Syntax

client.cancel_handshake(
    HandshakeId='string'
)
type HandshakeId

string

param HandshakeId

[REQUIRED]

The unique identifier (ID) of the handshake that you want to cancel. You can get the ID from the ListHandshakesForOrganization operation.

The regex pattern for handshake ID string requires "h-" followed by from 8 to 32 lower-case letters or digits.

rtype

dict

returns

Response Syntax

{
    'Handshake': {
        'Id': 'string',
        'Arn': 'string',
        'Parties': [
            {
                'Id': 'string',
                'Type': 'ACCOUNT'|'ORGANIZATION'|'EMAIL'
            },
        ],
        'State': 'REQUESTED'|'OPEN'|'CANCELED'|'ACCEPTED'|'DECLINED'|'EXPIRED',
        'RequestedTimestamp': datetime(2015, 1, 1),
        'ExpirationTimestamp': datetime(2015, 1, 1),
        'Action': 'INVITE'|'ENABLE_ALL_FEATURES'|'APPROVE_ALL_FEATURES'|'ADD_ORGANIZATIONS_SERVICE_LINKED_ROLE',
        'Resources': [
            {
                'Value': 'string',
                'Type': 'ACCOUNT'|'ORGANIZATION'|'ORGANIZATION_FEATURE_SET'|'EMAIL'|'MASTER_EMAIL'|'MASTER_NAME'|'NOTES'|'PARENT_HANDSHAKE',
                'Resources': {'... recursive ...'}
            },
        ]
    }
}

Response Structure

  • (dict) --

    • Handshake (dict) --

      A structure that contains details about the handshake that you canceled.

      • Id (string) --

        The unique identifier (ID) of a handshake. The originating account creates the ID when it initiates the handshake.

        The regex pattern for handshake ID string requires "h-" followed by from 8 to 32 lower-case letters or digits.

      • Arn (string) --

        The Amazon Resource Name (ARN) of a handshake.

        For more information about ARNs in Organizations, see ARN Formats Supported by Organizations in the AWS Organizations User Guide .

      • Parties (list) --

        Information about the two accounts that are participating in the handshake.

        • (dict) --

          Identifies a participant in a handshake.

          • Id (string) --

            The unique identifier (ID) for the party.

            The regex pattern for handshake ID string requires "h-" followed by from 8 to 32 lower-case letters or digits.

          • Type (string) --

            The type of party.

      • State (string) --

        The current state of the handshake. Use the state to trace the flow of the handshake through the process from its creation to its acceptance. The meaning of each of the valid values is as follows:

        • REQUESTED : This handshake was sent to multiple recipients (applicable to only some handshake types) and not all recipients have responded yet. The request stays in this state until all recipients respond.

        • OPEN : This handshake was sent to multiple recipients (applicable to only some policy types) and all recipients have responded, allowing the originator to complete the handshake action.

        • CANCELED : This handshake is no longer active because it was canceled by the originating account.

        • ACCEPTED : This handshake is complete because it has been accepted by the recipient.

        • DECLINED : This handshake is no longer active because it was declined by the recipient account.

        • EXPIRED : This handshake is no longer active because the originator did not receive a response of any kind from the recipient before the expiration time (15 days).

      • RequestedTimestamp (datetime) --

        The date and time that the handshake request was made.

      • ExpirationTimestamp (datetime) --

        The date and time that the handshake expires. If the recipient of the handshake request fails to respond before the specified date and time, the handshake becomes inactive and is no longer valid.

      • Action (string) --

        The type of handshake, indicating what action occurs when the recipient accepts the handshake. The following handshake types are supported:

        • INVITE : This type of handshake represents a request to join an organization. It is always sent from the master account to only non-member accounts.

        • ENABLE_ALL_FEATURES : This type of handshake represents a request to enable all features in an organization. It is always sent from the master account to only invited member accounts. Created accounts do not receive this because those accounts were created by the organization's master account and approval is inferred.

        • APPROVE_ALL_FEATURES : This type of handshake is sent from the Organizations service when all member accounts have approved the ENABLE_ALL_FEATURES invitation. It is sent only to the master account and signals the master that it can finalize the process to enable all features.

      • Resources (list) --

        Additional information that is needed to process the handshake.

        • (dict) --

          Contains additional data that is needed to process a handshake.

          • Value (string) --

            The information that is passed to the other party in the handshake. The format of the value string must match the requirements of the specified type.

          • Type (string) --

            The type of information being passed, specifying how the value is to be interpreted by the other party:

            • ACCOUNT - Specifies an AWS account ID number.

            • ORGANIZATION - Specifies an organization ID number.

            • EMAIL - Specifies the email address that is associated with the account that receives the handshake.

            • OWNER_EMAIL - Specifies the email address associated with the master account. Included as information about an organization.

            • OWNER_NAME - Specifies the name associated with the master account. Included as information about an organization.

            • NOTES - Additional text provided by the handshake initiator and intended for the recipient to read.

          • Resources (list) --

            When needed, contains an additional array of HandshakeResource objects.

CreateAccount (updated) Link ¶
Changes (response)
{'CreateAccountStatus': {'FailureReason': ['CONCURRENT_ACCOUNT_MODIFICATION']}}

Creates an AWS account that is automatically a member of the organization whose credentials made the request. This is an asynchronous request that AWS performs in the background. If you want to check the status of the request later, you need the OperationId response element from this operation to provide as a parameter to the DescribeCreateAccountStatus operation.

The user who calls the API for an invitation to join must have the organizations:CreateAccount permission. If you enabled all features in the organization, then the user must also have the iam:CreateServiceLinkedRole permission so that Organizations can create the required service-linked role named OrgsServiceLinkedRoleName . For more information, see AWS Organizations and Service-Linked Roles in the AWS Organizations User Guide .

The user in the master account who calls this API must also have the iam:CreateRole permission because AWS Organizations preconfigures the new member account with a role (named OrganizationAccountAccessRole by default) that grants users in the master account administrator permissions in the new member account. Principals in the master account can assume the role. AWS Organizations clones the company name and address information for the new account from the organization's master account.

For more information about creating accounts, see Creating an AWS Account in Your Organization in the AWS Organizations User Guide .

Warning

When you create an account in an organization using the AWS Organizations console, API, or CLI commands, the information required for the account to operate as a standalone account, such as a payment method and signing the End User Licence Agreement (EULA) is not automatically collected. If you must remove an account from your organization later, you can do so only after you provide the missing information. Follow the steps at To leave an organization when all required account information has not yet been provided in the AWS Organizations User Guide .

Note

When you create a member account with this operation, you can choose whether to create the account with the IAM User and Role Access to Billing Information switch enabled. If you enable it, IAM users and roles that have appropriate permissions can view billing information for the account. If you disable this, then only the account root user can access billing information. For information about how to disable this for an account, see Granting Access to Your Billing Information and Tools .

This operation can be called only from the organization's master account.

Warning

If you get an exception that indicates that you exceeded your account limits for the organization or that you can"t add an account because your organization is still initializing, please contact AWS Customer Support .

See also: AWS API Documentation

Request Syntax

client.create_account(
    Email='string',
    AccountName='string',
    RoleName='string',
    IamUserAccessToBilling='ALLOW'|'DENY'
)
type Email

string

param Email

[REQUIRED]

The email address of the owner to assign to the new member account. This email address must not already be associated with another AWS account. You must use a valid email address to complete account creation. You cannot access the root user of the account or remove an account that was created with an invalid email address.

type AccountName

string

param AccountName

[REQUIRED]

The friendly name of the member account.

type RoleName

string

param RoleName

(Optional)

The name of an IAM role that Organizations automatically preconfigures in the new member account. This role trusts the master account, allowing users in the master account to assume the role, as permitted by the master account administrator. The role has administrator permissions in the new member account.

If you do not specify this parameter, the role name defaults to OrganizationAccountAccessRole .

For more information about how to use this role to access the member account, see Accessing and Administering the Member Accounts in Your Organization in the AWS Organizations User Guide , and steps 2 and 3 in Tutorial: Delegate Access Across AWS Accounts Using IAM Roles in the IAM User Guide .

The regex pattern that is used to validate this parameter is a string of characters that can consist of uppercase letters, lowercase letters, digits with no spaces, and any of the following characters: =,.@-

type IamUserAccessToBilling

string

param IamUserAccessToBilling

If set to ALLOW , the new account enables IAM users to access account billing information if they have the required permissions. If set to DENY , then only the root user of the new account can access account billing information. For more information, see Activating Access to the Billing and Cost Management Console in the AWS Billing and Cost Management User Guide .

If you do not specify this parameter, the value defaults to ALLOW, and IAM users and roles with the required permissions can access billing information for the new account.

rtype

dict

returns

Response Syntax

{
    'CreateAccountStatus': {
        'Id': 'string',
        'AccountName': 'string',
        'State': 'IN_PROGRESS'|'SUCCEEDED'|'FAILED',
        'RequestedTimestamp': datetime(2015, 1, 1),
        'CompletedTimestamp': datetime(2015, 1, 1),
        'AccountId': 'string',
        'FailureReason': 'ACCOUNT_LIMIT_EXCEEDED'|'EMAIL_ALREADY_EXISTS'|'INVALID_ADDRESS'|'INVALID_EMAIL'|'CONCURRENT_ACCOUNT_MODIFICATION'|'INTERNAL_FAILURE'
    }
}

Response Structure

  • (dict) --

    • CreateAccountStatus (dict) --

      A structure that contains details about the request to create an account. This response structure might not be fully populated when you first receive it because account creation is an asynchronous process. You can pass the returned CreateAccountStatus ID as a parameter to `` DescribeCreateAccountStatus `` to get status about the progress of the request at later times.

      • Id (string) --

        The unique identifier (ID) that references this request. You get this value from the response of the initial CreateAccount request to create the account.

        The regex pattern for an create account request ID string requires "car-" followed by from 8 to 32 lower-case letters or digits.

      • AccountName (string) --

        The account name given to the account when it was created.

      • State (string) --

        The status of the request.

      • RequestedTimestamp (datetime) --

        The date and time that the request was made for the account creation.

      • CompletedTimestamp (datetime) --

        The date and time that the account was created and the request completed.

      • AccountId (string) --

        If the account was created successfully, the unique identifier (ID) of the new account.

        The regex pattern for an account ID string requires exactly 12 digits.

      • FailureReason (string) --

        If the request failed, a description of the reason for the failure.

        • ACCOUNT_LIMIT_EXCEEDED: The account could not be created because you have reached the limit on the number of accounts in your organization.

        • EMAIL_ALREADY_EXISTS: The account could not be created because another AWS account with that email address already exists.

        • INVALID_ADDRESS: The account could not be created because the address you provided is not valid.

        • INVALID_EMAIL: The account could not be created because the email address you provided is not valid.

        • INTERNAL_FAILURE: The account could not be created because of an internal failure. Try again later. If the problem persists, contact Customer Support.

DeclineHandshake (updated) Link ¶
Changes (response)
{'Handshake': {'Action': ['ADD_ORGANIZATIONS_SERVICE_LINKED_ROLE']}}

Declines a handshake request. This sets the handshake state to DECLINED and effectively deactivates the request.

This operation can be called only from the account that received the handshake. The originator of the handshake can use CancelHandshake instead. The originator can't reactivate a declined request, but can re-initiate the process with a new handshake request.

After you decline a handshake, it continues to appear in the results of relevant APIs for only 30 days. After that it is deleted.

See also: AWS API Documentation

Request Syntax

client.decline_handshake(
    HandshakeId='string'
)
type HandshakeId

string

param HandshakeId

[REQUIRED]

The unique identifier (ID) of the handshake that you want to decline. You can get the ID from the ListHandshakesForAccount operation.

The regex pattern for handshake ID string requires "h-" followed by from 8 to 32 lower-case letters or digits.

rtype

dict

returns

Response Syntax

{
    'Handshake': {
        'Id': 'string',
        'Arn': 'string',
        'Parties': [
            {
                'Id': 'string',
                'Type': 'ACCOUNT'|'ORGANIZATION'|'EMAIL'
            },
        ],
        'State': 'REQUESTED'|'OPEN'|'CANCELED'|'ACCEPTED'|'DECLINED'|'EXPIRED',
        'RequestedTimestamp': datetime(2015, 1, 1),
        'ExpirationTimestamp': datetime(2015, 1, 1),
        'Action': 'INVITE'|'ENABLE_ALL_FEATURES'|'APPROVE_ALL_FEATURES'|'ADD_ORGANIZATIONS_SERVICE_LINKED_ROLE',
        'Resources': [
            {
                'Value': 'string',
                'Type': 'ACCOUNT'|'ORGANIZATION'|'ORGANIZATION_FEATURE_SET'|'EMAIL'|'MASTER_EMAIL'|'MASTER_NAME'|'NOTES'|'PARENT_HANDSHAKE',
                'Resources': {'... recursive ...'}
            },
        ]
    }
}

Response Structure

  • (dict) --

    • Handshake (dict) --

      A structure that contains details about the declined handshake. The state is updated to show the value DECLINED .

      • Id (string) --

        The unique identifier (ID) of a handshake. The originating account creates the ID when it initiates the handshake.

        The regex pattern for handshake ID string requires "h-" followed by from 8 to 32 lower-case letters or digits.

      • Arn (string) --

        The Amazon Resource Name (ARN) of a handshake.

        For more information about ARNs in Organizations, see ARN Formats Supported by Organizations in the AWS Organizations User Guide .

      • Parties (list) --

        Information about the two accounts that are participating in the handshake.

        • (dict) --

          Identifies a participant in a handshake.

          • Id (string) --

            The unique identifier (ID) for the party.

            The regex pattern for handshake ID string requires "h-" followed by from 8 to 32 lower-case letters or digits.

          • Type (string) --

            The type of party.

      • State (string) --

        The current state of the handshake. Use the state to trace the flow of the handshake through the process from its creation to its acceptance. The meaning of each of the valid values is as follows:

        • REQUESTED : This handshake was sent to multiple recipients (applicable to only some handshake types) and not all recipients have responded yet. The request stays in this state until all recipients respond.

        • OPEN : This handshake was sent to multiple recipients (applicable to only some policy types) and all recipients have responded, allowing the originator to complete the handshake action.

        • CANCELED : This handshake is no longer active because it was canceled by the originating account.

        • ACCEPTED : This handshake is complete because it has been accepted by the recipient.

        • DECLINED : This handshake is no longer active because it was declined by the recipient account.

        • EXPIRED : This handshake is no longer active because the originator did not receive a response of any kind from the recipient before the expiration time (15 days).

      • RequestedTimestamp (datetime) --

        The date and time that the handshake request was made.

      • ExpirationTimestamp (datetime) --

        The date and time that the handshake expires. If the recipient of the handshake request fails to respond before the specified date and time, the handshake becomes inactive and is no longer valid.

      • Action (string) --

        The type of handshake, indicating what action occurs when the recipient accepts the handshake. The following handshake types are supported:

        • INVITE : This type of handshake represents a request to join an organization. It is always sent from the master account to only non-member accounts.

        • ENABLE_ALL_FEATURES : This type of handshake represents a request to enable all features in an organization. It is always sent from the master account to only invited member accounts. Created accounts do not receive this because those accounts were created by the organization's master account and approval is inferred.

        • APPROVE_ALL_FEATURES : This type of handshake is sent from the Organizations service when all member accounts have approved the ENABLE_ALL_FEATURES invitation. It is sent only to the master account and signals the master that it can finalize the process to enable all features.

      • Resources (list) --

        Additional information that is needed to process the handshake.

        • (dict) --

          Contains additional data that is needed to process a handshake.

          • Value (string) --

            The information that is passed to the other party in the handshake. The format of the value string must match the requirements of the specified type.

          • Type (string) --

            The type of information being passed, specifying how the value is to be interpreted by the other party:

            • ACCOUNT - Specifies an AWS account ID number.

            • ORGANIZATION - Specifies an organization ID number.

            • EMAIL - Specifies the email address that is associated with the account that receives the handshake.

            • OWNER_EMAIL - Specifies the email address associated with the master account. Included as information about an organization.

            • OWNER_NAME - Specifies the name associated with the master account. Included as information about an organization.

            • NOTES - Additional text provided by the handshake initiator and intended for the recipient to read.

          • Resources (list) --

            When needed, contains an additional array of HandshakeResource objects.

DescribeCreateAccountStatus (updated) Link ¶
Changes (response)
{'CreateAccountStatus': {'FailureReason': ['CONCURRENT_ACCOUNT_MODIFICATION']}}

Retrieves the current status of an asynchronous request to create an account.

This operation can be called only from the organization's master account.

See also: AWS API Documentation

Request Syntax

client.describe_create_account_status(
    CreateAccountRequestId='string'
)
type CreateAccountRequestId

string

param CreateAccountRequestId

[REQUIRED]

Specifies the operationId that uniquely identifies the request. You can get the ID from the response to an earlier CreateAccount request, or from the ListCreateAccountStatus operation.

The regex pattern for an create account request ID string requires "car-" followed by from 8 to 32 lower-case letters or digits.

rtype

dict

returns

Response Syntax

{
    'CreateAccountStatus': {
        'Id': 'string',
        'AccountName': 'string',
        'State': 'IN_PROGRESS'|'SUCCEEDED'|'FAILED',
        'RequestedTimestamp': datetime(2015, 1, 1),
        'CompletedTimestamp': datetime(2015, 1, 1),
        'AccountId': 'string',
        'FailureReason': 'ACCOUNT_LIMIT_EXCEEDED'|'EMAIL_ALREADY_EXISTS'|'INVALID_ADDRESS'|'INVALID_EMAIL'|'CONCURRENT_ACCOUNT_MODIFICATION'|'INTERNAL_FAILURE'
    }
}

Response Structure

  • (dict) --

    • CreateAccountStatus (dict) --

      A structure that contains the current status of an account creation request.

      • Id (string) --

        The unique identifier (ID) that references this request. You get this value from the response of the initial CreateAccount request to create the account.

        The regex pattern for an create account request ID string requires "car-" followed by from 8 to 32 lower-case letters or digits.

      • AccountName (string) --

        The account name given to the account when it was created.

      • State (string) --

        The status of the request.

      • RequestedTimestamp (datetime) --

        The date and time that the request was made for the account creation.

      • CompletedTimestamp (datetime) --

        The date and time that the account was created and the request completed.

      • AccountId (string) --

        If the account was created successfully, the unique identifier (ID) of the new account.

        The regex pattern for an account ID string requires exactly 12 digits.

      • FailureReason (string) --

        If the request failed, a description of the reason for the failure.

        • ACCOUNT_LIMIT_EXCEEDED: The account could not be created because you have reached the limit on the number of accounts in your organization.

        • EMAIL_ALREADY_EXISTS: The account could not be created because another AWS account with that email address already exists.

        • INVALID_ADDRESS: The account could not be created because the address you provided is not valid.

        • INVALID_EMAIL: The account could not be created because the email address you provided is not valid.

        • INTERNAL_FAILURE: The account could not be created because of an internal failure. Try again later. If the problem persists, contact Customer Support.

DescribeHandshake (updated) Link ¶
Changes (response)
{'Handshake': {'Action': ['ADD_ORGANIZATIONS_SERVICE_LINKED_ROLE']}}

Retrieves information about a previously requested handshake. The handshake ID comes from the response to the original InviteAccountToOrganization operation that generated the handshake.

You can access handshakes that are ACCEPTED, DECLINED, or CANCELED for only 30 days after they change to that state. They are then deleted and no longer accessible.

This operation can be called from any account in the organization.

See also: AWS API Documentation

Request Syntax

client.describe_handshake(
    HandshakeId='string'
)
type HandshakeId

string

param HandshakeId

[REQUIRED]

The unique identifier (ID) of the handshake that you want information about. You can get the ID from the original call to InviteAccountToOrganization , or from a call to ListHandshakesForAccount or ListHandshakesForOrganization .

The regex pattern for handshake ID string requires "h-" followed by from 8 to 32 lower-case letters or digits.

rtype

dict

returns

Response Syntax

{
    'Handshake': {
        'Id': 'string',
        'Arn': 'string',
        'Parties': [
            {
                'Id': 'string',
                'Type': 'ACCOUNT'|'ORGANIZATION'|'EMAIL'
            },
        ],
        'State': 'REQUESTED'|'OPEN'|'CANCELED'|'ACCEPTED'|'DECLINED'|'EXPIRED',
        'RequestedTimestamp': datetime(2015, 1, 1),
        'ExpirationTimestamp': datetime(2015, 1, 1),
        'Action': 'INVITE'|'ENABLE_ALL_FEATURES'|'APPROVE_ALL_FEATURES'|'ADD_ORGANIZATIONS_SERVICE_LINKED_ROLE',
        'Resources': [
            {
                'Value': 'string',
                'Type': 'ACCOUNT'|'ORGANIZATION'|'ORGANIZATION_FEATURE_SET'|'EMAIL'|'MASTER_EMAIL'|'MASTER_NAME'|'NOTES'|'PARENT_HANDSHAKE',
                'Resources': {'... recursive ...'}
            },
        ]
    }
}

Response Structure

  • (dict) --

    • Handshake (dict) --

      A structure that contains information about the specified handshake.

      • Id (string) --

        The unique identifier (ID) of a handshake. The originating account creates the ID when it initiates the handshake.

        The regex pattern for handshake ID string requires "h-" followed by from 8 to 32 lower-case letters or digits.

      • Arn (string) --

        The Amazon Resource Name (ARN) of a handshake.

        For more information about ARNs in Organizations, see ARN Formats Supported by Organizations in the AWS Organizations User Guide .

      • Parties (list) --

        Information about the two accounts that are participating in the handshake.

        • (dict) --

          Identifies a participant in a handshake.

          • Id (string) --

            The unique identifier (ID) for the party.

            The regex pattern for handshake ID string requires "h-" followed by from 8 to 32 lower-case letters or digits.

          • Type (string) --

            The type of party.

      • State (string) --

        The current state of the handshake. Use the state to trace the flow of the handshake through the process from its creation to its acceptance. The meaning of each of the valid values is as follows:

        • REQUESTED : This handshake was sent to multiple recipients (applicable to only some handshake types) and not all recipients have responded yet. The request stays in this state until all recipients respond.

        • OPEN : This handshake was sent to multiple recipients (applicable to only some policy types) and all recipients have responded, allowing the originator to complete the handshake action.

        • CANCELED : This handshake is no longer active because it was canceled by the originating account.

        • ACCEPTED : This handshake is complete because it has been accepted by the recipient.

        • DECLINED : This handshake is no longer active because it was declined by the recipient account.

        • EXPIRED : This handshake is no longer active because the originator did not receive a response of any kind from the recipient before the expiration time (15 days).

      • RequestedTimestamp (datetime) --

        The date and time that the handshake request was made.

      • ExpirationTimestamp (datetime) --

        The date and time that the handshake expires. If the recipient of the handshake request fails to respond before the specified date and time, the handshake becomes inactive and is no longer valid.

      • Action (string) --

        The type of handshake, indicating what action occurs when the recipient accepts the handshake. The following handshake types are supported:

        • INVITE : This type of handshake represents a request to join an organization. It is always sent from the master account to only non-member accounts.

        • ENABLE_ALL_FEATURES : This type of handshake represents a request to enable all features in an organization. It is always sent from the master account to only invited member accounts. Created accounts do not receive this because those accounts were created by the organization's master account and approval is inferred.

        • APPROVE_ALL_FEATURES : This type of handshake is sent from the Organizations service when all member accounts have approved the ENABLE_ALL_FEATURES invitation. It is sent only to the master account and signals the master that it can finalize the process to enable all features.

      • Resources (list) --

        Additional information that is needed to process the handshake.

        • (dict) --

          Contains additional data that is needed to process a handshake.

          • Value (string) --

            The information that is passed to the other party in the handshake. The format of the value string must match the requirements of the specified type.

          • Type (string) --

            The type of information being passed, specifying how the value is to be interpreted by the other party:

            • ACCOUNT - Specifies an AWS account ID number.

            • ORGANIZATION - Specifies an organization ID number.

            • EMAIL - Specifies the email address that is associated with the account that receives the handshake.

            • OWNER_EMAIL - Specifies the email address associated with the master account. Included as information about an organization.

            • OWNER_NAME - Specifies the name associated with the master account. Included as information about an organization.

            • NOTES - Additional text provided by the handshake initiator and intended for the recipient to read.

          • Resources (list) --

            When needed, contains an additional array of HandshakeResource objects.

EnableAllFeatures (updated) Link ¶
Changes (response)
{'Handshake': {'Action': ['ADD_ORGANIZATIONS_SERVICE_LINKED_ROLE']}}

Enables all features in an organization. This enables the use of organization policies that can restrict the services and actions that can be called in each account. Until you enable all features, you have access only to consolidated billing, and you can't use any of the advanced account administration features that AWS Organizations supports. For more information, see Enabling All Features in Your Organization in the AWS Organizations User Guide .

Warning

This operation is required only for organizations that were created explicitly with only the consolidated billing features enabled, or that were migrated from a Consolidated Billing account family to Organizations. Calling this operation sends a handshake to every invited account in the organization. The feature set change can be finalized and the additional features enabled only after all administrators in the invited accounts approve the change by accepting the handshake.

After all invited member accounts accept the handshake, you finalize the feature set change by accepting the handshake that contains "Action": "ENABLE_ALL_FEATURES" . This completes the change.

After you enable all features in your organization, the master account in the organization can apply policies on all member accounts. These policies can restrict what users and even administrators in those accounts can do. The master account can apply policies that prevent accounts from leaving the organization. Ensure that your account administrators are aware of this.

This operation can be called only from the organization's master account.

See also: AWS API Documentation

Request Syntax

client.enable_all_features()
rtype

dict

returns

Response Syntax

{
    'Handshake': {
        'Id': 'string',
        'Arn': 'string',
        'Parties': [
            {
                'Id': 'string',
                'Type': 'ACCOUNT'|'ORGANIZATION'|'EMAIL'
            },
        ],
        'State': 'REQUESTED'|'OPEN'|'CANCELED'|'ACCEPTED'|'DECLINED'|'EXPIRED',
        'RequestedTimestamp': datetime(2015, 1, 1),
        'ExpirationTimestamp': datetime(2015, 1, 1),
        'Action': 'INVITE'|'ENABLE_ALL_FEATURES'|'APPROVE_ALL_FEATURES'|'ADD_ORGANIZATIONS_SERVICE_LINKED_ROLE',
        'Resources': [
            {
                'Value': 'string',
                'Type': 'ACCOUNT'|'ORGANIZATION'|'ORGANIZATION_FEATURE_SET'|'EMAIL'|'MASTER_EMAIL'|'MASTER_NAME'|'NOTES'|'PARENT_HANDSHAKE',
                'Resources': {'... recursive ...'}
            },
        ]
    }
}

Response Structure

  • (dict) --

    • Handshake (dict) --

      A structure that contains details about the handshake created to support this request to enable all features in the organization.

      • Id (string) --

        The unique identifier (ID) of a handshake. The originating account creates the ID when it initiates the handshake.

        The regex pattern for handshake ID string requires "h-" followed by from 8 to 32 lower-case letters or digits.

      • Arn (string) --

        The Amazon Resource Name (ARN) of a handshake.

        For more information about ARNs in Organizations, see ARN Formats Supported by Organizations in the AWS Organizations User Guide .

      • Parties (list) --

        Information about the two accounts that are participating in the handshake.

        • (dict) --

          Identifies a participant in a handshake.

          • Id (string) --

            The unique identifier (ID) for the party.

            The regex pattern for handshake ID string requires "h-" followed by from 8 to 32 lower-case letters or digits.

          • Type (string) --

            The type of party.

      • State (string) --

        The current state of the handshake. Use the state to trace the flow of the handshake through the process from its creation to its acceptance. The meaning of each of the valid values is as follows:

        • REQUESTED : This handshake was sent to multiple recipients (applicable to only some handshake types) and not all recipients have responded yet. The request stays in this state until all recipients respond.

        • OPEN : This handshake was sent to multiple recipients (applicable to only some policy types) and all recipients have responded, allowing the originator to complete the handshake action.

        • CANCELED : This handshake is no longer active because it was canceled by the originating account.

        • ACCEPTED : This handshake is complete because it has been accepted by the recipient.

        • DECLINED : This handshake is no longer active because it was declined by the recipient account.

        • EXPIRED : This handshake is no longer active because the originator did not receive a response of any kind from the recipient before the expiration time (15 days).

      • RequestedTimestamp (datetime) --

        The date and time that the handshake request was made.

      • ExpirationTimestamp (datetime) --

        The date and time that the handshake expires. If the recipient of the handshake request fails to respond before the specified date and time, the handshake becomes inactive and is no longer valid.

      • Action (string) --

        The type of handshake, indicating what action occurs when the recipient accepts the handshake. The following handshake types are supported:

        • INVITE : This type of handshake represents a request to join an organization. It is always sent from the master account to only non-member accounts.

        • ENABLE_ALL_FEATURES : This type of handshake represents a request to enable all features in an organization. It is always sent from the master account to only invited member accounts. Created accounts do not receive this because those accounts were created by the organization's master account and approval is inferred.

        • APPROVE_ALL_FEATURES : This type of handshake is sent from the Organizations service when all member accounts have approved the ENABLE_ALL_FEATURES invitation. It is sent only to the master account and signals the master that it can finalize the process to enable all features.

      • Resources (list) --

        Additional information that is needed to process the handshake.

        • (dict) --

          Contains additional data that is needed to process a handshake.

          • Value (string) --

            The information that is passed to the other party in the handshake. The format of the value string must match the requirements of the specified type.

          • Type (string) --

            The type of information being passed, specifying how the value is to be interpreted by the other party:

            • ACCOUNT - Specifies an AWS account ID number.

            • ORGANIZATION - Specifies an organization ID number.

            • EMAIL - Specifies the email address that is associated with the account that receives the handshake.

            • OWNER_EMAIL - Specifies the email address associated with the master account. Included as information about an organization.

            • OWNER_NAME - Specifies the name associated with the master account. Included as information about an organization.

            • NOTES - Additional text provided by the handshake initiator and intended for the recipient to read.

          • Resources (list) --

            When needed, contains an additional array of HandshakeResource objects.

InviteAccountToOrganization (updated) Link ¶
Changes (response)
{'Handshake': {'Action': ['ADD_ORGANIZATIONS_SERVICE_LINKED_ROLE']}}

Sends an invitation to another account to join your organization as a member account. Organizations sends email on your behalf to the email address that is associated with the other account's owner. The invitation is implemented as a Handshake whose details are in the response.

Warning

You can invite AWS accounts only from the same seller as the master account. For example, if your organization's master account was created by Amazon Internet Services Pvt. Ltd (AISPL), an AWS seller in India, then you can only invite other AISPL accounts to your organization. You can't combine accounts from AISPL and AWS, or any other AWS seller. For more information, see Consolidated Billing in India .

This operation can be called only from the organization's master account.

Warning

If you get an exception that indicates that you exceeded your account limits for the organization or that you can"t add an account because your organization is still initializing, please contact AWS Customer Support .

See also: AWS API Documentation

Request Syntax

client.invite_account_to_organization(
    Target={
        'Id': 'string',
        'Type': 'ACCOUNT'|'ORGANIZATION'|'EMAIL'
    },
    Notes='string'
)
type Target

dict

param Target

[REQUIRED]

The identifier (ID) of the AWS account that you want to invite to join your organization. This is a JSON object that contains the following elements:

{ "Type": "ACCOUNT", "Id": "<* **account id number** * >" }

If you use the AWS CLI, you can submit this as a single string, similar to the following example:

--target Id=123456789012,Type=ACCOUNT

If you specify "Type": "ACCOUNT" , then you must provide the AWS account ID number as the Id . If you specify "Type": "EMAIL" , then you must specify the email address that is associated with the account.

--target Id=bill@example.com,Type=EMAIL

  • Id (string) -- [REQUIRED]

    The unique identifier (ID) for the party.

    The regex pattern for handshake ID string requires "h-" followed by from 8 to 32 lower-case letters or digits.

  • Type (string) -- [REQUIRED]

    The type of party.

type Notes

string

param Notes

Additional information that you want to include in the generated email to the recipient account owner.

rtype

dict

returns

Response Syntax

{
    'Handshake': {
        'Id': 'string',
        'Arn': 'string',
        'Parties': [
            {
                'Id': 'string',
                'Type': 'ACCOUNT'|'ORGANIZATION'|'EMAIL'
            },
        ],
        'State': 'REQUESTED'|'OPEN'|'CANCELED'|'ACCEPTED'|'DECLINED'|'EXPIRED',
        'RequestedTimestamp': datetime(2015, 1, 1),
        'ExpirationTimestamp': datetime(2015, 1, 1),
        'Action': 'INVITE'|'ENABLE_ALL_FEATURES'|'APPROVE_ALL_FEATURES'|'ADD_ORGANIZATIONS_SERVICE_LINKED_ROLE',
        'Resources': [
            {
                'Value': 'string',
                'Type': 'ACCOUNT'|'ORGANIZATION'|'ORGANIZATION_FEATURE_SET'|'EMAIL'|'MASTER_EMAIL'|'MASTER_NAME'|'NOTES'|'PARENT_HANDSHAKE',
                'Resources': {'... recursive ...'}
            },
        ]
    }
}

Response Structure

  • (dict) --

    • Handshake (dict) --

      A structure that contains details about the handshake that is created to support this invitation request.

      • Id (string) --

        The unique identifier (ID) of a handshake. The originating account creates the ID when it initiates the handshake.

        The regex pattern for handshake ID string requires "h-" followed by from 8 to 32 lower-case letters or digits.

      • Arn (string) --

        The Amazon Resource Name (ARN) of a handshake.

        For more information about ARNs in Organizations, see ARN Formats Supported by Organizations in the AWS Organizations User Guide .

      • Parties (list) --

        Information about the two accounts that are participating in the handshake.

        • (dict) --

          Identifies a participant in a handshake.

          • Id (string) --

            The unique identifier (ID) for the party.

            The regex pattern for handshake ID string requires "h-" followed by from 8 to 32 lower-case letters or digits.

          • Type (string) --

            The type of party.

      • State (string) --

        The current state of the handshake. Use the state to trace the flow of the handshake through the process from its creation to its acceptance. The meaning of each of the valid values is as follows:

        • REQUESTED : This handshake was sent to multiple recipients (applicable to only some handshake types) and not all recipients have responded yet. The request stays in this state until all recipients respond.

        • OPEN : This handshake was sent to multiple recipients (applicable to only some policy types) and all recipients have responded, allowing the originator to complete the handshake action.

        • CANCELED : This handshake is no longer active because it was canceled by the originating account.

        • ACCEPTED : This handshake is complete because it has been accepted by the recipient.

        • DECLINED : This handshake is no longer active because it was declined by the recipient account.

        • EXPIRED : This handshake is no longer active because the originator did not receive a response of any kind from the recipient before the expiration time (15 days).

      • RequestedTimestamp (datetime) --

        The date and time that the handshake request was made.

      • ExpirationTimestamp (datetime) --

        The date and time that the handshake expires. If the recipient of the handshake request fails to respond before the specified date and time, the handshake becomes inactive and is no longer valid.

      • Action (string) --

        The type of handshake, indicating what action occurs when the recipient accepts the handshake. The following handshake types are supported:

        • INVITE : This type of handshake represents a request to join an organization. It is always sent from the master account to only non-member accounts.

        • ENABLE_ALL_FEATURES : This type of handshake represents a request to enable all features in an organization. It is always sent from the master account to only invited member accounts. Created accounts do not receive this because those accounts were created by the organization's master account and approval is inferred.

        • APPROVE_ALL_FEATURES : This type of handshake is sent from the Organizations service when all member accounts have approved the ENABLE_ALL_FEATURES invitation. It is sent only to the master account and signals the master that it can finalize the process to enable all features.

      • Resources (list) --

        Additional information that is needed to process the handshake.

        • (dict) --

          Contains additional data that is needed to process a handshake.

          • Value (string) --

            The information that is passed to the other party in the handshake. The format of the value string must match the requirements of the specified type.

          • Type (string) --

            The type of information being passed, specifying how the value is to be interpreted by the other party:

            • ACCOUNT - Specifies an AWS account ID number.

            • ORGANIZATION - Specifies an organization ID number.

            • EMAIL - Specifies the email address that is associated with the account that receives the handshake.

            • OWNER_EMAIL - Specifies the email address associated with the master account. Included as information about an organization.

            • OWNER_NAME - Specifies the name associated with the master account. Included as information about an organization.

            • NOTES - Additional text provided by the handshake initiator and intended for the recipient to read.

          • Resources (list) --

            When needed, contains an additional array of HandshakeResource objects.

ListCreateAccountStatus (updated) Link ¶
Changes (response)
{'CreateAccountStatuses': {'FailureReason': ['CONCURRENT_ACCOUNT_MODIFICATION']}}

Lists the account creation requests that match the specified status that is currently being tracked for the organization.

This operation can be called only from the organization's master account.

See also: AWS API Documentation

Request Syntax

client.list_create_account_status(
    States=[
        'IN_PROGRESS'|'SUCCEEDED'|'FAILED',
    ],
    NextToken='string',
    MaxResults=123
)
type States

list

param States

A list of one or more states that you want included in the response. If this parameter is not present, then all requests are included in the response.

  • (string) --

type NextToken

string

param NextToken

Use this parameter if you receive a NextToken response in a previous request that indicates that there is more output available. Set it to the value of the previous call's NextToken response to indicate where the output should continue from.

type MaxResults

integer

param MaxResults

(Optional) Use this to limit the number of results you want included in the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the maximum you specify, the NextToken response element is present and has a value (is not null). Include that value as the NextToken request parameter in the next call to the operation to get the next part of the results. Note that Organizations might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.

rtype

dict

returns

Response Syntax

{
    'CreateAccountStatuses': [
        {
            'Id': 'string',
            'AccountName': 'string',
            'State': 'IN_PROGRESS'|'SUCCEEDED'|'FAILED',
            'RequestedTimestamp': datetime(2015, 1, 1),
            'CompletedTimestamp': datetime(2015, 1, 1),
            'AccountId': 'string',
            'FailureReason': 'ACCOUNT_LIMIT_EXCEEDED'|'EMAIL_ALREADY_EXISTS'|'INVALID_ADDRESS'|'INVALID_EMAIL'|'CONCURRENT_ACCOUNT_MODIFICATION'|'INTERNAL_FAILURE'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • CreateAccountStatuses (list) --

      A list of objects with details about the requests. Certain elements, such as the accountId number, are present in the output only after the account has been successfully created.

      • (dict) --

        Contains the status about a CreateAccount request to create an AWS account in an organization.

        • Id (string) --

          The unique identifier (ID) that references this request. You get this value from the response of the initial CreateAccount request to create the account.

          The regex pattern for an create account request ID string requires "car-" followed by from 8 to 32 lower-case letters or digits.

        • AccountName (string) --

          The account name given to the account when it was created.

        • State (string) --

          The status of the request.

        • RequestedTimestamp (datetime) --

          The date and time that the request was made for the account creation.

        • CompletedTimestamp (datetime) --

          The date and time that the account was created and the request completed.

        • AccountId (string) --

          If the account was created successfully, the unique identifier (ID) of the new account.

          The regex pattern for an account ID string requires exactly 12 digits.

        • FailureReason (string) --

          If the request failed, a description of the reason for the failure.

          • ACCOUNT_LIMIT_EXCEEDED: The account could not be created because you have reached the limit on the number of accounts in your organization.

          • EMAIL_ALREADY_EXISTS: The account could not be created because another AWS account with that email address already exists.

          • INVALID_ADDRESS: The account could not be created because the address you provided is not valid.

          • INVALID_EMAIL: The account could not be created because the email address you provided is not valid.

          • INTERNAL_FAILURE: The account could not be created because of an internal failure. Try again later. If the problem persists, contact Customer Support.

    • NextToken (string) --

      If present, this value indicates that there is more output available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null .

ListHandshakesForAccount (updated) Link ¶
Changes (request, response)
Request
{'Filter': {'ActionType': ['ADD_ORGANIZATIONS_SERVICE_LINKED_ROLE']}}
Response
{'Handshakes': {'Action': ['ADD_ORGANIZATIONS_SERVICE_LINKED_ROLE']}}

Lists the current handshakes that are associated with the account of the requesting user.

Handshakes that are ACCEPTED, DECLINED, or CANCELED appear in the results of this API for only 30 days after changing to that state. After that they are deleted and no longer accessible.

This operation can be called from any account in the organization.

See also: AWS API Documentation

Request Syntax

client.list_handshakes_for_account(
    Filter={
        'ActionType': 'INVITE'|'ENABLE_ALL_FEATURES'|'APPROVE_ALL_FEATURES'|'ADD_ORGANIZATIONS_SERVICE_LINKED_ROLE',
        'ParentHandshakeId': 'string'
    },
    NextToken='string',
    MaxResults=123
)
type Filter

dict

param Filter

Filters the handshakes that you want included in the response. The default is all types. Use the ActionType element to limit the output to only a specified type, such as INVITE , ENABLE-FULL-CONTROL , or APPROVE-FULL-CONTROL . Alternatively, for the ENABLE-FULL-CONTROL handshake that generates a separate child handshake for each member account, you can specify ParentHandshakeId to see only the handshakes that were generated by that parent request.

  • ActionType (string) --

    Specifies the type of handshake action.

    If you specify ActionType , you cannot also specify ParentHandshakeId .

  • ParentHandshakeId (string) --

    Specifies the parent handshake. Only used for handshake types that are a child of another type.

    If you specify ParentHandshakeId , you cannot also specify ActionType .

    The regex pattern for handshake ID string requires "h-" followed by from 8 to 32 lower-case letters or digits.

type NextToken

string

param NextToken

Use this parameter if you receive a NextToken response in a previous request that indicates that there is more output available. Set it to the value of the previous call's NextToken response to indicate where the output should continue from.

type MaxResults

integer

param MaxResults

(Optional) Use this to limit the number of results you want included in the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the maximum you specify, the NextToken response element is present and has a value (is not null). Include that value as the NextToken request parameter in the next call to the operation to get the next part of the results. Note that Organizations might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.

rtype

dict

returns

Response Syntax

{
    'Handshakes': [
        {
            'Id': 'string',
            'Arn': 'string',
            'Parties': [
                {
                    'Id': 'string',
                    'Type': 'ACCOUNT'|'ORGANIZATION'|'EMAIL'
                },
            ],
            'State': 'REQUESTED'|'OPEN'|'CANCELED'|'ACCEPTED'|'DECLINED'|'EXPIRED',
            'RequestedTimestamp': datetime(2015, 1, 1),
            'ExpirationTimestamp': datetime(2015, 1, 1),
            'Action': 'INVITE'|'ENABLE_ALL_FEATURES'|'APPROVE_ALL_FEATURES'|'ADD_ORGANIZATIONS_SERVICE_LINKED_ROLE',
            'Resources': [
                {
                    'Value': 'string',
                    'Type': 'ACCOUNT'|'ORGANIZATION'|'ORGANIZATION_FEATURE_SET'|'EMAIL'|'MASTER_EMAIL'|'MASTER_NAME'|'NOTES'|'PARENT_HANDSHAKE',
                    'Resources': {'... recursive ...'}
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Handshakes (list) --

      A list of Handshake objects with details about each of the handshakes that is associated with the specified account.

      • (dict) --

        Contains information that must be exchanged to securely establish a relationship between two accounts (an originator and a recipient ). For example, when a master account (the originator) invites another account (the recipient) to join its organization, the two accounts exchange information as a series of handshake requests and responses.

        Note: Handshakes that are CANCELED, ACCEPTED, or DECLINED show up in lists for only 30 days after entering that state After that they are deleted.

        • Id (string) --

          The unique identifier (ID) of a handshake. The originating account creates the ID when it initiates the handshake.

          The regex pattern for handshake ID string requires "h-" followed by from 8 to 32 lower-case letters or digits.

        • Arn (string) --

          The Amazon Resource Name (ARN) of a handshake.

          For more information about ARNs in Organizations, see ARN Formats Supported by Organizations in the AWS Organizations User Guide .

        • Parties (list) --

          Information about the two accounts that are participating in the handshake.

          • (dict) --

            Identifies a participant in a handshake.

            • Id (string) --

              The unique identifier (ID) for the party.

              The regex pattern for handshake ID string requires "h-" followed by from 8 to 32 lower-case letters or digits.

            • Type (string) --

              The type of party.

        • State (string) --

          The current state of the handshake. Use the state to trace the flow of the handshake through the process from its creation to its acceptance. The meaning of each of the valid values is as follows:

          • REQUESTED : This handshake was sent to multiple recipients (applicable to only some handshake types) and not all recipients have responded yet. The request stays in this state until all recipients respond.

          • OPEN : This handshake was sent to multiple recipients (applicable to only some policy types) and all recipients have responded, allowing the originator to complete the handshake action.

          • CANCELED : This handshake is no longer active because it was canceled by the originating account.

          • ACCEPTED : This handshake is complete because it has been accepted by the recipient.

          • DECLINED : This handshake is no longer active because it was declined by the recipient account.

          • EXPIRED : This handshake is no longer active because the originator did not receive a response of any kind from the recipient before the expiration time (15 days).

        • RequestedTimestamp (datetime) --

          The date and time that the handshake request was made.

        • ExpirationTimestamp (datetime) --

          The date and time that the handshake expires. If the recipient of the handshake request fails to respond before the specified date and time, the handshake becomes inactive and is no longer valid.

        • Action (string) --

          The type of handshake, indicating what action occurs when the recipient accepts the handshake. The following handshake types are supported:

          • INVITE : This type of handshake represents a request to join an organization. It is always sent from the master account to only non-member accounts.

          • ENABLE_ALL_FEATURES : This type of handshake represents a request to enable all features in an organization. It is always sent from the master account to only invited member accounts. Created accounts do not receive this because those accounts were created by the organization's master account and approval is inferred.

          • APPROVE_ALL_FEATURES : This type of handshake is sent from the Organizations service when all member accounts have approved the ENABLE_ALL_FEATURES invitation. It is sent only to the master account and signals the master that it can finalize the process to enable all features.

        • Resources (list) --

          Additional information that is needed to process the handshake.

          • (dict) --

            Contains additional data that is needed to process a handshake.

            • Value (string) --

              The information that is passed to the other party in the handshake. The format of the value string must match the requirements of the specified type.

            • Type (string) --

              The type of information being passed, specifying how the value is to be interpreted by the other party:

              • ACCOUNT - Specifies an AWS account ID number.

              • ORGANIZATION - Specifies an organization ID number.

              • EMAIL - Specifies the email address that is associated with the account that receives the handshake.

              • OWNER_EMAIL - Specifies the email address associated with the master account. Included as information about an organization.

              • OWNER_NAME - Specifies the name associated with the master account. Included as information about an organization.

              • NOTES - Additional text provided by the handshake initiator and intended for the recipient to read.

            • Resources (list) --

              When needed, contains an additional array of HandshakeResource objects.

    • NextToken (string) --

      If present, this value indicates that there is more output available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null .

ListHandshakesForOrganization (updated) Link ¶
Changes (request, response)
Request
{'Filter': {'ActionType': ['ADD_ORGANIZATIONS_SERVICE_LINKED_ROLE']}}
Response
{'Handshakes': {'Action': ['ADD_ORGANIZATIONS_SERVICE_LINKED_ROLE']}}

Lists the handshakes that are associated with the organization that the requesting user is part of. The ListHandshakesForOrganization operation returns a list of handshake structures. Each structure contains details and status about a handshake.

Handshakes that are ACCEPTED, DECLINED, or CANCELED appear in the results of this API for only 30 days after changing to that state. After that they are deleted and no longer accessible.

This operation can be called only from the organization's master account.

See also: AWS API Documentation

Request Syntax

client.list_handshakes_for_organization(
    Filter={
        'ActionType': 'INVITE'|'ENABLE_ALL_FEATURES'|'APPROVE_ALL_FEATURES'|'ADD_ORGANIZATIONS_SERVICE_LINKED_ROLE',
        'ParentHandshakeId': 'string'
    },
    NextToken='string',
    MaxResults=123
)
type Filter

dict

param Filter

A filter of the handshakes that you want included in the response. The default is all types. Use the ActionType element to limit the output to only a specified type, such as INVITE , ENABLE-ALL-FEATURES , or APPROVE-ALL-FEATURES . Alternatively, for the ENABLE-ALL-FEATURES handshake that generates a separate child handshake for each member account, you can specify the ParentHandshakeId to see only the handshakes that were generated by that parent request.

  • ActionType (string) --

    Specifies the type of handshake action.

    If you specify ActionType , you cannot also specify ParentHandshakeId .

  • ParentHandshakeId (string) --

    Specifies the parent handshake. Only used for handshake types that are a child of another type.

    If you specify ParentHandshakeId , you cannot also specify ActionType .

    The regex pattern for handshake ID string requires "h-" followed by from 8 to 32 lower-case letters or digits.

type NextToken

string

param NextToken

Use this parameter if you receive a NextToken response in a previous request that indicates that there is more output available. Set it to the value of the previous call's NextToken response to indicate where the output should continue from.

type MaxResults

integer

param MaxResults

(Optional) Use this to limit the number of results you want included in the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the maximum you specify, the NextToken response element is present and has a value (is not null). Include that value as the NextToken request parameter in the next call to the operation to get the next part of the results. Note that Organizations might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.

rtype

dict

returns

Response Syntax

{
    'Handshakes': [
        {
            'Id': 'string',
            'Arn': 'string',
            'Parties': [
                {
                    'Id': 'string',
                    'Type': 'ACCOUNT'|'ORGANIZATION'|'EMAIL'
                },
            ],
            'State': 'REQUESTED'|'OPEN'|'CANCELED'|'ACCEPTED'|'DECLINED'|'EXPIRED',
            'RequestedTimestamp': datetime(2015, 1, 1),
            'ExpirationTimestamp': datetime(2015, 1, 1),
            'Action': 'INVITE'|'ENABLE_ALL_FEATURES'|'APPROVE_ALL_FEATURES'|'ADD_ORGANIZATIONS_SERVICE_LINKED_ROLE',
            'Resources': [
                {
                    'Value': 'string',
                    'Type': 'ACCOUNT'|'ORGANIZATION'|'ORGANIZATION_FEATURE_SET'|'EMAIL'|'MASTER_EMAIL'|'MASTER_NAME'|'NOTES'|'PARENT_HANDSHAKE',
                    'Resources': {'... recursive ...'}
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Handshakes (list) --

      A list of Handshake objects with details about each of the handshakes that are associated with an organization.

      • (dict) --

        Contains information that must be exchanged to securely establish a relationship between two accounts (an originator and a recipient ). For example, when a master account (the originator) invites another account (the recipient) to join its organization, the two accounts exchange information as a series of handshake requests and responses.

        Note: Handshakes that are CANCELED, ACCEPTED, or DECLINED show up in lists for only 30 days after entering that state After that they are deleted.

        • Id (string) --

          The unique identifier (ID) of a handshake. The originating account creates the ID when it initiates the handshake.

          The regex pattern for handshake ID string requires "h-" followed by from 8 to 32 lower-case letters or digits.

        • Arn (string) --

          The Amazon Resource Name (ARN) of a handshake.

          For more information about ARNs in Organizations, see ARN Formats Supported by Organizations in the AWS Organizations User Guide .

        • Parties (list) --

          Information about the two accounts that are participating in the handshake.

          • (dict) --

            Identifies a participant in a handshake.

            • Id (string) --

              The unique identifier (ID) for the party.

              The regex pattern for handshake ID string requires "h-" followed by from 8 to 32 lower-case letters or digits.

            • Type (string) --

              The type of party.

        • State (string) --

          The current state of the handshake. Use the state to trace the flow of the handshake through the process from its creation to its acceptance. The meaning of each of the valid values is as follows:

          • REQUESTED : This handshake was sent to multiple recipients (applicable to only some handshake types) and not all recipients have responded yet. The request stays in this state until all recipients respond.

          • OPEN : This handshake was sent to multiple recipients (applicable to only some policy types) and all recipients have responded, allowing the originator to complete the handshake action.

          • CANCELED : This handshake is no longer active because it was canceled by the originating account.

          • ACCEPTED : This handshake is complete because it has been accepted by the recipient.

          • DECLINED : This handshake is no longer active because it was declined by the recipient account.

          • EXPIRED : This handshake is no longer active because the originator did not receive a response of any kind from the recipient before the expiration time (15 days).

        • RequestedTimestamp (datetime) --

          The date and time that the handshake request was made.

        • ExpirationTimestamp (datetime) --

          The date and time that the handshake expires. If the recipient of the handshake request fails to respond before the specified date and time, the handshake becomes inactive and is no longer valid.

        • Action (string) --

          The type of handshake, indicating what action occurs when the recipient accepts the handshake. The following handshake types are supported:

          • INVITE : This type of handshake represents a request to join an organization. It is always sent from the master account to only non-member accounts.

          • ENABLE_ALL_FEATURES : This type of handshake represents a request to enable all features in an organization. It is always sent from the master account to only invited member accounts. Created accounts do not receive this because those accounts were created by the organization's master account and approval is inferred.

          • APPROVE_ALL_FEATURES : This type of handshake is sent from the Organizations service when all member accounts have approved the ENABLE_ALL_FEATURES invitation. It is sent only to the master account and signals the master that it can finalize the process to enable all features.

        • Resources (list) --

          Additional information that is needed to process the handshake.

          • (dict) --

            Contains additional data that is needed to process a handshake.

            • Value (string) --

              The information that is passed to the other party in the handshake. The format of the value string must match the requirements of the specified type.

            • Type (string) --

              The type of information being passed, specifying how the value is to be interpreted by the other party:

              • ACCOUNT - Specifies an AWS account ID number.

              • ORGANIZATION - Specifies an organization ID number.

              • EMAIL - Specifies the email address that is associated with the account that receives the handshake.

              • OWNER_EMAIL - Specifies the email address associated with the master account. Included as information about an organization.

              • OWNER_NAME - Specifies the name associated with the master account. Included as information about an organization.

              • NOTES - Additional text provided by the handshake initiator and intended for the recipient to read.

            • Resources (list) --

              When needed, contains an additional array of HandshakeResource objects.

    • NextToken (string) --

      If present, this value indicates that there is more output available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null .