AWS Organizations

2020/09/15 - AWS Organizations - 5 updated api methods

Changes  Update organizations client to latest version

CreateAccount (updated) Link ¶
Changes (request)
{'Tags': [{'Key': 'string', 'Value': 'string'}]}

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. Because CreateAccount operates asynchronously, it can return a successful completion message even though account initialization might still be in progress. You might need to wait a few minutes before you can successfully access the account. To check the status of the request, do one of the following:

  • Use the OperationId response element from this operation to provide as a parameter to the DescribeCreateAccountStatus operation.

  • Check the AWS CloudTrail log for the CreateAccountResult event. For information on using AWS CloudTrail with AWS Organizations, see Monitoring the Activity in Your Organization in the AWS Organizations User Guide.

The user who calls the API to create an account must have the organizations:CreateAccount permission. If you enabled all features in the organization, AWS Organizations creates the required service-linked role named AWSServiceRoleForOrganizations. For more information, see AWS Organizations and Service-Linked Roles in the AWS Organizations User Guide.

If the request includes tags, then the requester must have the organizations:TagResource permission.

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.

This operation can be called only 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.

See also: AWS API Documentation

Request Syntax

client.create_account(
    Email='string',
    AccountName='string',
    RoleName='string',
    IamUserAccessToBilling='ALLOW'|'DENY',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
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 can't 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 AWS 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 don't specify this parameter, the role name defaults to OrganizationAccountAccessRole.

For more information about how to use this role to access the member account, see the following links:

The regex pattern that is used to validate this parameter. The pattern can include 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, 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 don't 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.

type Tags:

list

param Tags:

A list of tags that you want to attach to the newly created account. For each tag in the list, you must specify both a tag key and a value. You can set the value to an empty string, but you can't set it to null. For more information about tagging, see Tagging AWS Organizations resources in the AWS Organizations User Guide.

  • (dict) --

    A custom key-value pair associated with a resource within your organization.

    You can attach tags to any of the following organization resources.

    • AWS account

    • Organizational unit (OU)

    • Organization root

    • Policy

    • Key (string) -- [REQUIRED]

      The key identifier, or name, of the tag.

    • Value (string) -- [REQUIRED]

      The string value that's associated with the key of the tag. You can set the value of a tag to an empty string, but you can't set the value of a tag to null.

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',
        'GovCloudAccountId': 'string',
        'FailureReason': 'ACCOUNT_LIMIT_EXCEEDED'|'EMAIL_ALREADY_EXISTS'|'INVALID_ADDRESS'|'INVALID_EMAIL'|'CONCURRENT_ACCOUNT_MODIFICATION'|'INTERNAL_FAILURE'|'GOVCLOUD_ACCOUNT_ALREADY_EXISTS'|'MISSING_BUSINESS_VALIDATION'|'MISSING_PAYMENT_INSTRUMENT'
    }
}

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. You can also check the AWS CloudTrail log for the CreateAccountResult event. For more information, see Monitoring the Activity in Your Organization in the AWS Organizations User Guide.

      • 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 a 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.

      • GovCloudAccountId (string) --

        If the account was created successfully, the unique identifier (ID) of the new account in the AWS GovCloud (US) Region.

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

        • CONCURRENT_ACCOUNT_MODIFICATION: You already submitted a request with the same information.

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

        • GOVCLOUD_ACCOUNT_ALREADY_EXISTS: The account in the AWS GovCloud (US) Region could not be created because this Region already includes an account with that email address.

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

        • MISSING_BUSINESS_VALIDATION: The AWS account that owns your organization has not received Business Validation.

        • MISSING_PAYMENT_INSTRUMENT: You must configure the master account with a valid payment method, such as a credit card.

CreateGovCloudAccount (updated) Link ¶
Changes (request)
{'Tags': [{'Key': 'string', 'Value': 'string'}]}

This action is available if all of the following are true:

  • You're authorized to create accounts in the AWS GovCloud (US) Region. For more information on the AWS GovCloud (US) Region, see the AWS GovCloud User Guide.

  • You already have an account in the AWS GovCloud (US) Region that is associated with your master account in the commercial Region.

  • You call this action from the master account of your organization in the commercial Region.

  • You have the organizations:CreateGovCloudAccount permission.

AWS Organizations automatically creates the required service-linked role named AWSServiceRoleForOrganizations. For more information, see AWS Organizations and Service-Linked Roles in the AWS Organizations User Guide.

AWS automatically enables AWS CloudTrail for AWS GovCloud (US) accounts, but you should also do the following:

  • Verify that AWS CloudTrail is enabled to store logs.

  • Create an S3 bucket for AWS CloudTrail log storage. For more information, see Verifying AWS CloudTrail Is Enabled in the AWS GovCloud User Guide.

If the request includes tags, then the requester must have the organizations:TagResource permission. The tags are attached to the commercial account associated with the GovCloud account, rather than the GovCloud account itself. To add tags to the GovCloud account, call the TagResource operation in the GovCloud Region after the new GovCloud account exists.

You call this action from the master account of your organization in the commercial Region to create a standalone AWS account in the AWS GovCloud (US) Region. After the account is created, the master account of an organization in the AWS GovCloud (US) Region can invite it to that organization. For more information on inviting standalone accounts in the AWS GovCloud (US) to join an organization, see AWS Organizations in the AWS GovCloud User Guide.

Calling CreateGovCloudAccount is an asynchronous request that AWS performs in the background. Because CreateGovCloudAccount operates asynchronously, it can return a successful completion message even though account initialization might still be in progress. You might need to wait a few minutes before you can successfully access the account. To check the status of the request, do one of the following:

  • Use the OperationId response element from this operation to provide as a parameter to the DescribeCreateAccountStatus operation.

  • Check the AWS CloudTrail log for the CreateAccountResult event. For information on using AWS CloudTrail with Organizations, see Monitoring the Activity in Your Organization in the AWS Organizations User Guide.

When you call the CreateGovCloudAccount action, you create two accounts: a standalone account in the AWS GovCloud (US) Region and an associated account in the commercial Region for billing and support purposes. The account in the commercial Region is automatically a member of the organization whose credentials made the request. Both accounts are associated with the same email address.

A role is created in the new account in the commercial Region that allows the master account in the organization in the commercial Region to assume it. An AWS GovCloud (US) account is then created and associated with the commercial account that you just created. A role is also created in the new AWS GovCloud (US) account that can be assumed by the AWS GovCloud (US) account that is associated with the master account of the commercial organization. For more information and to view a diagram that explains how account access works, see AWS Organizations in the AWS GovCloud User Guide.

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

See also: AWS API Documentation

Request Syntax

client.create_gov_cloud_account(
    Email='string',
    AccountName='string',
    RoleName='string',
    IamUserAccessToBilling='ALLOW'|'DENY',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
type Email:

string

param Email:

[REQUIRED]

The email address of the owner to assign to the new member account in the commercial Region. This email address must not already be associated with another AWS account. You must use a valid email address to complete account creation. You can't access the root user of the account or remove an account that was created with an invalid email address. Like all request parameters for CreateGovCloudAccount, the request for the email address for the AWS GovCloud (US) account originates from the commercial Region, not from the AWS GovCloud (US) Region.

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 AWS Organizations automatically preconfigures in the new member accounts in both the AWS GovCloud (US) Region and in the commercial Region. 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 don't 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. The pattern can include 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 linked account in the commercial Region enables IAM users to access account billing information if they have the required permissions. If set to DENY, 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 don't 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.

type Tags:

list

param Tags:

A list of tags that you want to attach to the newly created account. These tags are attached to the commercial account associated with the GovCloud account, and not to the GovCloud account itself. To add tags to the actual GovCloud account, call the TagResource operation in the GovCloud region after the new GovCloud account exists.

For each tag in the list, you must specify both a tag key and a value. You can set the value to an empty string, but you can't set it to null. For more information about tagging, see Tagging AWS Organizations resources in the AWS Organizations User Guide.

  • (dict) --

    A custom key-value pair associated with a resource within your organization.

    You can attach tags to any of the following organization resources.

    • AWS account

    • Organizational unit (OU)

    • Organization root

    • Policy

    • Key (string) -- [REQUIRED]

      The key identifier, or name, of the tag.

    • Value (string) -- [REQUIRED]

      The string value that's associated with the key of the tag. You can set the value of a tag to an empty string, but you can't set the value of a tag to null.

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',
        'GovCloudAccountId': 'string',
        'FailureReason': 'ACCOUNT_LIMIT_EXCEEDED'|'EMAIL_ALREADY_EXISTS'|'INVALID_ADDRESS'|'INVALID_EMAIL'|'CONCURRENT_ACCOUNT_MODIFICATION'|'INTERNAL_FAILURE'|'GOVCLOUD_ACCOUNT_ALREADY_EXISTS'|'MISSING_BUSINESS_VALIDATION'|'MISSING_PAYMENT_INSTRUMENT'
    }
}

Response Structure

  • (dict) --

    • CreateAccountStatus (dict) --

      Contains the status about a CreateAccount or CreateGovCloudAccount request to create an AWS account or an AWS GovCloud (US) 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 a 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.

      • GovCloudAccountId (string) --

        If the account was created successfully, the unique identifier (ID) of the new account in the AWS GovCloud (US) Region.

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

        • CONCURRENT_ACCOUNT_MODIFICATION: You already submitted a request with the same information.

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

        • GOVCLOUD_ACCOUNT_ALREADY_EXISTS: The account in the AWS GovCloud (US) Region could not be created because this Region already includes an account with that email address.

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

        • MISSING_BUSINESS_VALIDATION: The AWS account that owns your organization has not received Business Validation.

        • MISSING_PAYMENT_INSTRUMENT: You must configure the master account with a valid payment method, such as a credit card.

CreateOrganizationalUnit (updated) Link ¶
Changes (request)
{'Tags': [{'Key': 'string', 'Value': 'string'}]}

Creates an organizational unit (OU) within a root or parent OU. An OU is a container for accounts that enables you to organize your accounts to apply policies according to your business requirements. The number of levels deep that you can nest OUs is dependent upon the policy types enabled for that root. For service control policies, the limit is five.

For more information about OUs, see Managing Organizational Units in the AWS Organizations User Guide.

If the request includes tags, then the requester must have the organizations:TagResource permission.

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

See also: AWS API Documentation

Request Syntax

client.create_organizational_unit(
    ParentId='string',
    Name='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
type ParentId:

string

param ParentId:

[REQUIRED]

The unique identifier (ID) of the parent root or OU that you want to create the new OU in.

The regex pattern for a parent ID string requires one of the following:

  • Root - A string that begins with "r-" followed by from 4 to 32 lowercase letters or digits.

  • Organizational unit (OU) - A string that begins with "ou-" followed by from 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This string is followed by a second "-" dash and from 8 to 32 additional lowercase letters or digits.

type Name:

string

param Name:

[REQUIRED]

The friendly name to assign to the new OU.

type Tags:

list

param Tags:

A list of tags that you want to attach to the newly created OU. For each tag in the list, you must specify both a tag key and a value. You can set the value to an empty string, but you can't set it to null. For more information about tagging, see Tagging AWS Organizations resources in the AWS Organizations User Guide.

  • (dict) --

    A custom key-value pair associated with a resource within your organization.

    You can attach tags to any of the following organization resources.

    • AWS account

    • Organizational unit (OU)

    • Organization root

    • Policy

    • Key (string) -- [REQUIRED]

      The key identifier, or name, of the tag.

    • Value (string) -- [REQUIRED]

      The string value that's associated with the key of the tag. You can set the value of a tag to an empty string, but you can't set the value of a tag to null.

rtype:

dict

returns:

Response Syntax

{
    'OrganizationalUnit': {
        'Id': 'string',
        'Arn': 'string',
        'Name': 'string'
    }
}

Response Structure

  • (dict) --

    • OrganizationalUnit (dict) --

      A structure that contains details about the newly created OU.

      • Id (string) --

        The unique identifier (ID) associated with this OU.

        The regex pattern for an organizational unit ID string requires "ou-" followed by from 4 to 32 lower-case letters or digits (the ID of the root that contains the OU). This string is followed by a second "-" dash and from 8 to 32 additional lower-case letters or digits.

      • Arn (string) --

        The Amazon Resource Name (ARN) of this OU.

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

      • Name (string) --

        The friendly name of this OU.

        The regex pattern that is used to validate this parameter is a string of any of the characters in the ASCII character range.

CreatePolicy (updated) Link ¶
Changes (request)
{'Tags': [{'Key': 'string', 'Value': 'string'}]}

Creates a policy of a specified type that you can attach to a root, an organizational unit (OU), or an individual AWS account.

For more information about policies and their use, see Managing Organization Policies.

If the request includes tags, then the requester must have the organizations:TagResource permission.

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

See also: AWS API Documentation

Request Syntax

client.create_policy(
    Content='string',
    Description='string',
    Name='string',
    Type='SERVICE_CONTROL_POLICY'|'TAG_POLICY'|'BACKUP_POLICY'|'AISERVICES_OPT_OUT_POLICY',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
type Content:

string

param Content:

[REQUIRED]

The policy text content to add to the new policy. The text that you supply must adhere to the rules of the policy type you specify in the Type parameter.

type Description:

string

param Description:

[REQUIRED]

An optional description to assign to the policy.

type Name:

string

param Name:

[REQUIRED]

The friendly name to assign to the policy.

The regex pattern that is used to validate this parameter is a string of any of the characters in the ASCII character range.

type Type:

string

param Type:

[REQUIRED]

The type of policy to create. You can specify one of the following values:

type Tags:

list

param Tags:

A list of tags that you want to attach to the newly created policy. For each tag in the list, you must specify both a tag key and a value. You can set the value to an empty string, but you can't set it to null. For more information about tagging, see Tagging AWS Organizations resources in the AWS Organizations User Guide.

  • (dict) --

    A custom key-value pair associated with a resource within your organization.

    You can attach tags to any of the following organization resources.

    • AWS account

    • Organizational unit (OU)

    • Organization root

    • Policy

    • Key (string) -- [REQUIRED]

      The key identifier, or name, of the tag.

    • Value (string) -- [REQUIRED]

      The string value that's associated with the key of the tag. You can set the value of a tag to an empty string, but you can't set the value of a tag to null.

rtype:

dict

returns:

Response Syntax

{
    'Policy': {
        'PolicySummary': {
            'Id': 'string',
            'Arn': 'string',
            'Name': 'string',
            'Description': 'string',
            'Type': 'SERVICE_CONTROL_POLICY'|'TAG_POLICY'|'BACKUP_POLICY'|'AISERVICES_OPT_OUT_POLICY',
            'AwsManaged': True|False
        },
        'Content': 'string'
    }
}

Response Structure

  • (dict) --

    • Policy (dict) --

      A structure that contains details about the newly created policy.

      • PolicySummary (dict) --

        A structure that contains additional details about the policy.

        • Id (string) --

          The unique identifier (ID) of the policy.

          The regex pattern for a policy ID string requires "p-" followed by from 8 to 128 lower-case letters or digits.

        • Arn (string) --

          The Amazon Resource Name (ARN) of the policy.

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

        • Name (string) --

          The friendly name of the policy.

          The regex pattern that is used to validate this parameter is a string of any of the characters in the ASCII character range.

        • Description (string) --

          The description of the policy.

        • Type (string) --

          The type of policy.

        • AwsManaged (boolean) --

          A boolean value that indicates whether the specified policy is an AWS managed policy. If true, then you can attach the policy to roots, OUs, or accounts, but you cannot edit it.

      • Content (string) --

        The text content of the policy.

InviteAccountToOrganization (updated) Link ¶
Changes (request)
{'Tags': [{'Key': 'string', 'Value': 'string'}]}

Sends an invitation to another account to join your organization as a member account. AWS 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.

If the request includes tags, then the requester must have the organizations:TagResource permission.

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

See also: AWS API Documentation

Request Syntax

client.invite_account_to_organization(
    Target={
        'Id': 'string',
        'Type': 'ACCOUNT'|'ORGANIZATION'|'EMAIL'
    },
    Notes='string',
    Tags=[
        {
            'Key': 'string',
            'Value': '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", you must provide the AWS account ID number as the Id. If you specify "Type": "EMAIL", you must specify the email address that is associated with the account.

--target Id=diego@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.

type Tags:

list

param Tags:

A list of tags that you want to attach to the account when it becomes a member of the organization. For each tag in the list, you must specify both a tag key and a value. You can set the value to an empty string, but you can't set it to null. For more information about tagging, see Tagging AWS Organizations resources in the AWS Organizations User Guide.

  • (dict) --

    A custom key-value pair associated with a resource within your organization.

    You can attach tags to any of the following organization resources.

    • AWS account

    • Organizational unit (OU)

    • Organization root

    • Policy

    • Key (string) -- [REQUIRED]

      The key identifier, or name, of the tag.

    • Value (string) -- [REQUIRED]

      The string value that's associated with the key of the tag. You can set the value of a tag to an empty string, but you can't set the value of a tag to null.

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.