Skip to content

delete_resource_explorer_setup async

delete_resource_explorer_setup(
    *,
    config_overrides: Optional[AsyncResourceExplorer2ClientConfig] = None,
    region_list: Optional[RegionList] = None,
    delete_in_all_regions: Optional[bool] = None,
) -> DeleteResourceExplorerSetupOutput

Deletes a Resource Explorer setup configuration. This operation removes indexes and views from the specified Regions or all Regions where Resource Explorer is configured.

Parameters:

  • region_list (Optional[RegionList], default: None ) –

    A list of Amazon Web Services Regions from which to delete the Resource Explorer configuration. If not specified, the operation uses the DeleteInAllRegions parameter to determine scope.

  • delete_in_all_regions (Optional[bool], default: None ) –

    Specifies whether to delete Resource Explorer configuration from all Regions where it is currently enabled. If this parameter is set to true, a value for RegionList must not be provided. Otherwise, the operation fails with a ValidationException error.

Raises:

  • AccessDeniedException –

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

  • ConflictException –

    If you attempted to create a view, then the request failed because either you specified parameters that didn’t match the original request, or you attempted to create a view with a name that already exists in this Amazon Web Services Region.

    If you attempted to create an index, then the request failed because either you specified parameters that didn't match the original request, or an index already exists in the current Amazon Web Services Region.

    If you attempted to update an index type to AGGREGATOR, then the request failed because you already have an AGGREGATOR index in a different Amazon Web Services Region.

  • InternalServerException –

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

  • 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 delete_resource_explorer_setup(
    self,
    *,
    config_overrides: Optional[AsyncResourceExplorer2ClientConfig] = None,
    region_list: Optional[
        "capo_resource_explorer_2.types.region_list.RegionList"
    ] = None,
    delete_in_all_regions: Optional[bool] = None,
) -> "capo_resource_explorer_2.types.delete_resource_explorer_setup_output.DeleteResourceExplorerSetupOutput":
    """<p>Deletes a Resource Explorer setup configuration. This operation removes indexes and views from the specified Regions or all Regions where Resource Explorer is configured.</p>

    Args:
        region_list: <p>A list of Amazon Web Services Regions from which to delete the Resource Explorer configuration. If not specified, the operation uses the <code>DeleteInAllRegions</code> parameter to determine scope.</p>
        delete_in_all_regions: <p>Specifies whether to delete Resource Explorer configuration from all Regions where it is currently enabled. If this parameter is set to <code>true</code>, a value for <code>RegionList</code> must not be provided. Otherwise, the operation fails with a <code>ValidationException</code> error.</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.conflict_exception.ConflictException: <p>If you attempted to create a view, then the request failed because either you specified parameters that didn’t match the original request, or you attempted to create a view with a name that already exists in this Amazon Web Services Region.</p> <p>If you attempted to create an index, then the request failed because either you specified parameters that didn't match the original request, or an index already exists in the current Amazon Web Services Region.</p> <p>If you attempted to update an index type to <code>AGGREGATOR</code>, then the request failed because you already have an <code>AGGREGATOR</code> index in a different Amazon Web Services Region.</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.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.delete_resource_explorer_setup_input.DeleteResourceExplorerSetupInput]",
    ) -> AsyncOperationResponse[
        "capo_resource_explorer_2.types.delete_resource_explorer_setup_output.DeleteResourceExplorerSetupOutput"
    ]:
        import capo_resource_explorer_2._operations.resource_explorer.delete_resource_explorer_setup

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteResourceExplorerSetup")
    )
    input_: capo_resource_explorer_2.types.delete_resource_explorer_setup_input.DeleteResourceExplorerSetupInput = {}
    if region_list is not None:
        input_["region_list"] = region_list
    if delete_in_all_regions is not None:
        input_["delete_in_all_regions"] = delete_in_all_regions

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