Skip to content

describe_organization async

describe_organization(
    *, config_overrides: Optional[AsyncOrganizationsClientConfig] = None
) -> DescribeOrganizationResponse

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

You can call this operation from any account in a organization.

Even if a policy type is shown as available in the organization, you can disable it separately at the root level with DisablePolicyType. Use ListRoots to see the status of policy types for a specified root.

Raises:

  • AccessDeniedException –

    You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see Access Management in the IAM User Guide.

  • AWSOrganizationsNotInUseException –

    Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.

  • ConcurrentModificationException –

    The target of the operation is currently being modified by a different request. Try again later.

  • ServiceException –

    Organizations can't complete your request because of an internal service error. Try again later.

  • TooManyRequestsException –

    You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.

    For information about quotas that affect Organizations, see Quotas for Organizations in the Organizations User Guide.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Examples:

To get information about an organization The following example shows how to request information about the current user's organization:/n/n

>>> await client.describe_organization()
Source code in docs_src/capo_organizations/_services/async_organizations.py
async def describe_organization(
    self, *, config_overrides: Optional[AsyncOrganizationsClientConfig] = None
) -> "capo_organizations.types.describe_organization_response.DescribeOrganizationResponse":
    """<p>Retrieves information about the organization that the user's account belongs to.</p> <p>You can call this operation from any account in a organization.</p> <note> <p>Even if a policy type is shown as available in the organization, you can disable it separately at the root level with <a>DisablePolicyType</a>. Use <a>ListRoots</a> to see the status of policy types for a specified root.</p> </note>

    Raises:
        capo_organizations.errors.access_denied_exception.AccessDeniedException: <p>You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html">Access Management</a> in the <i>IAM User Guide</i>.</p>
        capo_organizations.errors.aws_organizations_not_in_use_exception.AWSOrganizationsNotInUseException: <p>Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.</p>
        capo_organizations.errors.concurrent_modification_exception.ConcurrentModificationException: <p>The target of the operation is currently being modified by a different request. Try again later.</p>
        capo_organizations.errors.service_exception.ServiceException: <p>Organizations can't complete your request because of an internal service error. Try again later.</p>
        capo_organizations.errors.too_many_requests_exception.TooManyRequestsException: <p>You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.</p> <p>For information about quotas that affect Organizations, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html">Quotas for Organizations</a> in the <i>Organizations User Guide</i>.</p>
        capo_organizations.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To get information about an organization
        The following example shows how to request information about the current user's organization:/n/n

        >>> await client.describe_organization()
    """

    async def _handler(
        req: "AsyncOperationRequest[None]",
    ) -> AsyncOperationResponse[
        "capo_organizations.types.describe_organization_response.DescribeOrganizationResponse"
    ]:
        import capo_organizations._operations.aws_organizations_v20161128.describe_organization

        (
            output,
            http_response,
        ) = await capo_organizations._operations.aws_organizations_v20161128.describe_organization.async_describe_organization(
            req.options
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_organizations.types.describe_organization_response.DescribeOrganizationResponse",
    ) -> dict[str, Any]:
        import capo_organizations.types.describe_organization_response

        return capo_organizations.types.describe_organization_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("DescribeOrganization", redact_output=_redact_output),
    )

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=None, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output