Skip to content

OrganizationsClient

Index > Organizations > OrganizationsClient

Auto-generated documentation for Organizations type annotations stubs module mypy-boto3-organizations.

OrganizationsClient

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

Usage example
from boto3.session import Session
from mypy_boto3_organizations.client import OrganizationsClient

def get_organizations_client() -> OrganizationsClient:
    return Session().client("organizations")

Exceptions

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

Usage example
client = boto3.client("organizations")

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.RootNotFoundException,
    client.ServiceException,
    client.SourceParentNotFoundException,
    client.TargetNotFoundException,
    client.TooManyRequestsException,
    client.UnsupportedAPIEndpointException,
) as e:
    print(e)
Type checking example
from mypy_boto3_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 boto3.client("organizations").accept_handshake method. boto3 documentation

Method definition
def accept_handshake(
    self,
    *,
    HandshakeId: str,
) -> AcceptHandshakeResponseTypeDef:  # (1)
    ...
  1. See AcceptHandshakeResponseTypeDef
Usage example with kwargs
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 boto3.client("organizations").attach_policy method. boto3 documentation

Method definition
def attach_policy(
    self,
    *,
    PolicyId: str,
    TargetId: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
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 boto3.client("organizations").can_paginate method. boto3 documentation

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

cancel_handshake

Cancels a handshake.

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

Method definition
def cancel_handshake(
    self,
    *,
    HandshakeId: str,
) -> CancelHandshakeResponseTypeDef:  # (1)
    ...
  1. See CancelHandshakeResponseTypeDef
Usage example with kwargs
kwargs: CancelHandshakeRequestRequestTypeDef = {  # (1)
    "HandshakeId": ...,
}

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

close

Closes underlying endpoint connections.

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

Method definition
def close(
    self,
) -> None:
    ...

close_account

Closes an Amazon Web Services member account within an organization.

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

Method definition
def close_account(
    self,
    *,
    AccountId: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
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 boto3.client("organizations").create_account method. boto3 documentation

Method definition
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
Usage example with kwargs
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 boto3.client("organizations").create_gov_cloud_account method. boto3 documentation

Method definition
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
Usage example with kwargs
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 boto3.client("organizations").create_organization method. boto3 documentation

Method definition
def create_organization(
    self,
    *,
    FeatureSet: OrganizationFeatureSetType = ...,  # (1)
) -> CreateOrganizationResponseTypeDef:  # (2)
    ...
  1. See OrganizationFeatureSetType
  2. See CreateOrganizationResponseTypeDef
Usage example with kwargs
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 boto3.client("organizations").create_organizational_unit method. boto3 documentation

Method definition
def create_organizational_unit(
    self,
    *,
    ParentId: str,
    Name: str,
    Tags: Sequence[TagTypeDef] = ...,  # (1)
) -> CreateOrganizationalUnitResponseTypeDef:  # (2)
    ...
  1. See TagTypeDef
  2. See CreateOrganizationalUnitResponseTypeDef
Usage example with kwargs
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 boto3.client("organizations").create_policy method. boto3 documentation

Method definition
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
Usage example with kwargs
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 boto3.client("organizations").decline_handshake method. boto3 documentation

Method definition
def decline_handshake(
    self,
    *,
    HandshakeId: str,
) -> DeclineHandshakeResponseTypeDef:  # (1)
    ...
  1. See DeclineHandshakeResponseTypeDef
Usage example with kwargs
kwargs: DeclineHandshakeRequestRequestTypeDef = {  # (1)
    "HandshakeId": ...,
}

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

delete_organization

Deletes the organization.

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

Method definition
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 boto3.client("organizations").delete_organizational_unit method. boto3 documentation

Method definition
def delete_organizational_unit(
    self,
    *,
    OrganizationalUnitId: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
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 boto3.client("organizations").delete_policy method. boto3 documentation

Method definition
def delete_policy(
    self,
    *,
    PolicyId: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: DeletePolicyRequestRequestTypeDef = {  # (1)
    "PolicyId": ...,
}

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

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 boto3.client("organizations").deregister_delegated_administrator method. boto3 documentation

Method definition
def deregister_delegated_administrator(
    self,
    *,
    AccountId: str,
    ServicePrincipal: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
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 boto3.client("organizations").describe_account method. boto3 documentation

Method definition
def describe_account(
    self,
    *,
    AccountId: str,
) -> DescribeAccountResponseTypeDef:  # (1)
    ...
  1. See DescribeAccountResponseTypeDef
Usage example with kwargs
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 boto3.client("organizations").describe_create_account_status method. boto3 documentation

Method definition
def describe_create_account_status(
    self,
    *,
    CreateAccountRequestId: str,
) -> DescribeCreateAccountStatusResponseTypeDef:  # (1)
    ...
  1. See DescribeCreateAccountStatusResponseTypeDef
Usage example with kwargs
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 boto3.client("organizations").describe_effective_policy method. boto3 documentation

Method definition
def describe_effective_policy(
    self,
    *,
    PolicyType: EffectivePolicyTypeType,  # (1)
    TargetId: str = ...,
) -> DescribeEffectivePolicyResponseTypeDef:  # (2)
    ...
  1. See EffectivePolicyTypeType
  2. See DescribeEffectivePolicyResponseTypeDef
Usage example with kwargs
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 boto3.client("organizations").describe_handshake method. boto3 documentation

Method definition
def describe_handshake(
    self,
    *,
    HandshakeId: str,
) -> DescribeHandshakeResponseTypeDef:  # (1)
    ...
  1. See DescribeHandshakeResponseTypeDef
Usage example with kwargs
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 boto3.client("organizations").describe_organization method. boto3 documentation

Method definition
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 boto3.client("organizations").describe_organizational_unit method. boto3 documentation

Method definition
def describe_organizational_unit(
    self,
    *,
    OrganizationalUnitId: str,
) -> DescribeOrganizationalUnitResponseTypeDef:  # (1)
    ...
  1. See DescribeOrganizationalUnitResponseTypeDef
Usage example with kwargs
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 boto3.client("organizations").describe_policy method. boto3 documentation

Method definition
def describe_policy(
    self,
    *,
    PolicyId: str,
) -> DescribePolicyResponseTypeDef:  # (1)
    ...
  1. See DescribePolicyResponseTypeDef
Usage example with kwargs
kwargs: DescribePolicyRequestRequestTypeDef = {  # (1)
    "PolicyId": ...,
}

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

detach_policy

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

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

Method definition
def detach_policy(
    self,
    *,
    PolicyId: str,
    TargetId: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
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 boto3.client("organizations").disable_aws_service_access method. boto3 documentation

Method definition
def disable_aws_service_access(
    self,
    *,
    ServicePrincipal: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
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 boto3.client("organizations").disable_policy_type method. boto3 documentation

Method definition
def disable_policy_type(
    self,
    *,
    RootId: str,
    PolicyType: PolicyTypeType,  # (1)
) -> DisablePolicyTypeResponseTypeDef:  # (2)
    ...
  1. See PolicyTypeType
  2. See DisablePolicyTypeResponseTypeDef
Usage example with kwargs
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 boto3.client("organizations").enable_all_features method. boto3 documentation

Method definition
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 boto3.client("organizations").enable_aws_service_access method. boto3 documentation

Method definition
def enable_aws_service_access(
    self,
    *,
    ServicePrincipal: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
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 boto3.client("organizations").enable_policy_type method. boto3 documentation

Method definition
def enable_policy_type(
    self,
    *,
    RootId: str,
    PolicyType: PolicyTypeType,  # (1)
) -> EnablePolicyTypeResponseTypeDef:  # (2)
    ...
  1. See PolicyTypeType
  2. See EnablePolicyTypeResponseTypeDef
Usage example with kwargs
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 boto3.client("organizations").generate_presigned_url method. boto3 documentation

Method definition
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 boto3.client("organizations").invite_account_to_organization method. boto3 documentation

Method definition
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
Usage example with kwargs
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 boto3.client("organizations").leave_organization method. boto3 documentation

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

list_accounts

Lists all the accounts in the organization.

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

Method definition
def list_accounts(
    self,
    *,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListAccountsResponseTypeDef:  # (1)
    ...
  1. See ListAccountsResponseTypeDef
Usage example with kwargs
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 boto3.client("organizations").list_accounts_for_parent method. boto3 documentation

Method definition
def list_accounts_for_parent(
    self,
    *,
    ParentId: str,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListAccountsForParentResponseTypeDef:  # (1)
    ...
  1. See ListAccountsForParentResponseTypeDef
Usage example with kwargs
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 boto3.client("organizations").list_aws_service_access_for_organization method. boto3 documentation

Method definition
def list_aws_service_access_for_organization(
    self,
    *,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListAWSServiceAccessForOrganizationResponseTypeDef:  # (1)
    ...
  1. See ListAWSServiceAccessForOrganizationResponseTypeDef
Usage example with kwargs
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 boto3.client("organizations").list_children method. boto3 documentation

Method definition
def list_children(
    self,
    *,
    ParentId: str,
    ChildType: ChildTypeType,  # (1)
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListChildrenResponseTypeDef:  # (2)
    ...
  1. See ChildTypeType
  2. See ListChildrenResponseTypeDef
Usage example with kwargs
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 boto3.client("organizations").list_create_account_status method. boto3 documentation

Method definition
def list_create_account_status(
    self,
    *,
    States: Sequence[CreateAccountStateType] = ...,  # (1)
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListCreateAccountStatusResponseTypeDef:  # (2)
    ...
  1. See CreateAccountStateType
  2. See ListCreateAccountStatusResponseTypeDef
Usage example with kwargs
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 boto3.client("organizations").list_delegated_administrators method. boto3 documentation

Method definition
def list_delegated_administrators(
    self,
    *,
    ServicePrincipal: str = ...,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListDelegatedAdministratorsResponseTypeDef:  # (1)
    ...
  1. See ListDelegatedAdministratorsResponseTypeDef
Usage example with kwargs
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 boto3.client("organizations").list_delegated_services_for_account method. boto3 documentation

Method definition
def list_delegated_services_for_account(
    self,
    *,
    AccountId: str,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListDelegatedServicesForAccountResponseTypeDef:  # (1)
    ...
  1. See ListDelegatedServicesForAccountResponseTypeDef
Usage example with kwargs
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 boto3.client("organizations").list_handshakes_for_account method. boto3 documentation

Method definition
def list_handshakes_for_account(
    self,
    *,
    Filter: HandshakeFilterTypeDef = ...,  # (1)
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListHandshakesForAccountResponseTypeDef:  # (2)
    ...
  1. See HandshakeFilterTypeDef
  2. See ListHandshakesForAccountResponseTypeDef
Usage example with kwargs
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 boto3.client("organizations").list_handshakes_for_organization method. boto3 documentation

Method definition
def list_handshakes_for_organization(
    self,
    *,
    Filter: HandshakeFilterTypeDef = ...,  # (1)
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListHandshakesForOrganizationResponseTypeDef:  # (2)
    ...
  1. See HandshakeFilterTypeDef
  2. See ListHandshakesForOrganizationResponseTypeDef
Usage example with kwargs
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 boto3.client("organizations").list_organizational_units_for_parent method. boto3 documentation

Method definition
def list_organizational_units_for_parent(
    self,
    *,
    ParentId: str,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListOrganizationalUnitsForParentResponseTypeDef:  # (1)
    ...
  1. See ListOrganizationalUnitsForParentResponseTypeDef
Usage example with kwargs
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 boto3.client("organizations").list_parents method. boto3 documentation

Method definition
def list_parents(
    self,
    *,
    ChildId: str,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListParentsResponseTypeDef:  # (1)
    ...
  1. See ListParentsResponseTypeDef
Usage example with kwargs
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 boto3.client("organizations").list_policies method. boto3 documentation

Method definition
def list_policies(
    self,
    *,
    Filter: PolicyTypeType,  # (1)
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListPoliciesResponseTypeDef:  # (2)
    ...
  1. See PolicyTypeType
  2. See ListPoliciesResponseTypeDef
Usage example with kwargs
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 boto3.client("organizations").list_policies_for_target method. boto3 documentation

Method definition
def list_policies_for_target(
    self,
    *,
    TargetId: str,
    Filter: PolicyTypeType,  # (1)
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListPoliciesForTargetResponseTypeDef:  # (2)
    ...
  1. See PolicyTypeType
  2. See ListPoliciesForTargetResponseTypeDef
Usage example with kwargs
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 boto3.client("organizations").list_roots method. boto3 documentation

Method definition
def list_roots(
    self,
    *,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListRootsResponseTypeDef:  # (1)
    ...
  1. See ListRootsResponseTypeDef
Usage example with kwargs
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 boto3.client("organizations").list_tags_for_resource method. boto3 documentation

Method definition
def list_tags_for_resource(
    self,
    *,
    ResourceId: str,
    NextToken: str = ...,
) -> ListTagsForResourceResponseTypeDef:  # (1)
    ...
  1. See ListTagsForResourceResponseTypeDef
Usage example with kwargs
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 boto3.client("organizations").list_targets_for_policy method. boto3 documentation

Method definition
def list_targets_for_policy(
    self,
    *,
    PolicyId: str,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListTargetsForPolicyResponseTypeDef:  # (1)
    ...
  1. See ListTargetsForPolicyResponseTypeDef
Usage example with kwargs
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 boto3.client("organizations").move_account method. boto3 documentation

Method definition
def move_account(
    self,
    *,
    AccountId: str,
    SourceParentId: str,
    DestinationParentId: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: MoveAccountRequestRequestTypeDef = {  # (1)
    "AccountId": ...,
    "SourceParentId": ...,
    "DestinationParentId": ...,
}

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

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 boto3.client("organizations").register_delegated_administrator method. boto3 documentation

Method definition
def register_delegated_administrator(
    self,
    *,
    AccountId: str,
    ServicePrincipal: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
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 boto3.client("organizations").remove_account_from_organization method. boto3 documentation

Method definition
def remove_account_from_organization(
    self,
    *,
    AccountId: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
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 boto3.client("organizations").tag_resource method. boto3 documentation

Method definition
def tag_resource(
    self,
    *,
    ResourceId: str,
    Tags: Sequence[TagTypeDef],  # (1)
) -> EmptyResponseMetadataTypeDef:  # (2)
    ...
  1. See TagTypeDef
  2. See EmptyResponseMetadataTypeDef
Usage example with kwargs
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 boto3.client("organizations").untag_resource method. boto3 documentation

Method definition
def untag_resource(
    self,
    *,
    ResourceId: str,
    TagKeys: Sequence[str],
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
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 boto3.client("organizations").update_organizational_unit method. boto3 documentation

Method definition
def update_organizational_unit(
    self,
    *,
    OrganizationalUnitId: str,
    Name: str = ...,
) -> UpdateOrganizationalUnitResponseTypeDef:  # (1)
    ...
  1. See UpdateOrganizationalUnitResponseTypeDef
Usage example with kwargs
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 boto3.client("organizations").update_policy method. boto3 documentation

Method definition
def update_policy(
    self,
    *,
    PolicyId: str,
    Name: str = ...,
    Description: str = ...,
    Content: str = ...,
) -> UpdatePolicyResponseTypeDef:  # (1)
    ...
  1. See UpdatePolicyResponseTypeDef
Usage example with kwargs
kwargs: UpdatePolicyRequestRequestTypeDef = {  # (1)
    "PolicyId": ...,
}

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

get_paginator

Type annotations and code completion for boto3.client("organizations").get_paginator method with overloads.