Skip to content

list_resource_providers async

list_resource_providers(
    *,
    config_overrides: Optional[AsyncBackupExternalClientConfig] = None,
    appliance_arn: Optional[ApplianceArn] = None,
    max_results: Optional[int] = None,
    next_token: Optional[NextToken] = None,
    resource_provider_type: Optional[ResourceProviderType] = None,
) -> ListResourceProvidersOutput

Returns a list of resource providers, optionally filtered by appliance or provider type. Use the pagination token to retrieve additional results.

Parameters:

  • appliance_arn (Optional[ApplianceArn], default: None ) –

    The Amazon Resource Name (ARN) of the appliance by which to filter the results.

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

    The maximum number of results to return in a single response.

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

    The token returned by a previous call to retrieve the next page of results.

  • resource_provider_type (Optional[ResourceProviderType], default: None ) –

    The resource provider type by which to filter the results.

Raises:

Source code in docs_src/capo_backup_external/_services/async_backup_external.py
async def list_resource_providers(
    self,
    *,
    config_overrides: Optional[AsyncBackupExternalClientConfig] = None,
    appliance_arn: Optional[
        "capo_backup_external.types.appliance_arn.ApplianceArn"
    ] = None,
    max_results: Optional[int] = None,
    next_token: Optional["capo_backup_external.types.next_token.NextToken"] = None,
    resource_provider_type: Optional[
        "capo_backup_external.types.resource_provider_type.ResourceProviderType"
    ] = None,
) -> "capo_backup_external.types.list_resource_providers_output.ListResourceProvidersOutput":
    """Returns a list of resource providers, optionally filtered by appliance or provider type. Use the pagination token to retrieve additional results.

    Args:
        appliance_arn: The Amazon Resource Name (ARN) of the appliance by which to filter the results.
        max_results: The maximum number of results to return in a single response.
        next_token: The token returned by a previous call to retrieve the next page of results.
        resource_provider_type: The resource provider type by which to filter the results.

    Raises:
        capo_backup_external.errors.access_denied_exception.AccessDeniedException: The request was denied because you do not have permission to perform the requested operation.
        capo_backup_external.errors.conflict_exception.ConflictException: The request conflicts with the current state of the specified resource.
        capo_backup_external.errors.internal_server_exception.InternalServerException: The request failed because of an internal server error.
        capo_backup_external.errors.resource_not_found_exception.ResourceNotFoundException: The specified resource was not found.
        capo_backup_external.errors.throttling_exception.ThrottlingException: The request was denied because the request rate is too high.
        capo_backup_external.errors.validation_exception.ValidationException: The request contains invalid parameters.
        capo_backup_external.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_backup_external.types.list_resource_providers_input.ListResourceProvidersInput]",
    ) -> AsyncOperationResponse[
        "capo_backup_external.types.list_resource_providers_output.ListResourceProvidersOutput"
    ]:
        import capo_backup_external._operations.backup_external.list_resource_providers

        (
            output,
            http_response,
        ) = await capo_backup_external._operations.backup_external.list_resource_providers.async_list_resource_providers(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListResourceProviders")
    )
    input_: capo_backup_external.types.list_resource_providers_input.ListResourceProvidersInput = {}
    if appliance_arn is not None:
        input_["appliance_arn"] = appliance_arn
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if resource_provider_type is not None:
        input_["resource_provider_type"] = resource_provider_type

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