Skip to content

get_agentic_account_setup async

get_agentic_account_setup(
    *, config_overrides: Optional[AsyncWorkSpacesClientConfig] = None
) -> GetAgenticAccountSetupResult

Describes the agentic setup of your account in the current Region. If you haven't set up your account, the status is NOT_SET_UP.

Raises:

Examples:

Example – Checking the agentic setup status of an account The following example returns the agentic setup status of the calling account.

>>> await client.get_agentic_account_setup()
Source code in docs_src/capo_workspaces/_services/async_work_spaces.py
async def get_agentic_account_setup(
    self, *, config_overrides: Optional[AsyncWorkSpacesClientConfig] = None
) -> "capo_workspaces.types.get_agentic_account_setup_result.GetAgenticAccountSetupResult":
    """<p>Describes the agentic setup of your account in the current Region. If you haven't set up your account, the status is <code>NOT_SET_UP</code>.</p>

    Raises:
        capo_workspaces.errors.access_denied_exception.AccessDeniedException: <p>The user is not authorized to access a resource.</p>
        capo_workspaces.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Retry the request with exponential backoff.</p>
        capo_workspaces.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Example – Checking the agentic setup status of an account
        The following example returns the agentic setup status of the calling account.

        >>> await client.get_agentic_account_setup()
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_workspaces.types.get_agentic_account_setup_request.GetAgenticAccountSetupRequest]",
    ) -> AsyncOperationResponse[
        "capo_workspaces.types.get_agentic_account_setup_result.GetAgenticAccountSetupResult"
    ]:
        if req.options.protocol == "awsJson1_1":
            import capo_workspaces._operations.workspaces_service.aws_json1_1.get_agentic_account_setup

            (
                output,
                http_response,
            ) = await capo_workspaces._operations.workspaces_service.aws_json1_1.get_agentic_account_setup.async_get_agentic_account_setup(
                req.options, req.input
            )
        elif req.options.protocol == "rpcv2Cbor":
            import capo_workspaces._operations.workspaces_service.rpcv2_cbor.get_agentic_account_setup

            (
                output,
                http_response,
            ) = await capo_workspaces._operations.workspaces_service.rpcv2_cbor.get_agentic_account_setup.async_get_agentic_account_setup(
                req.options, req.input
            )
        else:
            raise ValueError(f"unknown protocol {req.options.protocol!r}")
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetAgenticAccountSetup")
    )
    input_: capo_workspaces.types.get_agentic_account_setup_request.GetAgenticAccountSetupRequest = {}

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