Skip to content

list_protected_resources async

list_protected_resources(
    *,
    config_overrides: Optional[AsyncBackupClientConfig] = None,
    next_token: Optional[string] = None,
    max_results: Optional[MaxResults] = None,
) -> ListProtectedResourcesOutput

Returns an array of resources with recovery points created by Backup (regardless of the recovery point's status), including the time the resource was saved, an Amazon Resource Name (ARN) of the resource, and a resource type.

Parameters:

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

    The next item following a partial list of returned items. For example, if a request is made to return MaxResults number of items, NextToken allows you to return more items in your list starting at the location pointed to by the next token.

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

    The maximum number of items to be returned.

Raises:

Source code in docs_src/capo_backup/_services/async_backup.py
async def list_protected_resources(
    self,
    *,
    config_overrides: Optional[AsyncBackupClientConfig] = None,
    next_token: Optional["capo_backup.types.string.string"] = None,
    max_results: Optional["capo_backup.types.max_results.MaxResults"] = None,
) -> (
    "capo_backup.types.list_protected_resources_output.ListProtectedResourcesOutput"
):
    """<p>Returns an array of resources with recovery points created by Backup (regardless of the recovery point's <a href="https://docs.aws.amazon.com/aws-backup/latest/devguide/API_DescribeRecoveryPoint.html#Backup-DescribeRecoveryPoint-response-Status">status</a>), including the time the resource was saved, an Amazon Resource Name (ARN) of the resource, and a resource type.</p>

    Args:
        next_token: <p>The next item following a partial list of returned items. For example, if a request is made to return <code>MaxResults</code> number of items, <code>NextToken</code> allows you to return more items in your list starting at the location pointed to by the next token.</p>
        max_results: <p>The maximum number of items to be returned.</p>

    Raises:
        capo_backup.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
        capo_backup.errors.service_unavailable_exception.ServiceUnavailableException: <p>The request failed due to a temporary failure of the server.</p>
        capo_backup.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_backup.types.list_protected_resources_input.ListProtectedResourcesInput]",
    ) -> AsyncOperationResponse[
        "capo_backup.types.list_protected_resources_output.ListProtectedResourcesOutput"
    ]:
        import capo_backup._operations.cryo_controller_user_manager.list_protected_resources

        (
            output,
            http_response,
        ) = await capo_backup._operations.cryo_controller_user_manager.list_protected_resources.async_list_protected_resources(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListProtectedResources")
    )
    input_: capo_backup.types.list_protected_resources_input.ListProtectedResourcesInput = {}
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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