Table of Contents
Organizations.Client¶A low-level client representing AWS Organizations:
client = session.create_client('organizations')
These are the available methods:
accept_handshake()attach_policy()can_paginate()cancel_handshake()create_account()create_organization()create_organizational_unit()create_policy()decline_handshake()delete_organization()delete_organizational_unit()delete_policy()describe_account()describe_create_account_status()describe_handshake()describe_organization()describe_organizational_unit()describe_policy()detach_policy()disable_policy_type()enable_all_features()enable_policy_type()generate_presigned_url()get_paginator()get_waiter()invite_account_to_organization()leave_organization()list_accounts()list_accounts_for_parent()list_children()list_create_account_status()list_handshakes_for_account()list_handshakes_for_organization()list_organizational_units_for_parent()list_parents()list_policies()list_policies_for_target()list_roots()list_targets_for_policy()move_account()remove_account_from_organization()update_organizational_unit()update_policy()accept_handshake(**kwargs)¶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:
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
response = client.accept_handshake(
HandshakeId='string'
)
| Parameters: | HandshakeId (string) – [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. |
|---|---|
| Return type: | 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',
'Resources': [
{
'Value': 'string',
'Type': 'ACCOUNT'|'ORGANIZATION'|'ORGANIZATION_FEATURE_SET'|'EMAIL'|'MASTER_EMAIL'|'MASTER_NAME'|'NOTES'|'PARENT_HANDSHAKE',
'Resources': {'... recursive ...'}
},
]
}
}
Response Structure
|
attach_policy(**kwargs)¶Attaches a policy to a root, an organizational unit, or an individual account. How the policy affects accounts depends on the type of policy:
SCPs essentially are permission “filters”. When you attach one SCP to a higher level root or OU, and you also attach a different SCP to a child OU or to an account, the child policy can further restrict only the permissions that pass through the parent filter and are available to the child. An SCP that is attached to a child cannot grant a permission that is not already granted by the parent. For example, imagine that the parent SCP allows permissions A, B, C, D, and E. The child SCP allows C, D, E, F, and G. The result is that the accounts affected by the child SCP are allowed to use only C, D, and E. They cannot use A or B because they were filtered out by the child OU. They also cannot use F and G because they were filtered out by the parent OU. They cannot be granted back by the child SCP; child SCPs can only filter the permissions they receive from the parent SCP.
AWS Organizations attaches a default SCP named "FullAWSAccess to every root, OU, and account. This default SCP allows all services and actions, enabling any new child OU or account to inherit the permissions of the parent root or OU. If you detach the default policy, you must replace it with a policy that specifies the permissions that you want to allow in that OU or account.
For more information about how Organizations policies permissions work, see Using Service Control Policies in the AWS Organizations User Guide .
This operation can be called only from the organization’s master account.
See also: AWS API Documentation
Request Syntax
response = client.attach_policy(
PolicyId='string',
TargetId='string'
)
| Parameters: |
|
|---|---|
| Returns: | None |
can_paginate(operation_name)¶Check if an operation can be paginated.
| Parameters: | operation_name (string) – The operation name. This is the same name
as the method name on the client. For example, if the
method name is create_foo, and you’d normally invoke the
operation as client.create_foo(**kwargs), if the
create_foo operation can be paginated, you can use the
call client.get_paginator("create_foo"). |
|---|---|
| Returns: | True if the operation can be paginated,
False otherwise. |
cancel_handshake(**kwargs)¶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
response = client.cancel_handshake(
HandshakeId='string'
)
| Parameters: | HandshakeId (string) – [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. |
|---|---|
| Return type: | 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',
'Resources': [
{
'Value': 'string',
'Type': 'ACCOUNT'|'ORGANIZATION'|'ORGANIZATION_FEATURE_SET'|'EMAIL'|'MASTER_EMAIL'|'MASTER_NAME'|'NOTES'|'PARENT_HANDSHAKE',
'Resources': {'... recursive ...'}
},
]
}
}
Response Structure
|
create_account(**kwargs)¶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.
AWS Organizations preconfigures the new member account with a role (named OrganizationAccountAccessRole by default) that grants administrator permissions to the new 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
You cannot remove accounts that are created with this operation from an organization. That also means that you cannot delete an organization that contains an account that is created with this operation.
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.
See also: AWS API Documentation
Request Syntax
response = client.create_account(
Email='string',
AccountName='string',
RoleName='string',
IamUserAccessToBilling='ALLOW'|'DENY'
)
| Parameters: |
|
|---|---|
| Return type: | 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'|'INTERNAL_FAILURE'
}
}
Response Structure
|
create_organization(**kwargs)¶Creates an AWS organization. The account whose user is calling the CreateOrganization operation automatically becomes the master account of the new organization.
This operation must be called using credentials from the account that is to become the new organization’s master account. The principal must also have the relevant IAM permissions.
By default (or if you set the FeatureSet parameter to ALL ), the new organization is created with all features enabled and service control policies automatically enabled in the root. If you instead choose to create the organization supporting only the consolidated billing features by setting the FeatureSet parameter to CONSOLIDATED_BILLING" , then no policy types are enabled by default and you cannot use organization policies.
See also: AWS API Documentation
Request Syntax
response = client.create_organization(
FeatureSet='ALL'|'CONSOLIDATED_BILLING'
)
| Parameters: | FeatureSet (string) – Specifies the feature set supported by the new organization. Each feature set supports different levels of functionality.
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'Organization': {
'Id': 'string',
'Arn': 'string',
'FeatureSet': 'ALL'|'CONSOLIDATED_BILLING',
'MasterAccountArn': 'string',
'MasterAccountId': 'string',
'MasterAccountEmail': 'string',
'AvailablePolicyTypes': [
{
'Type': 'SERVICE_CONTROL_POLICY',
'Status': 'ENABLED'|'PENDING_ENABLE'|'PENDING_DISABLE'
},
]
}
}
Response Structure
|
create_organizational_unit(**kwargs)¶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 .
This operation can be called only from the organization’s master account.
See also: AWS API Documentation
Request Syntax
response = client.create_organizational_unit(
ParentId='string',
Name='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'OrganizationalUnit': {
'Id': 'string',
'Arn': 'string',
'Name': 'string'
}
}
Response Structure
|
create_policy(**kwargs)¶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 .
This operation can be called only from the organization’s master account.
See also: AWS API Documentation
Request Syntax
response = client.create_policy(
Content='string',
Description='string',
Name='string',
Type='SERVICE_CONTROL_POLICY'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Policy': {
'PolicySummary': {
'Id': 'string',
'Arn': 'string',
'Name': 'string',
'Description': 'string',
'Type': 'SERVICE_CONTROL_POLICY',
'AwsManaged': True|False
},
'Content': 'string'
}
}
Response Structure
|
decline_handshake(**kwargs)¶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
response = client.decline_handshake(
HandshakeId='string'
)
| Parameters: | HandshakeId (string) – [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. |
|---|---|
| Return type: | 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',
'Resources': [
{
'Value': 'string',
'Type': 'ACCOUNT'|'ORGANIZATION'|'ORGANIZATION_FEATURE_SET'|'EMAIL'|'MASTER_EMAIL'|'MASTER_NAME'|'NOTES'|'PARENT_HANDSHAKE',
'Resources': {'... recursive ...'}
},
]
}
}
Response Structure
|
delete_organization()¶Deletes the organization. You can delete an organization only by using credentials from the master account. The organization must be empty of member accounts, OUs, and policies.
Warning
If you create any accounts using Organizations operations or the Organizations console, you can’t remove those accounts from the organization, which means that you can’t delete the organization.
See also: AWS API Documentation
Request Syntax
response = client.delete_organization()
| Returns: | None |
|---|
delete_organizational_unit(**kwargs)¶Deletes an organizational unit from a root or another OU. You must first remove all accounts and child OUs from the OU that you want to delete.
This operation can be called only from the organization’s master account.
See also: AWS API Documentation
Request Syntax
response = client.delete_organizational_unit(
OrganizationalUnitId='string'
)
| Parameters: | OrganizationalUnitId (string) – [REQUIRED] The unique identifier (ID) of the organizational unit that you want to delete. You can get the ID from the ListOrganizationalUnitsForParent operation. 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) followed by a second “-” dash and from 8 to 32 additional lower-case letters or digits. |
|---|---|
| Returns: | None |
delete_policy(**kwargs)¶Deletes the specified policy from your organization. Before you perform this operation, you must first detach the policy from all OUs, roots, and accounts.
This operation can be called only from the organization’s master account.
See also: AWS API Documentation
Request Syntax
response = client.delete_policy(
PolicyId='string'
)
| Parameters: | PolicyId (string) – [REQUIRED] The unique identifier (ID) of the policy that you want to delete. You can get the ID from the ListPolicies or ListPoliciesForTarget operations. The regex pattern for a policy ID string requires “p-” followed by from 8 to 128 lower-case letters or digits. |
|---|---|
| Returns: | None |
describe_account(**kwargs)¶Retrieves Organizations-related information about the specified account.
This operation can be called only from the organization’s master account.
See also: AWS API Documentation
Request Syntax
response = client.describe_account(
AccountId='string'
)
| Parameters: | AccountId (string) – [REQUIRED] The unique identifier (ID) of the AWS account that you want information about. You can get the ID from the ListAccounts or ListAccountsForParent operations. The regex pattern for an account ID string requires exactly 12 digits. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'Account': {
'Id': 'string',
'Arn': 'string',
'Email': 'string',
'Name': 'string',
'Status': 'ACTIVE'|'SUSPENDED',
'JoinedMethod': 'INVITED'|'CREATED',
'JoinedTimestamp': datetime(2015, 1, 1)
}
}
Response Structure
|
describe_create_account_status(**kwargs)¶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
response = client.describe_create_account_status(
CreateAccountRequestId='string'
)
| Parameters: | CreateAccountRequestId (string) – [REQUIRED] Specifies the The regex pattern for an create account request ID string requires “car-” followed by from 8 to 32 lower-case letters or digits. |
|---|---|
| Return type: | 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'|'INTERNAL_FAILURE'
}
}
Response Structure
|
describe_handshake(**kwargs)¶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
response = client.describe_handshake(
HandshakeId='string'
)
| Parameters: | HandshakeId (string) – [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. |
|---|---|
| Return type: | 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',
'Resources': [
{
'Value': 'string',
'Type': 'ACCOUNT'|'ORGANIZATION'|'ORGANIZATION_FEATURE_SET'|'EMAIL'|'MASTER_EMAIL'|'MASTER_NAME'|'NOTES'|'PARENT_HANDSHAKE',
'Resources': {'... recursive ...'}
},
]
}
}
Response Structure
|
describe_organization()¶Retrieves information about the organization that the user’s account belongs to.
This operation can be called from any account in the organization.
See also: AWS API Documentation
Request Syntax
response = client.describe_organization()
| Return type: | dict |
|---|---|
| Returns: | Response Syntax{
'Organization': {
'Id': 'string',
'Arn': 'string',
'FeatureSet': 'ALL'|'CONSOLIDATED_BILLING',
'MasterAccountArn': 'string',
'MasterAccountId': 'string',
'MasterAccountEmail': 'string',
'AvailablePolicyTypes': [
{
'Type': 'SERVICE_CONTROL_POLICY',
'Status': 'ENABLED'|'PENDING_ENABLE'|'PENDING_DISABLE'
},
]
}
}
Response Structure
|
describe_organizational_unit(**kwargs)¶Retrieves information about an organizational unit (OU).
This operation can be called only from the organization’s master account.
See also: AWS API Documentation
Request Syntax
response = client.describe_organizational_unit(
OrganizationalUnitId='string'
)
| Parameters: | OrganizationalUnitId (string) – [REQUIRED] The unique identifier (ID) of the organizational unit that you want details about. You can get the ID from the ListOrganizationalUnitsForParent operation. 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) followed by a second “-” dash and from 8 to 32 additional lower-case letters or digits. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'OrganizationalUnit': {
'Id': 'string',
'Arn': 'string',
'Name': 'string'
}
}
Response Structure
|
describe_policy(**kwargs)¶Retrieves information about a policy.
This operation can be called only from the organization’s master account.
See also: AWS API Documentation
Request Syntax
response = client.describe_policy(
PolicyId='string'
)
| Parameters: | PolicyId (string) – [REQUIRED] The unique identifier (ID) of the policy that you want details about. You can get the ID from the ListPolicies or ListPoliciesForTarget operations. The regex pattern for a policy ID string requires “p-” followed by from 8 to 128 lower-case letters or digits. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'Policy': {
'PolicySummary': {
'Id': 'string',
'Arn': 'string',
'Name': 'string',
'Description': 'string',
'Type': 'SERVICE_CONTROL_POLICY',
'AwsManaged': True|False
},
'Content': 'string'
}
}
Response Structure
|
detach_policy(**kwargs)¶Detaches a policy from a target root, organizational unit, or account. If the policy being detached is a service control policy (SCP), the changes to permissions for IAM users and roles in affected accounts are immediate.
Note: Every root, OU, and account must have at least one SCP attached. If you want to replace the defaultFullAWSAccesspolicy with one that limits the permissions that can be delegated, then you must attach the replacement policy before you can remove the default one. This is the authorization strategy of whitelisting . If you instead attach a second SCP and leave theFullAWSAccessSCP still attached, and specify"Effect": "Deny"in the second SCP to override the"Effect": "Allow"in theFullAWSAccesspolicy (or any other attached SCP), then you are using the authorization strategy of blacklisting .
This operation can be called only from the organization’s master account.
See also: AWS API Documentation
Request Syntax
response = client.detach_policy(
PolicyId='string',
TargetId='string'
)
| Parameters: |
|
|---|---|
| Returns: | None |
disable_policy_type(**kwargs)¶Disables an organizational control policy type in a root. A poicy of a certain type can be attached to entities in a root only if that type is enabled in the root. After you perform this operation, you no longer can attach policies of the specified type to that root or to any OU or account in that root. You can undo this by using the EnablePolicyType operation.
This operation can be called only from the organization’s master account.
See also: AWS API Documentation
Request Syntax
response = client.disable_policy_type(
RootId='string',
PolicyType='SERVICE_CONTROL_POLICY'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Root': {
'Id': 'string',
'Arn': 'string',
'Name': 'string',
'PolicyTypes': [
{
'Type': 'SERVICE_CONTROL_POLICY',
'Status': 'ENABLED'|'PENDING_ENABLE'|'PENDING_DISABLE'
},
]
}
}
Response Structure
|
enable_all_features()¶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
response = client.enable_all_features()
| Return type: | 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',
'Resources': [
{
'Value': 'string',
'Type': 'ACCOUNT'|'ORGANIZATION'|'ORGANIZATION_FEATURE_SET'|'EMAIL'|'MASTER_EMAIL'|'MASTER_NAME'|'NOTES'|'PARENT_HANDSHAKE',
'Resources': {'... recursive ...'}
},
]
}
}
Response Structure
|
enable_policy_type(**kwargs)¶Enables a policy type in a root. After you enable a policy type in a root, you can attach policies of that type to the root, any OU, or account in that root. You can undo this by using the DisablePolicyType operation.
This operation can be called only from the organization’s master account.
See also: AWS API Documentation
Request Syntax
response = client.enable_policy_type(
RootId='string',
PolicyType='SERVICE_CONTROL_POLICY'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Root': {
'Id': 'string',
'Arn': 'string',
'Name': 'string',
'PolicyTypes': [
{
'Type': 'SERVICE_CONTROL_POLICY',
'Status': 'ENABLED'|'PENDING_ENABLE'|'PENDING_DISABLE'
},
]
}
}
Response Structure
|
generate_presigned_url(ClientMethod, Params=None, ExpiresIn=3600, HttpMethod=None)¶Generate a presigned url given a client, its method, and arguments
| Parameters: |
|
|---|---|
| Returns: | The presigned url |
get_paginator(operation_name)¶Create a paginator for an operation.
| Parameters: | operation_name (string) – The operation name. This is the same name
as the method name on the client. For example, if the
method name is create_foo, and you’d normally invoke the
operation as client.create_foo(**kwargs), if the
create_foo operation can be paginated, you can use the
call client.get_paginator("create_foo"). |
|---|---|
| Raises: | OperationNotPageableError – Raised if the operation is not
pageable. You can use the client.can_paginate method to
check if an operation is pageable. |
| Return type: | L{botocore.paginate.Paginator} |
| Returns: | A paginator object. |
get_waiter(waiter_name)¶invite_account_to_organization(**kwargs)¶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 reseller as the master account. For example, if your organization’s master account was created by Amazon Internet Services Pvt. Ltd (AISPL), an AWS reseller in India, then you can only invite other AISPL accounts to your organization. You can’t combine accounts from AISPL and AWS. For more information, see Consolidated Billing in India .
This operation can be called only from the organization’s master account.
See also: AWS API Documentation
Request Syntax
response = client.invite_account_to_organization(
Target={
'Id': 'string',
'Type': 'ACCOUNT'|'ORGANIZATION'|'EMAIL'
},
Notes='string'
)
| Parameters: |
|
|---|---|
| Return type: | 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',
'Resources': [
{
'Value': 'string',
'Type': 'ACCOUNT'|'ORGANIZATION'|'ORGANIZATION_FEATURE_SET'|'EMAIL'|'MASTER_EMAIL'|'MASTER_NAME'|'NOTES'|'PARENT_HANDSHAKE',
'Resources': {'... recursive ...'}
},
]
}
}
Response Structure
|
leave_organization()¶Removes a member account from its parent organization. This version of the operation is performed by the account that wants to leave. To remove a member account as a user in the master account, use RemoveAccountFromOrganization instead.
This operation can be called only from a member account in the organization.
Warning
LeaveOrganization and leaving the organization.See also: AWS API Documentation
Request Syntax
response = client.leave_organization()
| Returns: | None |
|---|
list_accounts(**kwargs)¶Lists all the accounts in the organization. To request only the accounts in a root or OU, use the ListAccountsForParent operation instead.
This operation can be called only from the organization’s master account.
See also: AWS API Documentation
Request Syntax
response = client.list_accounts(
NextToken='string',
MaxResults=123
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Accounts': [
{
'Id': 'string',
'Arn': 'string',
'Email': 'string',
'Name': 'string',
'Status': 'ACTIVE'|'SUSPENDED',
'JoinedMethod': 'INVITED'|'CREATED',
'JoinedTimestamp': datetime(2015, 1, 1)
},
],
'NextToken': 'string'
}
Response Structure
|
list_accounts_for_parent(**kwargs)¶Lists the accounts in an organization that are contained by the specified target root or organizational unit (OU). If you specify the root, you get a list of all the accounts that are not in any OU. If you specify an OU, you get a list of all the accounts in only that OU, and not in any child OUs. To get a list of all accounts in the organization, use the ListAccounts operation.
See also: AWS API Documentation
Request Syntax
response = client.list_accounts_for_parent(
ParentId='string',
NextToken='string',
MaxResults=123
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Accounts': [
{
'Id': 'string',
'Arn': 'string',
'Email': 'string',
'Name': 'string',
'Status': 'ACTIVE'|'SUSPENDED',
'JoinedMethod': 'INVITED'|'CREATED',
'JoinedTimestamp': datetime(2015, 1, 1)
},
],
'NextToken': 'string'
}
Response Structure
|
list_children(**kwargs)¶Lists all of the OUs or accounts that are contained in the specified parent OU or root. This operation, along with ListParents enables you to traverse the tree structure that makes up this root.
See also: AWS API Documentation
Request Syntax
response = client.list_children(
ParentId='string',
ChildType='ACCOUNT'|'ORGANIZATIONAL_UNIT',
NextToken='string',
MaxResults=123
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Children': [
{
'Id': 'string',
'Type': 'ACCOUNT'|'ORGANIZATIONAL_UNIT'
},
],
'NextToken': 'string'
}
Response Structure
|
list_create_account_status(**kwargs)¶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
response = client.list_create_account_status(
States=[
'IN_PROGRESS'|'SUCCEEDED'|'FAILED',
],
NextToken='string',
MaxResults=123
)
| Parameters: |
|
|---|---|
| Return type: | 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'|'INTERNAL_FAILURE'
},
],
'NextToken': 'string'
}
Response Structure
|
list_handshakes_for_account(**kwargs)¶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
response = client.list_handshakes_for_account(
Filter={
'ActionType': 'INVITE'|'ENABLE_ALL_FEATURES'|'APPROVE_ALL_FEATURES',
'ParentHandshakeId': 'string'
},
NextToken='string',
MaxResults=123
)
| Parameters: |
|
|---|---|
| Return type: | 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',
'Resources': [
{
'Value': 'string',
'Type': 'ACCOUNT'|'ORGANIZATION'|'ORGANIZATION_FEATURE_SET'|'EMAIL'|'MASTER_EMAIL'|'MASTER_NAME'|'NOTES'|'PARENT_HANDSHAKE',
'Resources': {'... recursive ...'}
},
]
},
],
'NextToken': 'string'
}
Response Structure
|
list_handshakes_for_organization(**kwargs)¶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
response = client.list_handshakes_for_organization(
Filter={
'ActionType': 'INVITE'|'ENABLE_ALL_FEATURES'|'APPROVE_ALL_FEATURES',
'ParentHandshakeId': 'string'
},
NextToken='string',
MaxResults=123
)
| Parameters: |
|
|---|---|
| Return type: | 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',
'Resources': [
{
'Value': 'string',
'Type': 'ACCOUNT'|'ORGANIZATION'|'ORGANIZATION_FEATURE_SET'|'EMAIL'|'MASTER_EMAIL'|'MASTER_NAME'|'NOTES'|'PARENT_HANDSHAKE',
'Resources': {'... recursive ...'}
},
]
},
],
'NextToken': 'string'
}
Response Structure
|
list_organizational_units_for_parent(**kwargs)¶Lists the organizational units (OUs) in a parent organizational unit or root.
This operation can be called only from the organization’s master account.
See also: AWS API Documentation
Request Syntax
response = client.list_organizational_units_for_parent(
ParentId='string',
NextToken='string',
MaxResults=123
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'OrganizationalUnits': [
{
'Id': 'string',
'Arn': 'string',
'Name': 'string'
},
],
'NextToken': 'string'
}
Response Structure
|
list_parents(**kwargs)¶Lists the root or organizational units (OUs) that serve as the immediate parent of the specified child OU or account. This operation, along with ListChildren enables you to traverse the tree structure that makes up this root.
This operation can be called only from the organization’s master account.
Note
In the current release, a child can have only a single parent.
See also: AWS API Documentation
Request Syntax
response = client.list_parents(
ChildId='string',
NextToken='string',
MaxResults=123
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Parents': [
{
'Id': 'string',
'Type': 'ROOT'|'ORGANIZATIONAL_UNIT'
},
],
'NextToken': 'string'
}
Response Structure
|
list_policies(**kwargs)¶Retrieves the list of all policies in an organization of a specified type.
This operation can be called only from the organization’s master account.
See also: AWS API Documentation
Request Syntax
response = client.list_policies(
Filter='SERVICE_CONTROL_POLICY',
NextToken='string',
MaxResults=123
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Policies': [
{
'Id': 'string',
'Arn': 'string',
'Name': 'string',
'Description': 'string',
'Type': 'SERVICE_CONTROL_POLICY',
'AwsManaged': True|False
},
],
'NextToken': 'string'
}
Response Structure
|
list_policies_for_target(**kwargs)¶Lists the policies that are directly attached to the specified target root, organizational unit (OU), or account. You must specify the policy type that you want included in the returned list.
This operation can be called only from the organization’s master account.
See also: AWS API Documentation
Request Syntax
response = client.list_policies_for_target(
TargetId='string',
Filter='SERVICE_CONTROL_POLICY',
NextToken='string',
MaxResults=123
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Policies': [
{
'Id': 'string',
'Arn': 'string',
'Name': 'string',
'Description': 'string',
'Type': 'SERVICE_CONTROL_POLICY',
'AwsManaged': True|False
},
],
'NextToken': 'string'
}
Response Structure
|
list_roots(**kwargs)¶Lists the roots that are defined in the current organization.
This operation can be called only from the organization’s master account.
See also: AWS API Documentation
Request Syntax
response = client.list_roots(
NextToken='string',
MaxResults=123
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Roots': [
{
'Id': 'string',
'Arn': 'string',
'Name': 'string',
'PolicyTypes': [
{
'Type': 'SERVICE_CONTROL_POLICY',
'Status': 'ENABLED'|'PENDING_ENABLE'|'PENDING_DISABLE'
},
]
},
],
'NextToken': 'string'
}
Response Structure
|
list_targets_for_policy(**kwargs)¶Lists all the roots, OUs, and accounts to which the specified policy is attached.
This operation can be called only from the organization’s master account.
See also: AWS API Documentation
Request Syntax
response = client.list_targets_for_policy(
PolicyId='string',
NextToken='string',
MaxResults=123
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Targets': [
{
'TargetId': 'string',
'Arn': 'string',
'Name': 'string',
'Type': 'ACCOUNT'|'ORGANIZATIONAL_UNIT'|'ROOT'
},
],
'NextToken': 'string'
}
Response Structure
|
move_account(**kwargs)¶Moves an account from its current source parent root or OU to the specified destination parent root or OU.
This operation can be called only from the organization’s master account.
See also: AWS API Documentation
Request Syntax
response = client.move_account(
AccountId='string',
SourceParentId='string',
DestinationParentId='string'
)
| Parameters: |
|
|---|---|
| Returns: | None |
remove_account_from_organization(**kwargs)¶Removes the specified account from the organization.
The removed account becomes a stand-alone account that is not a member of any organization. It is no longer subject to any policies and is responsible for its own bill payments. The organization’s master account is no longer charged for any expenses accrued by the member account after it is removed from the organization.
This operation can be called only from the organization’s master account. Member accounts can remove themselves with LeaveOrganization instead.
Warning
See also: AWS API Documentation
Request Syntax
response = client.remove_account_from_organization(
AccountId='string'
)
| Parameters: | AccountId (string) – [REQUIRED] The unique identifier (ID) of the member account that you want to remove from the organization. The regex pattern for an account ID string requires exactly 12 digits. |
|---|---|
| Returns: | None |
update_organizational_unit(**kwargs)¶Renames the specified organizational unit (OU). The ID and ARN do not change. The child OUs and accounts remain in place, and any attached policies of the OU remain attached.
This operation can be called only from the organization’s master account.
See also: AWS API Documentation
Request Syntax
response = client.update_organizational_unit(
OrganizationalUnitId='string',
Name='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'OrganizationalUnit': {
'Id': 'string',
'Arn': 'string',
'Name': 'string'
}
}
Response Structure
|
update_policy(**kwargs)¶Updates an existing policy with a new name, description, or content. If any parameter is not supplied, that value remains unchanged. Note that you cannot change a policy’s type.
This operation can be called only from the organization’s master account.
See also: AWS API Documentation
Request Syntax
response = client.update_policy(
PolicyId='string',
Name='string',
Description='string',
Content='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Policy': {
'PolicySummary': {
'Id': 'string',
'Arn': 'string',
'Name': 'string',
'Description': 'string',
'Type': 'SERVICE_CONTROL_POLICY',
'AwsManaged': True|False
},
'Content': 'string'
}
}
Response Structure
|
The available paginators are:
Organizations.Paginator.ListAccountsOrganizations.Paginator.ListAccountsForParentOrganizations.Paginator.ListChildrenOrganizations.Paginator.ListCreateAccountStatusOrganizations.Paginator.ListHandshakesForAccountOrganizations.Paginator.ListHandshakesForOrganizationOrganizations.Paginator.ListOrganizationalUnitsForParentOrganizations.Paginator.ListParentsOrganizations.Paginator.ListPoliciesOrganizations.Paginator.ListPoliciesForTargetOrganizations.Paginator.ListRootsOrganizations.Paginator.ListTargetsForPolicyOrganizations.Paginator.ListAccounts¶paginator = client.get_paginator('list_accounts')
paginate(**kwargs)¶Creates an iterator that will paginate through responses from Organizations.Client.list_accounts().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
| Parameters: | PaginationConfig (dict) – A dictionary that provides parameters to control pagination.
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'Accounts': [
{
'Id': 'string',
'Arn': 'string',
'Email': 'string',
'Name': 'string',
'Status': 'ACTIVE'|'SUSPENDED',
'JoinedMethod': 'INVITED'|'CREATED',
'JoinedTimestamp': datetime(2015, 1, 1)
},
],
}
Response Structure
|
Organizations.Paginator.ListAccountsForParent¶paginator = client.get_paginator('list_accounts_for_parent')
paginate(**kwargs)¶Creates an iterator that will paginate through responses from Organizations.Client.list_accounts_for_parent().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
ParentId='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Accounts': [
{
'Id': 'string',
'Arn': 'string',
'Email': 'string',
'Name': 'string',
'Status': 'ACTIVE'|'SUSPENDED',
'JoinedMethod': 'INVITED'|'CREATED',
'JoinedTimestamp': datetime(2015, 1, 1)
},
],
}
Response Structure
|
Organizations.Paginator.ListChildren¶paginator = client.get_paginator('list_children')
paginate(**kwargs)¶Creates an iterator that will paginate through responses from Organizations.Client.list_children().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
ParentId='string',
ChildType='ACCOUNT'|'ORGANIZATIONAL_UNIT',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Children': [
{
'Id': 'string',
'Type': 'ACCOUNT'|'ORGANIZATIONAL_UNIT'
},
],
}
Response Structure
|
Organizations.Paginator.ListCreateAccountStatus¶paginator = client.get_paginator('list_create_account_status')
paginate(**kwargs)¶Creates an iterator that will paginate through responses from Organizations.Client.list_create_account_status().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
States=[
'IN_PROGRESS'|'SUCCEEDED'|'FAILED',
],
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
| Parameters: |
|
|---|---|
| Return type: | 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'|'INTERNAL_FAILURE'
},
],
}
Response Structure
|
Organizations.Paginator.ListHandshakesForAccount¶paginator = client.get_paginator('list_handshakes_for_account')
paginate(**kwargs)¶Creates an iterator that will paginate through responses from Organizations.Client.list_handshakes_for_account().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
Filter={
'ActionType': 'INVITE'|'ENABLE_ALL_FEATURES'|'APPROVE_ALL_FEATURES',
'ParentHandshakeId': 'string'
},
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
| Parameters: |
|
|---|---|
| Return type: | 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',
'Resources': [
{
'Value': 'string',
'Type': 'ACCOUNT'|'ORGANIZATION'|'ORGANIZATION_FEATURE_SET'|'EMAIL'|'MASTER_EMAIL'|'MASTER_NAME'|'NOTES'|'PARENT_HANDSHAKE',
'Resources': {'... recursive ...'}
},
]
},
],
}
Response Structure
|
Organizations.Paginator.ListHandshakesForOrganization¶paginator = client.get_paginator('list_handshakes_for_organization')
paginate(**kwargs)¶Creates an iterator that will paginate through responses from Organizations.Client.list_handshakes_for_organization().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
Filter={
'ActionType': 'INVITE'|'ENABLE_ALL_FEATURES'|'APPROVE_ALL_FEATURES',
'ParentHandshakeId': 'string'
},
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
| Parameters: |
|
|---|---|
| Return type: | 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',
'Resources': [
{
'Value': 'string',
'Type': 'ACCOUNT'|'ORGANIZATION'|'ORGANIZATION_FEATURE_SET'|'EMAIL'|'MASTER_EMAIL'|'MASTER_NAME'|'NOTES'|'PARENT_HANDSHAKE',
'Resources': {'... recursive ...'}
},
]
},
],
}
Response Structure
|
Organizations.Paginator.ListOrganizationalUnitsForParent¶paginator = client.get_paginator('list_organizational_units_for_parent')
paginate(**kwargs)¶Creates an iterator that will paginate through responses from Organizations.Client.list_organizational_units_for_parent().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
ParentId='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'OrganizationalUnits': [
{
'Id': 'string',
'Arn': 'string',
'Name': 'string'
},
],
}
Response Structure
|
Organizations.Paginator.ListParents¶paginator = client.get_paginator('list_parents')
paginate(**kwargs)¶Creates an iterator that will paginate through responses from Organizations.Client.list_parents().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
ChildId='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Parents': [
{
'Id': 'string',
'Type': 'ROOT'|'ORGANIZATIONAL_UNIT'
},
],
}
Response Structure
|
Organizations.Paginator.ListPolicies¶paginator = client.get_paginator('list_policies')
paginate(**kwargs)¶Creates an iterator that will paginate through responses from Organizations.Client.list_policies().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
Filter='SERVICE_CONTROL_POLICY',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Policies': [
{
'Id': 'string',
'Arn': 'string',
'Name': 'string',
'Description': 'string',
'Type': 'SERVICE_CONTROL_POLICY',
'AwsManaged': True|False
},
],
}
Response Structure
|
Organizations.Paginator.ListPoliciesForTarget¶paginator = client.get_paginator('list_policies_for_target')
paginate(**kwargs)¶Creates an iterator that will paginate through responses from Organizations.Client.list_policies_for_target().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
TargetId='string',
Filter='SERVICE_CONTROL_POLICY',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Policies': [
{
'Id': 'string',
'Arn': 'string',
'Name': 'string',
'Description': 'string',
'Type': 'SERVICE_CONTROL_POLICY',
'AwsManaged': True|False
},
],
}
Response Structure
|
Organizations.Paginator.ListRoots¶paginator = client.get_paginator('list_roots')
paginate(**kwargs)¶Creates an iterator that will paginate through responses from Organizations.Client.list_roots().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
| Parameters: | PaginationConfig (dict) – A dictionary that provides parameters to control pagination.
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'Roots': [
{
'Id': 'string',
'Arn': 'string',
'Name': 'string',
'PolicyTypes': [
{
'Type': 'SERVICE_CONTROL_POLICY',
'Status': 'ENABLED'|'PENDING_ENABLE'|'PENDING_DISABLE'
},
]
},
],
}
Response Structure
|
Organizations.Paginator.ListTargetsForPolicy¶paginator = client.get_paginator('list_targets_for_policy')
paginate(**kwargs)¶Creates an iterator that will paginate through responses from Organizations.Client.list_targets_for_policy().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
PolicyId='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Targets': [
{
'TargetId': 'string',
'Arn': 'string',
'Name': 'string',
'Type': 'ACCOUNT'|'ORGANIZATIONAL_UNIT'|'ROOT'
},
],
}
Response Structure
|