Skip to content

get_resource_explorer_setup async

get_resource_explorer_setup(
    task_id: str,
    *,
    config_overrides: Optional[AsyncResourceExplorer2ClientConfig] = None,
    max_results: Optional[int] = None,
    next_token: Optional[str] = None,
) -> GetResourceExplorerSetupOutput

Retrieves the status and details of a Resource Explorer setup operation. This operation returns information about the progress of creating or deleting Resource Explorer configurations across Regions.

Parameters:

  • task_id (str) –

    The unique identifier of the setup task to retrieve status information for. This ID is returned by CreateResourceExplorerSetup or DeleteResourceExplorerSetup operations.

  • max_results (Optional[int], default: None ) –

    The maximum number of Region status results to return in a single response. Valid values are between 1 and 100.

  • next_token (Optional[str], default: None ) –

    The pagination token from a previous GetResourceExplorerSetup response. Use this token to retrieve the next set of results.

Raises:

  • AccessDeniedException –

    The credentials that you used to call this operation don't have the minimum required permissions.

  • InternalServerException –

    The request failed because of internal service error. Try your request again later.

  • ResourceNotFoundException –

    You specified a resource that doesn't exist. Check the ID or ARN that you used to identity the resource, and try again.

  • ThrottlingException –

    The request failed because you exceeded a rate limit for this operation. For more information, see Quotas for Resource Explorer.

  • ValidationException –

    You provided an invalid value for one of the operation's parameters. Check the syntax for the operation, and try again.

  • UnknownServiceError –

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

Source code in docs_src/capo_resource_explorer_2/_services/async_resource_explorer2.py
async def get_resource_explorer_setup(
    self,
    task_id: str,
    *,
    config_overrides: Optional[AsyncResourceExplorer2ClientConfig] = None,
    max_results: Optional[int] = None,
    next_token: Optional[str] = None,
) -> "capo_resource_explorer_2.types.get_resource_explorer_setup_output.GetResourceExplorerSetupOutput":
    """<p>Retrieves the status and details of a Resource Explorer setup operation. This operation returns information about the progress of creating or deleting Resource Explorer configurations across Regions.</p>

    Args:
        task_id: <p>The unique identifier of the setup task to retrieve status information for. This ID is returned by <code>CreateResourceExplorerSetup</code> or <code>DeleteResourceExplorerSetup</code> operations.</p>
        max_results: <p>The maximum number of Region status results to return in a single response. Valid values are between <code>1</code> and <code>100</code>.</p>
        next_token: <p>The pagination token from a previous <code>GetResourceExplorerSetup</code> response. Use this token to retrieve the next set of results.</p>

    Raises:
        capo_resource_explorer_2.errors.access_denied_exception.AccessDeniedException: <p>The credentials that you used to call this operation don't have the minimum required permissions.</p>
        capo_resource_explorer_2.errors.internal_server_exception.InternalServerException: <p>The request failed because of internal service error. Try your request again later.</p>
        capo_resource_explorer_2.errors.resource_not_found_exception.ResourceNotFoundException: <p>You specified a resource that doesn't exist. Check the ID or ARN that you used to identity the resource, and try again.</p>
        capo_resource_explorer_2.errors.throttling_exception.ThrottlingException: <p>The request failed because you exceeded a rate limit for this operation. For more information, see <a href="https://docs.aws.amazon.com/resource-explorer/latest/userguide/quotas.html">Quotas for Resource Explorer</a>.</p>
        capo_resource_explorer_2.errors.validation_exception.ValidationException: <p>You provided an invalid value for one of the operation's parameters. Check the syntax for the operation, and try again.</p>
        capo_resource_explorer_2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_resource_explorer_2.types.get_resource_explorer_setup_input.GetResourceExplorerSetupInput]",
    ) -> AsyncOperationResponse[
        "capo_resource_explorer_2.types.get_resource_explorer_setup_output.GetResourceExplorerSetupOutput"
    ]:
        import capo_resource_explorer_2._operations.resource_explorer.get_resource_explorer_setup

        (
            output,
            http_response,
        ) = await capo_resource_explorer_2._operations.resource_explorer.get_resource_explorer_setup.async_get_resource_explorer_setup(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_resource_explorer_2.types.get_resource_explorer_setup_output.GetResourceExplorerSetupOutput",
    ) -> dict[str, Any]:
        import capo_resource_explorer_2.types.get_resource_explorer_setup_output

        return capo_resource_explorer_2.types.get_resource_explorer_setup_output.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("GetResourceExplorerSetup", redact_output=_redact_output),
    )
    input_: capo_resource_explorer_2.types.get_resource_explorer_setup_input.GetResourceExplorerSetupInput = {
        "task_id": task_id
    }
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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