Skip to content

register_organization_delegated_admin async

register_organization_delegated_admin(
    account_id: AwsAccountId,
    *,
    config_overrides: Optional[AsyncAssuranceClientConfig] = None,
) -> RegisterOrganizationDelegatedAdminOutput

Registers a member account of your organization as the delegated administrator for AWS Assurance. The delegated administrator can then manage organization-scoped environments together with the management account.

Only the management account of the organization can call this operation.

Parameters:

  • account_id (AwsAccountId) –

    The 12-digit AWS account ID of the member account to register as the delegated administrator. The account must be an active member of the caller's organization.

Raises:

Examples:

Register a delegated administrator Registers a member account as the AWS Assurance delegated administrator so it can help run the payments team's PCI-DSS assessment across the organization.

>>> await client.register_organization_delegated_admin(account_id='444455556666')
Source code in docs_src/capo_assurance/_services/async_assurance.py
async def register_organization_delegated_admin(
    self,
    account_id: "capo_assurance.types.aws_account_id.AwsAccountId",
    *,
    config_overrides: Optional[AsyncAssuranceClientConfig] = None,
) -> "capo_assurance.types.register_organization_delegated_admin_output.RegisterOrganizationDelegatedAdminOutput":
    """<p>Registers a member account of your organization as the delegated administrator for AWS Assurance. The delegated administrator can then manage organization-scoped environments together with the management account.</p> <p>Only the management account of the organization can call this operation.</p>

    Args:
        account_id: <p>The 12-digit AWS account ID of the member account to register as the delegated administrator. The account must be an active member of the caller's organization.</p>

    Raises:
        capo_assurance.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action. This error occurs when the request is unauthenticated, or is authenticated but lacks permission to invoke the operation.</p>
        capo_assurance.errors.conflict_exception.ConflictException: <p>A conflict occurred (for example, resource already exists).</p>
        capo_assurance.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred.</p>
        capo_assurance.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource was not found.</p>
        capo_assurance.errors.throttling_exception.ThrottlingException: <p>The request was throttled.</p>
        capo_assurance.errors.validation_exception.ValidationException: <p>The request failed validation.</p>
        capo_assurance.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Register a delegated administrator
        Registers a member account as the AWS Assurance delegated administrator so it can help run the payments team's PCI-DSS assessment across the organization.

        >>> await client.register_organization_delegated_admin(account_id='444455556666')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_assurance.types.register_organization_delegated_admin_input.RegisterOrganizationDelegatedAdminInput]",
    ) -> AsyncOperationResponse[
        "capo_assurance.types.register_organization_delegated_admin_output.RegisterOrganizationDelegatedAdminOutput"
    ]:
        import capo_assurance._operations.assurance.register_organization_delegated_admin

        (
            output,
            http_response,
        ) = await capo_assurance._operations.assurance.register_organization_delegated_admin.async_register_organization_delegated_admin(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("RegisterOrganizationDelegatedAdmin")
    )
    input_: capo_assurance.types.register_organization_delegated_admin_input.RegisterOrganizationDelegatedAdminInput = {
        "account_id": account_id
    }

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