Skip to content

OrganizationsClient#

Index > Organizations > OrganizationsClient

Auto-generated documentation for Organizations type annotations stubs module types-aiobotocore-organizations.

OrganizationsClient#

Type annotations and code completion for session.create_client("organizations") boto3 documentation

OrganizationsClient usage example

from aiobotocore.session import get_session
from types_aiobotocore_organizations.client import OrganizationsClient

session = get_session()
async with session.create_client("organizations") as client:
    client: OrganizationsClient

Exceptions#

aiobotocore client exceptions are generated in runtime. This class provides code completion for session.create_client("organizations").exceptions structure.

OrganizationsClient.exceptions usage example

async with session.create_client("organizations") as client:
    try:
        do_something(client)
    except (
            client.AWSOrganizationsNotInUseException,
        client.AccessDeniedException,
        client.AccessDeniedForDependencyException,
        client.AccountAlreadyClosedException,
        client.AccountAlreadyRegisteredException,
        client.AccountNotFoundException,
        client.AccountNotRegisteredException,
        client.AccountOwnerNotVerifiedException,
        client.AlreadyInOrganizationException,
        client.ChildNotFoundException,
        client.ClientError,
        client.ConcurrentModificationException,
        client.ConflictException,
        client.ConstraintViolationException,
        client.CreateAccountStatusNotFoundException,
        client.DestinationParentNotFoundException,
        client.DuplicateAccountException,
        client.DuplicateHandshakeException,
        client.DuplicateOrganizationalUnitException,
        client.DuplicatePolicyAttachmentException,
        client.DuplicatePolicyException,
        client.EffectivePolicyNotFoundException,
        client.FinalizingOrganizationException,
        client.HandshakeAlreadyInStateException,
        client.HandshakeConstraintViolationException,
        client.HandshakeNotFoundException,
        client.InvalidHandshakeTransitionException,
        client.InvalidInputException,
        client.MalformedPolicyDocumentException,
        client.MasterCannotLeaveOrganizationException,
        client.OrganizationNotEmptyException,
        client.OrganizationalUnitNotEmptyException,
        client.OrganizationalUnitNotFoundException,
        client.ParentNotFoundException,
        client.PolicyChangesInProgressException,
        client.PolicyInUseException,
        client.PolicyNotAttachedException,
        client.PolicyNotFoundException,
        client.PolicyTypeAlreadyEnabledException,
        client.PolicyTypeNotAvailableForOrganizationException,
        client.PolicyTypeNotEnabledException,
        client.ResourcePolicyNotFoundException,
        client.RootNotFoundException,
        client.ServiceException,
        client.SourceParentNotFoundException,
        client.TargetNotFoundException,
        client.TooManyRequestsException,
        client.UnsupportedAPIEndpointException,
    ) as e:
        print(e)
OrganizationsClient usage type checking example

from types_aiobotocore_organizations.client import Exceptions

def handle_error(exc: Exceptions.AWSOrganizationsNotInUseException) -> None:
    ...

Methods#

accept_handshake#

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

Type annotations and code completion for session.create_client("organizations").accept_handshake method. boto3 documentation

# accept_handshake method definition

await def accept_handshake(
    self,
    *,
    HandshakeId: str,
) -> AcceptHandshakeResponseTypeDef:  # (1)
    ...
  1. See AcceptHandshakeResponseTypeDef
# accept_handshake method usage example with argument unpacking

kwargs: AcceptHandshakeRequestRequestTypeDef = {  # (1)
    "HandshakeId": ...,
}

parent.accept_handshake(**kwargs)
  1. See AcceptHandshakeRequestRequestTypeDef

attach_policy#

Attaches a policy to a root, an organizational unit (OU), or an individual account.

Type annotations and code completion for session.create_client("organizations").attach_policy method. boto3 documentation

# attach_policy method definition

await def attach_policy(
    self,
    *,
    PolicyId: str,
    TargetId: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# attach_policy method usage example with argument unpacking

kwargs: AttachPolicyRequestRequestTypeDef = {  # (1)
    "PolicyId": ...,
    "TargetId": ...,
}

parent.attach_policy(**kwargs)
  1. See AttachPolicyRequestRequestTypeDef

can_paginate#

Check if an operation can be paginated.

Type annotations and code completion for session.create_client("organizations").can_paginate method. boto3 documentation

# can_paginate method definition

def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

cancel_handshake#

Cancels a handshake.

Type annotations and code completion for session.create_client("organizations").cancel_handshake method. boto3 documentation

# cancel_handshake method definition

await def cancel_handshake(
    self,
    *,
    HandshakeId: str,
) -> CancelHandshakeResponseTypeDef:  # (1)
    ...
  1. See CancelHandshakeResponseTypeDef
# cancel_handshake method usage example with argument unpacking

kwargs: CancelHandshakeRequestRequestTypeDef = {  # (1)
    "HandshakeId": ...,
}

parent.cancel_handshake(**kwargs)
  1. See CancelHandshakeRequestRequestTypeDef

close#

Closes underlying endpoint connections.

Type annotations and code completion for session.create_client("organizations").close method. boto3 documentation

# close method definition

await def close(
    self,
) -> None:
    ...

close_account#

Closes an Amazon Web Services member account within an organization.

Type annotations and code completion for session.create_client("organizations").close_account method. boto3 documentation

# close_account method definition

await def close_account(
    self,
    *,
    AccountId: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# close_account method usage example with argument unpacking

kwargs: CloseAccountRequestRequestTypeDef = {  # (1)
    "AccountId": ...,
}

parent.close_account(**kwargs)
  1. See CloseAccountRequestRequestTypeDef

create_account#

Creates an Amazon Web Services account that is automatically a member of the organization whose credentials made the request.

Type annotations and code completion for session.create_client("organizations").create_account method. boto3 documentation

# create_account method definition

await def create_account(
    self,
    *,
    Email: str,
    AccountName: str,
    RoleName: str = ...,
    IamUserAccessToBilling: IAMUserAccessToBillingType = ...,  # (1)
    Tags: Sequence[TagTypeDef] = ...,  # (2)
) -> CreateAccountResponseTypeDef:  # (3)
    ...
  1. See IAMUserAccessToBillingType
  2. See TagTypeDef
  3. See CreateAccountResponseTypeDef
# create_account method usage example with argument unpacking

kwargs: CreateAccountRequestRequestTypeDef = {  # (1)
    "Email": ...,
    "AccountName": ...,
}

parent.create_account(**kwargs)
  1. See CreateAccountRequestRequestTypeDef

create_gov_cloud_account#

This action is available if all of the following are true: * You're authorized to create accounts in the Amazon Web Services GovCloud (US) Region.

Type annotations and code completion for session.create_client("organizations").create_gov_cloud_account method. boto3 documentation

# create_gov_cloud_account method definition

await def create_gov_cloud_account(
    self,
    *,
    Email: str,
    AccountName: str,
    RoleName: str = ...,
    IamUserAccessToBilling: IAMUserAccessToBillingType = ...,  # (1)
    Tags: Sequence[TagTypeDef] = ...,  # (2)
) -> CreateGovCloudAccountResponseTypeDef:  # (3)
    ...
  1. See IAMUserAccessToBillingType
  2. See TagTypeDef
  3. See CreateGovCloudAccountResponseTypeDef
# create_gov_cloud_account method usage example with argument unpacking

kwargs: CreateGovCloudAccountRequestRequestTypeDef = {  # (1)
    "Email": ...,
    "AccountName": ...,
}

parent.create_gov_cloud_account(**kwargs)
  1. See CreateGovCloudAccountRequestRequestTypeDef

create_organization#

Creates an Amazon Web Services organization.

Type annotations and code completion for session.create_client("organizations").create_organization method. boto3 documentation

# create_organization method definition

await def create_organization(
    self,
    *,
    FeatureSet: OrganizationFeatureSetType = ...,  # (1)
) -> CreateOrganizationResponseTypeDef:  # (2)
    ...
  1. See OrganizationFeatureSetType
  2. See CreateOrganizationResponseTypeDef
# create_organization method usage example with argument unpacking

kwargs: CreateOrganizationRequestRequestTypeDef = {  # (1)
    "FeatureSet": ...,
}

parent.create_organization(**kwargs)
  1. See CreateOrganizationRequestRequestTypeDef

create_organizational_unit#

Creates an organizational unit (OU) within a root or parent OU.

Type annotations and code completion for session.create_client("organizations").create_organizational_unit method. boto3 documentation

# create_organizational_unit method definition

await def create_organizational_unit(
    self,
    *,
    ParentId: str,
    Name: str,
    Tags: Sequence[TagTypeDef] = ...,  # (1)
) -> CreateOrganizationalUnitResponseTypeDef:  # (2)
    ...
  1. See TagTypeDef
  2. See CreateOrganizationalUnitResponseTypeDef
# create_organizational_unit method usage example with argument unpacking

kwargs: CreateOrganizationalUnitRequestRequestTypeDef = {  # (1)
    "ParentId": ...,
    "Name": ...,
}

parent.create_organizational_unit(**kwargs)
  1. See CreateOrganizationalUnitRequestRequestTypeDef

create_policy#

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

Type annotations and code completion for session.create_client("organizations").create_policy method. boto3 documentation

# create_policy method definition

await def create_policy(
    self,
    *,
    Content: str,
    Description: str,
    Name: str,
    Type: PolicyTypeType,  # (1)
    Tags: Sequence[TagTypeDef] = ...,  # (2)
) -> CreatePolicyResponseTypeDef:  # (3)
    ...
  1. See PolicyTypeType
  2. See TagTypeDef
  3. See CreatePolicyResponseTypeDef
# create_policy method usage example with argument unpacking

kwargs: CreatePolicyRequestRequestTypeDef = {  # (1)
    "Content": ...,
    "Description": ...,
    "Name": ...,
    "Type": ...,
}

parent.create_policy(**kwargs)
  1. See CreatePolicyRequestRequestTypeDef

decline_handshake#

Declines a handshake request.

Type annotations and code completion for session.create_client("organizations").decline_handshake method. boto3 documentation

# decline_handshake method definition

await def decline_handshake(
    self,
    *,
    HandshakeId: str,
) -> DeclineHandshakeResponseTypeDef:  # (1)
    ...
  1. See DeclineHandshakeResponseTypeDef
# decline_handshake method usage example with argument unpacking

kwargs: DeclineHandshakeRequestRequestTypeDef = {  # (1)
    "HandshakeId": ...,
}

parent.decline_handshake(**kwargs)
  1. See DeclineHandshakeRequestRequestTypeDef

delete_organization#

Deletes the organization.

Type annotations and code completion for session.create_client("organizations").delete_organization method. boto3 documentation

# delete_organization method definition

await def delete_organization(
    self,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef

delete_organizational_unit#

Deletes an organizational unit (OU) from a root or another OU.

Type annotations and code completion for session.create_client("organizations").delete_organizational_unit method. boto3 documentation

# delete_organizational_unit method definition

await def delete_organizational_unit(
    self,
    *,
    OrganizationalUnitId: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# delete_organizational_unit method usage example with argument unpacking

kwargs: DeleteOrganizationalUnitRequestRequestTypeDef = {  # (1)
    "OrganizationalUnitId": ...,
}

parent.delete_organizational_unit(**kwargs)
  1. See DeleteOrganizationalUnitRequestRequestTypeDef

delete_policy#

Deletes the specified policy from your organization.

Type annotations and code completion for session.create_client("organizations").delete_policy method. boto3 documentation

# delete_policy method definition

await def delete_policy(
    self,
    *,
    PolicyId: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# delete_policy method usage example with argument unpacking

kwargs: DeletePolicyRequestRequestTypeDef = {  # (1)
    "PolicyId": ...,
}

parent.delete_policy(**kwargs)
  1. See DeletePolicyRequestRequestTypeDef

delete_resource_policy#

Deletes the resource policy from your organization.

Type annotations and code completion for session.create_client("organizations").delete_resource_policy method. boto3 documentation

# delete_resource_policy method definition

await def delete_resource_policy(
    self,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef

deregister_delegated_administrator#

Removes the specified member Amazon Web Services account as a delegated administrator for the specified Amazon Web Services service.

Type annotations and code completion for session.create_client("organizations").deregister_delegated_administrator method. boto3 documentation

# deregister_delegated_administrator method definition

await def deregister_delegated_administrator(
    self,
    *,
    AccountId: str,
    ServicePrincipal: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# deregister_delegated_administrator method usage example with argument unpacking

kwargs: DeregisterDelegatedAdministratorRequestRequestTypeDef = {  # (1)
    "AccountId": ...,
    "ServicePrincipal": ...,
}

parent.deregister_delegated_administrator(**kwargs)
  1. See DeregisterDelegatedAdministratorRequestRequestTypeDef

describe_account#

Retrieves Organizations-related information about the specified account.

Type annotations and code completion for session.create_client("organizations").describe_account method. boto3 documentation

# describe_account method definition

await def describe_account(
    self,
    *,
    AccountId: str,
) -> DescribeAccountResponseTypeDef:  # (1)
    ...
  1. See DescribeAccountResponseTypeDef
# describe_account method usage example with argument unpacking

kwargs: DescribeAccountRequestRequestTypeDef = {  # (1)
    "AccountId": ...,
}

parent.describe_account(**kwargs)
  1. See DescribeAccountRequestRequestTypeDef

describe_create_account_status#

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

Type annotations and code completion for session.create_client("organizations").describe_create_account_status method. boto3 documentation

# describe_create_account_status method definition

await def describe_create_account_status(
    self,
    *,
    CreateAccountRequestId: str,
) -> DescribeCreateAccountStatusResponseTypeDef:  # (1)
    ...
  1. See DescribeCreateAccountStatusResponseTypeDef
# describe_create_account_status method usage example with argument unpacking

kwargs: DescribeCreateAccountStatusRequestRequestTypeDef = {  # (1)
    "CreateAccountRequestId": ...,
}

parent.describe_create_account_status(**kwargs)
  1. See DescribeCreateAccountStatusRequestRequestTypeDef

describe_effective_policy#

Returns the contents of the effective policy for specified policy type and account.

Type annotations and code completion for session.create_client("organizations").describe_effective_policy method. boto3 documentation

# describe_effective_policy method definition

await def describe_effective_policy(
    self,
    *,
    PolicyType: EffectivePolicyTypeType,  # (1)
    TargetId: str = ...,
) -> DescribeEffectivePolicyResponseTypeDef:  # (2)
    ...
  1. See EffectivePolicyTypeType
  2. See DescribeEffectivePolicyResponseTypeDef
# describe_effective_policy method usage example with argument unpacking

kwargs: DescribeEffectivePolicyRequestRequestTypeDef = {  # (1)
    "PolicyType": ...,
}

parent.describe_effective_policy(**kwargs)
  1. See DescribeEffectivePolicyRequestRequestTypeDef

describe_handshake#

Retrieves information about a previously requested handshake.

Type annotations and code completion for session.create_client("organizations").describe_handshake method. boto3 documentation

# describe_handshake method definition

await def describe_handshake(
    self,
    *,
    HandshakeId: str,
) -> DescribeHandshakeResponseTypeDef:  # (1)
    ...
  1. See DescribeHandshakeResponseTypeDef
# describe_handshake method usage example with argument unpacking

kwargs: DescribeHandshakeRequestRequestTypeDef = {  # (1)
    "HandshakeId": ...,
}

parent.describe_handshake(**kwargs)
  1. See DescribeHandshakeRequestRequestTypeDef

describe_organization#

Retrieves information about the organization that the user's account belongs to.

Type annotations and code completion for session.create_client("organizations").describe_organization method. boto3 documentation

# describe_organization method definition

await def describe_organization(
    self,
) -> DescribeOrganizationResponseTypeDef:  # (1)
    ...
  1. See DescribeOrganizationResponseTypeDef

describe_organizational_unit#

Retrieves information about an organizational unit (OU).

Type annotations and code completion for session.create_client("organizations").describe_organizational_unit method. boto3 documentation

# describe_organizational_unit method definition

await def describe_organizational_unit(
    self,
    *,
    OrganizationalUnitId: str,
) -> DescribeOrganizationalUnitResponseTypeDef:  # (1)
    ...
  1. See DescribeOrganizationalUnitResponseTypeDef
# describe_organizational_unit method usage example with argument unpacking

kwargs: DescribeOrganizationalUnitRequestRequestTypeDef = {  # (1)
    "OrganizationalUnitId": ...,
}

parent.describe_organizational_unit(**kwargs)
  1. See DescribeOrganizationalUnitRequestRequestTypeDef

describe_policy#

Retrieves information about a policy.

Type annotations and code completion for session.create_client("organizations").describe_policy method. boto3 documentation

# describe_policy method definition

await def describe_policy(
    self,
    *,
    PolicyId: str,
) -> DescribePolicyResponseTypeDef:  # (1)
    ...
  1. See DescribePolicyResponseTypeDef
# describe_policy method usage example with argument unpacking

kwargs: DescribePolicyRequestRequestTypeDef = {  # (1)
    "PolicyId": ...,
}

parent.describe_policy(**kwargs)
  1. See DescribePolicyRequestRequestTypeDef

describe_resource_policy#

Retrieves information about a resource policy.

Type annotations and code completion for session.create_client("organizations").describe_resource_policy method. boto3 documentation

# describe_resource_policy method definition

await def describe_resource_policy(
    self,
) -> DescribeResourcePolicyResponseTypeDef:  # (1)
    ...
  1. See DescribeResourcePolicyResponseTypeDef

detach_policy#

Detaches a policy from a target root, organizational unit (OU), or account.

Type annotations and code completion for session.create_client("organizations").detach_policy method. boto3 documentation

# detach_policy method definition

await def detach_policy(
    self,
    *,
    PolicyId: str,
    TargetId: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# detach_policy method usage example with argument unpacking

kwargs: DetachPolicyRequestRequestTypeDef = {  # (1)
    "PolicyId": ...,
    "TargetId": ...,
}

parent.detach_policy(**kwargs)
  1. See DetachPolicyRequestRequestTypeDef

disable_aws_service_access#

Disables the integration of an Amazon Web Services service (the service that is specified by ServicePrincipal) with Organizations.

Type annotations and code completion for session.create_client("organizations").disable_aws_service_access method. boto3 documentation

# disable_aws_service_access method definition

await def disable_aws_service_access(
    self,
    *,
    ServicePrincipal: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# disable_aws_service_access method usage example with argument unpacking

kwargs: DisableAWSServiceAccessRequestRequestTypeDef = {  # (1)
    "ServicePrincipal": ...,
}

parent.disable_aws_service_access(**kwargs)
  1. See DisableAWSServiceAccessRequestRequestTypeDef

disable_policy_type#

Disables an organizational policy type in a root.

Type annotations and code completion for session.create_client("organizations").disable_policy_type method. boto3 documentation

# disable_policy_type method definition

await def disable_policy_type(
    self,
    *,
    RootId: str,
    PolicyType: PolicyTypeType,  # (1)
) -> DisablePolicyTypeResponseTypeDef:  # (2)
    ...
  1. See PolicyTypeType
  2. See DisablePolicyTypeResponseTypeDef
# disable_policy_type method usage example with argument unpacking

kwargs: DisablePolicyTypeRequestRequestTypeDef = {  # (1)
    "RootId": ...,
    "PolicyType": ...,
}

parent.disable_policy_type(**kwargs)
  1. See DisablePolicyTypeRequestRequestTypeDef

enable_all_features#

Enables all features in an organization.

Type annotations and code completion for session.create_client("organizations").enable_all_features method. boto3 documentation

# enable_all_features method definition

await def enable_all_features(
    self,
) -> EnableAllFeaturesResponseTypeDef:  # (1)
    ...
  1. See EnableAllFeaturesResponseTypeDef

enable_aws_service_access#

Enables the integration of an Amazon Web Services service (the service that is specified by ServicePrincipal) with Organizations.

Type annotations and code completion for session.create_client("organizations").enable_aws_service_access method. boto3 documentation

# enable_aws_service_access method definition

await def enable_aws_service_access(
    self,
    *,
    ServicePrincipal: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# enable_aws_service_access method usage example with argument unpacking

kwargs: EnableAWSServiceAccessRequestRequestTypeDef = {  # (1)
    "ServicePrincipal": ...,
}

parent.enable_aws_service_access(**kwargs)
  1. See EnableAWSServiceAccessRequestRequestTypeDef

enable_policy_type#

Enables a policy type in a root.

Type annotations and code completion for session.create_client("organizations").enable_policy_type method. boto3 documentation

# enable_policy_type method definition

await def enable_policy_type(
    self,
    *,
    RootId: str,
    PolicyType: PolicyTypeType,  # (1)
) -> EnablePolicyTypeResponseTypeDef:  # (2)
    ...
  1. See PolicyTypeType
  2. See EnablePolicyTypeResponseTypeDef
# enable_policy_type method usage example with argument unpacking

kwargs: EnablePolicyTypeRequestRequestTypeDef = {  # (1)
    "RootId": ...,
    "PolicyType": ...,
}

parent.enable_policy_type(**kwargs)
  1. See EnablePolicyTypeRequestRequestTypeDef

generate_presigned_url#

Generate a presigned url given a client, its method, and arguments.

Type annotations and code completion for session.create_client("organizations").generate_presigned_url method. boto3 documentation

# generate_presigned_url method definition

await def generate_presigned_url(
    self,
    ClientMethod: str,
    Params: Mapping[str, Any] = ...,
    ExpiresIn: int = 3600,
    HttpMethod: str = ...,
) -> str:
    ...

invite_account_to_organization#

Sends an invitation to another account to join your organization as a member account.

Type annotations and code completion for session.create_client("organizations").invite_account_to_organization method. boto3 documentation

# invite_account_to_organization method definition

await def invite_account_to_organization(
    self,
    *,
    Target: HandshakePartyTypeDef,  # (1)
    Notes: str = ...,
    Tags: Sequence[TagTypeDef] = ...,  # (2)
) -> InviteAccountToOrganizationResponseTypeDef:  # (3)
    ...
  1. See HandshakePartyTypeDef
  2. See TagTypeDef
  3. See InviteAccountToOrganizationResponseTypeDef
# invite_account_to_organization method usage example with argument unpacking

kwargs: InviteAccountToOrganizationRequestRequestTypeDef = {  # (1)
    "Target": ...,
}

parent.invite_account_to_organization(**kwargs)
  1. See InviteAccountToOrganizationRequestRequestTypeDef

leave_organization#

Removes a member account from its parent organization.

Type annotations and code completion for session.create_client("organizations").leave_organization method. boto3 documentation

# leave_organization method definition

await def leave_organization(
    self,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef

list_accounts#

Lists all the accounts in the organization.

Type annotations and code completion for session.create_client("organizations").list_accounts method. boto3 documentation

# list_accounts method definition

await def list_accounts(
    self,
    *,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListAccountsResponseTypeDef:  # (1)
    ...
  1. See ListAccountsResponseTypeDef
# list_accounts method usage example with argument unpacking

kwargs: ListAccountsRequestRequestTypeDef = {  # (1)
    "NextToken": ...,
}

parent.list_accounts(**kwargs)
  1. See ListAccountsRequestRequestTypeDef

list_accounts_for_parent#

Lists the accounts in an organization that are contained by the specified target root or organizational unit (OU).

Type annotations and code completion for session.create_client("organizations").list_accounts_for_parent method. boto3 documentation

# list_accounts_for_parent method definition

await def list_accounts_for_parent(
    self,
    *,
    ParentId: str,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListAccountsForParentResponseTypeDef:  # (1)
    ...
  1. See ListAccountsForParentResponseTypeDef
# list_accounts_for_parent method usage example with argument unpacking

kwargs: ListAccountsForParentRequestRequestTypeDef = {  # (1)
    "ParentId": ...,
}

parent.list_accounts_for_parent(**kwargs)
  1. See ListAccountsForParentRequestRequestTypeDef

list_aws_service_access_for_organization#

Returns a list of the Amazon Web Services services that you enabled to integrate with your organization.

Type annotations and code completion for session.create_client("organizations").list_aws_service_access_for_organization method. boto3 documentation

# list_aws_service_access_for_organization method definition

await def list_aws_service_access_for_organization(
    self,
    *,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListAWSServiceAccessForOrganizationResponseTypeDef:  # (1)
    ...
  1. See ListAWSServiceAccessForOrganizationResponseTypeDef
# list_aws_service_access_for_organization method usage example with argument unpacking

kwargs: ListAWSServiceAccessForOrganizationRequestRequestTypeDef = {  # (1)
    "NextToken": ...,
}

parent.list_aws_service_access_for_organization(**kwargs)
  1. See ListAWSServiceAccessForOrganizationRequestRequestTypeDef

list_children#

Lists all of the organizational units (OUs) or accounts that are contained in the specified parent OU or root.

Type annotations and code completion for session.create_client("organizations").list_children method. boto3 documentation

# list_children method definition

await def list_children(
    self,
    *,
    ParentId: str,
    ChildType: ChildTypeType,  # (1)
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListChildrenResponseTypeDef:  # (2)
    ...
  1. See ChildTypeType
  2. See ListChildrenResponseTypeDef
# list_children method usage example with argument unpacking

kwargs: ListChildrenRequestRequestTypeDef = {  # (1)
    "ParentId": ...,
    "ChildType": ...,
}

parent.list_children(**kwargs)
  1. See ListChildrenRequestRequestTypeDef

list_create_account_status#

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

Type annotations and code completion for session.create_client("organizations").list_create_account_status method. boto3 documentation

# list_create_account_status method definition

await def list_create_account_status(
    self,
    *,
    States: Sequence[CreateAccountStateType] = ...,  # (1)
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListCreateAccountStatusResponseTypeDef:  # (2)
    ...
  1. See CreateAccountStateType
  2. See ListCreateAccountStatusResponseTypeDef
# list_create_account_status method usage example with argument unpacking

kwargs: ListCreateAccountStatusRequestRequestTypeDef = {  # (1)
    "States": ...,
}

parent.list_create_account_status(**kwargs)
  1. See ListCreateAccountStatusRequestRequestTypeDef

list_delegated_administrators#

Lists the Amazon Web Services accounts that are designated as delegated administrators in this organization.

Type annotations and code completion for session.create_client("organizations").list_delegated_administrators method. boto3 documentation

# list_delegated_administrators method definition

await def list_delegated_administrators(
    self,
    *,
    ServicePrincipal: str = ...,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListDelegatedAdministratorsResponseTypeDef:  # (1)
    ...
  1. See ListDelegatedAdministratorsResponseTypeDef
# list_delegated_administrators method usage example with argument unpacking

kwargs: ListDelegatedAdministratorsRequestRequestTypeDef = {  # (1)
    "ServicePrincipal": ...,
}

parent.list_delegated_administrators(**kwargs)
  1. See ListDelegatedAdministratorsRequestRequestTypeDef

list_delegated_services_for_account#

List the Amazon Web Services services for which the specified account is a delegated administrator.

Type annotations and code completion for session.create_client("organizations").list_delegated_services_for_account method. boto3 documentation

# list_delegated_services_for_account method definition

await def list_delegated_services_for_account(
    self,
    *,
    AccountId: str,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListDelegatedServicesForAccountResponseTypeDef:  # (1)
    ...
  1. See ListDelegatedServicesForAccountResponseTypeDef
# list_delegated_services_for_account method usage example with argument unpacking

kwargs: ListDelegatedServicesForAccountRequestRequestTypeDef = {  # (1)
    "AccountId": ...,
}

parent.list_delegated_services_for_account(**kwargs)
  1. See ListDelegatedServicesForAccountRequestRequestTypeDef

list_handshakes_for_account#

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

Type annotations and code completion for session.create_client("organizations").list_handshakes_for_account method. boto3 documentation

# list_handshakes_for_account method definition

await def list_handshakes_for_account(
    self,
    *,
    Filter: HandshakeFilterTypeDef = ...,  # (1)
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListHandshakesForAccountResponseTypeDef:  # (2)
    ...
  1. See HandshakeFilterTypeDef
  2. See ListHandshakesForAccountResponseTypeDef
# list_handshakes_for_account method usage example with argument unpacking

kwargs: ListHandshakesForAccountRequestRequestTypeDef = {  # (1)
    "Filter": ...,
}

parent.list_handshakes_for_account(**kwargs)
  1. See ListHandshakesForAccountRequestRequestTypeDef

list_handshakes_for_organization#

Lists the handshakes that are associated with the organization that the requesting user is part of.

Type annotations and code completion for session.create_client("organizations").list_handshakes_for_organization method. boto3 documentation

# list_handshakes_for_organization method definition

await def list_handshakes_for_organization(
    self,
    *,
    Filter: HandshakeFilterTypeDef = ...,  # (1)
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListHandshakesForOrganizationResponseTypeDef:  # (2)
    ...
  1. See HandshakeFilterTypeDef
  2. See ListHandshakesForOrganizationResponseTypeDef
# list_handshakes_for_organization method usage example with argument unpacking

kwargs: ListHandshakesForOrganizationRequestRequestTypeDef = {  # (1)
    "Filter": ...,
}

parent.list_handshakes_for_organization(**kwargs)
  1. See ListHandshakesForOrganizationRequestRequestTypeDef

list_organizational_units_for_parent#

Lists the organizational units (OUs) in a parent organizational unit or root.

Type annotations and code completion for session.create_client("organizations").list_organizational_units_for_parent method. boto3 documentation

# list_organizational_units_for_parent method definition

await def list_organizational_units_for_parent(
    self,
    *,
    ParentId: str,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListOrganizationalUnitsForParentResponseTypeDef:  # (1)
    ...
  1. See ListOrganizationalUnitsForParentResponseTypeDef
# list_organizational_units_for_parent method usage example with argument unpacking

kwargs: ListOrganizationalUnitsForParentRequestRequestTypeDef = {  # (1)
    "ParentId": ...,
}

parent.list_organizational_units_for_parent(**kwargs)
  1. See ListOrganizationalUnitsForParentRequestRequestTypeDef

list_parents#

Lists the root or organizational units (OUs) that serve as the immediate parent of the specified child OU or account.

Type annotations and code completion for session.create_client("organizations").list_parents method. boto3 documentation

# list_parents method definition

await def list_parents(
    self,
    *,
    ChildId: str,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListParentsResponseTypeDef:  # (1)
    ...
  1. See ListParentsResponseTypeDef
# list_parents method usage example with argument unpacking

kwargs: ListParentsRequestRequestTypeDef = {  # (1)
    "ChildId": ...,
}

parent.list_parents(**kwargs)
  1. See ListParentsRequestRequestTypeDef

list_policies#

Retrieves the list of all policies in an organization of a specified type.

Type annotations and code completion for session.create_client("organizations").list_policies method. boto3 documentation

# list_policies method definition

await def list_policies(
    self,
    *,
    Filter: PolicyTypeType,  # (1)
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListPoliciesResponseTypeDef:  # (2)
    ...
  1. See PolicyTypeType
  2. See ListPoliciesResponseTypeDef
# list_policies method usage example with argument unpacking

kwargs: ListPoliciesRequestRequestTypeDef = {  # (1)
    "Filter": ...,
}

parent.list_policies(**kwargs)
  1. See ListPoliciesRequestRequestTypeDef

list_policies_for_target#

Lists the policies that are directly attached to the specified target root, organizational unit (OU), or account.

Type annotations and code completion for session.create_client("organizations").list_policies_for_target method. boto3 documentation

# list_policies_for_target method definition

await def list_policies_for_target(
    self,
    *,
    TargetId: str,
    Filter: PolicyTypeType,  # (1)
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListPoliciesForTargetResponseTypeDef:  # (2)
    ...
  1. See PolicyTypeType
  2. See ListPoliciesForTargetResponseTypeDef
# list_policies_for_target method usage example with argument unpacking

kwargs: ListPoliciesForTargetRequestRequestTypeDef = {  # (1)
    "TargetId": ...,
    "Filter": ...,
}

parent.list_policies_for_target(**kwargs)
  1. See ListPoliciesForTargetRequestRequestTypeDef

list_roots#

Lists the roots that are defined in the current organization.

Type annotations and code completion for session.create_client("organizations").list_roots method. boto3 documentation

# list_roots method definition

await def list_roots(
    self,
    *,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListRootsResponseTypeDef:  # (1)
    ...
  1. See ListRootsResponseTypeDef
# list_roots method usage example with argument unpacking

kwargs: ListRootsRequestRequestTypeDef = {  # (1)
    "NextToken": ...,
}

parent.list_roots(**kwargs)
  1. See ListRootsRequestRequestTypeDef

list_tags_for_resource#

Lists tags that are attached to the specified resource.

Type annotations and code completion for session.create_client("organizations").list_tags_for_resource method. boto3 documentation

# list_tags_for_resource method definition

await def list_tags_for_resource(
    self,
    *,
    ResourceId: str,
    NextToken: str = ...,
) -> ListTagsForResourceResponseTypeDef:  # (1)
    ...
  1. See ListTagsForResourceResponseTypeDef
# list_tags_for_resource method usage example with argument unpacking

kwargs: ListTagsForResourceRequestRequestTypeDef = {  # (1)
    "ResourceId": ...,
}

parent.list_tags_for_resource(**kwargs)
  1. See ListTagsForResourceRequestRequestTypeDef

list_targets_for_policy#

Lists all the roots, organizational units (OUs), and accounts that the specified policy is attached to.

Type annotations and code completion for session.create_client("organizations").list_targets_for_policy method. boto3 documentation

# list_targets_for_policy method definition

await def list_targets_for_policy(
    self,
    *,
    PolicyId: str,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListTargetsForPolicyResponseTypeDef:  # (1)
    ...
  1. See ListTargetsForPolicyResponseTypeDef
# list_targets_for_policy method usage example with argument unpacking

kwargs: ListTargetsForPolicyRequestRequestTypeDef = {  # (1)
    "PolicyId": ...,
}

parent.list_targets_for_policy(**kwargs)
  1. See ListTargetsForPolicyRequestRequestTypeDef

move_account#

Moves an account from its current source parent root or organizational unit (OU) to the specified destination parent root or OU.

Type annotations and code completion for session.create_client("organizations").move_account method. boto3 documentation

# move_account method definition

await def move_account(
    self,
    *,
    AccountId: str,
    SourceParentId: str,
    DestinationParentId: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# move_account method usage example with argument unpacking

kwargs: MoveAccountRequestRequestTypeDef = {  # (1)
    "AccountId": ...,
    "SourceParentId": ...,
    "DestinationParentId": ...,
}

parent.move_account(**kwargs)
  1. See MoveAccountRequestRequestTypeDef

put_resource_policy#

Creates or updates a resource policy.

Type annotations and code completion for session.create_client("organizations").put_resource_policy method. boto3 documentation

# put_resource_policy method definition

await def put_resource_policy(
    self,
    *,
    Content: str,
    Tags: Sequence[TagTypeDef] = ...,  # (1)
) -> PutResourcePolicyResponseTypeDef:  # (2)
    ...
  1. See TagTypeDef
  2. See PutResourcePolicyResponseTypeDef
# put_resource_policy method usage example with argument unpacking

kwargs: PutResourcePolicyRequestRequestTypeDef = {  # (1)
    "Content": ...,
}

parent.put_resource_policy(**kwargs)
  1. See PutResourcePolicyRequestRequestTypeDef

register_delegated_administrator#

Enables the specified member account to administer the Organizations features of the specified Amazon Web Services service.

Type annotations and code completion for session.create_client("organizations").register_delegated_administrator method. boto3 documentation

# register_delegated_administrator method definition

await def register_delegated_administrator(
    self,
    *,
    AccountId: str,
    ServicePrincipal: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# register_delegated_administrator method usage example with argument unpacking

kwargs: RegisterDelegatedAdministratorRequestRequestTypeDef = {  # (1)
    "AccountId": ...,
    "ServicePrincipal": ...,
}

parent.register_delegated_administrator(**kwargs)
  1. See RegisterDelegatedAdministratorRequestRequestTypeDef

remove_account_from_organization#

Removes the specified account from the organization.

Type annotations and code completion for session.create_client("organizations").remove_account_from_organization method. boto3 documentation

# remove_account_from_organization method definition

await def remove_account_from_organization(
    self,
    *,
    AccountId: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# remove_account_from_organization method usage example with argument unpacking

kwargs: RemoveAccountFromOrganizationRequestRequestTypeDef = {  # (1)
    "AccountId": ...,
}

parent.remove_account_from_organization(**kwargs)
  1. See RemoveAccountFromOrganizationRequestRequestTypeDef

tag_resource#

Adds one or more tags to the specified resource.

Type annotations and code completion for session.create_client("organizations").tag_resource method. boto3 documentation

# tag_resource method definition

await def tag_resource(
    self,
    *,
    ResourceId: str,
    Tags: Sequence[TagTypeDef],  # (1)
) -> EmptyResponseMetadataTypeDef:  # (2)
    ...
  1. See TagTypeDef
  2. See EmptyResponseMetadataTypeDef
# tag_resource method usage example with argument unpacking

kwargs: TagResourceRequestRequestTypeDef = {  # (1)
    "ResourceId": ...,
    "Tags": ...,
}

parent.tag_resource(**kwargs)
  1. See TagResourceRequestRequestTypeDef

untag_resource#

Removes any tags with the specified keys from the specified resource.

Type annotations and code completion for session.create_client("organizations").untag_resource method. boto3 documentation

# untag_resource method definition

await def untag_resource(
    self,
    *,
    ResourceId: str,
    TagKeys: Sequence[str],
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# untag_resource method usage example with argument unpacking

kwargs: UntagResourceRequestRequestTypeDef = {  # (1)
    "ResourceId": ...,
    "TagKeys": ...,
}

parent.untag_resource(**kwargs)
  1. See UntagResourceRequestRequestTypeDef

update_organizational_unit#

Renames the specified organizational unit (OU).

Type annotations and code completion for session.create_client("organizations").update_organizational_unit method. boto3 documentation

# update_organizational_unit method definition

await def update_organizational_unit(
    self,
    *,
    OrganizationalUnitId: str,
    Name: str = ...,
) -> UpdateOrganizationalUnitResponseTypeDef:  # (1)
    ...
  1. See UpdateOrganizationalUnitResponseTypeDef
# update_organizational_unit method usage example with argument unpacking

kwargs: UpdateOrganizationalUnitRequestRequestTypeDef = {  # (1)
    "OrganizationalUnitId": ...,
}

parent.update_organizational_unit(**kwargs)
  1. See UpdateOrganizationalUnitRequestRequestTypeDef

update_policy#

Updates an existing policy with a new name, description, or content.

Type annotations and code completion for session.create_client("organizations").update_policy method. boto3 documentation

# update_policy method definition

await def update_policy(
    self,
    *,
    PolicyId: str,
    Name: str = ...,
    Description: str = ...,
    Content: str = ...,
) -> UpdatePolicyResponseTypeDef:  # (1)
    ...
  1. See UpdatePolicyResponseTypeDef
# update_policy method usage example with argument unpacking

kwargs: UpdatePolicyRequestRequestTypeDef = {  # (1)
    "PolicyId": ...,
}

parent.update_policy(**kwargs)
  1. See UpdatePolicyRequestRequestTypeDef

__aenter__#

Type annotations and code completion for session.create_client("organizations").__aenter__ method. boto3 documentation

# __aenter__ method definition

await def __aenter__(
    self,
) -> OrganizationsClient:
    ...

__aexit__#

Type annotations and code completion for session.create_client("organizations").__aexit__ method. boto3 documentation

# __aexit__ method definition

await def __aexit__(
    self,
    exc_type: Any,
    exc_val: Any,
    exc_tb: Any,
) -> Any:
    ...

get_paginator#

Type annotations and code completion for session.create_client("organizations").get_paginator method with overloads.