Skip to content

list_recovery_points_by_resource

list_recovery_points_by_resource(
    resource_arn: ARN,
    *,
    config_overrides: Optional[BackupClientConfig] = None,
    next_token: Optional[string] = None,
    max_results: Optional[MaxResults] = None,
    managed_by_aws_backup_only: Optional[Boolean2] = None,
) -> ListRecoveryPointsByResourceOutput

The information about the recovery points of the type specified by a resource Amazon Resource Name (ARN).

For Amazon EFS and Amazon EC2, this action only lists recovery points created by Backup.

Parameters:

  • resource_arn (ARN) –

    An ARN that uniquely identifies a resource. The format of the ARN depends on the resource type.

  • 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.

    Amazon RDS requires a value of at least 20.

  • managed_by_aws_backup_only (Optional[Boolean2], default: None ) –

    This attribute filters recovery points based on ownership.

    If this is set to TRUE, the response will contain recovery points associated with the selected resources that are managed by Backup.

    If this is set to FALSE, the response will contain all recovery points associated with the selected resource, except for EBS snapshots copied within the same Region and account.

    Type: Boolean

Raises:

Source code in docs_src/capo_backup/_services/backup.py
def list_recovery_points_by_resource(
    self,
    resource_arn: "capo_backup.types.arn.ARN",
    *,
    config_overrides: Optional[BackupClientConfig] = None,
    next_token: Optional["capo_backup.types.string.string"] = None,
    max_results: Optional["capo_backup.types.max_results.MaxResults"] = None,
    managed_by_aws_backup_only: Optional[
        "capo_backup.types.boolean2.Boolean2"
    ] = None,
) -> "capo_backup.types.list_recovery_points_by_resource_output.ListRecoveryPointsByResourceOutput":
    """<p>The information about the recovery points of the type specified by a resource Amazon Resource Name (ARN).</p> <note> <p>For Amazon EFS and Amazon EC2, this action only lists recovery points created by Backup.</p> </note>

    Args:
        resource_arn: <p>An ARN that uniquely identifies a resource. The format of the ARN depends on the resource type.</p>
        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> <note> <p>Amazon RDS requires a value of at least 20.</p> </note>
        managed_by_aws_backup_only: <p>This attribute filters recovery points based on ownership.</p> <p>If this is set to <code>TRUE</code>, the response will contain recovery points associated with the selected resources that are managed by Backup.</p> <p>If this is set to <code>FALSE</code>, the response will contain all recovery points associated with the selected resource, except for EBS snapshots copied within the same Region and account.</p> <p>Type: Boolean</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.missing_parameter_value_exception.MissingParameterValueException: <p>Indicates that a required parameter is missing.</p>
        capo_backup.errors.resource_not_found_exception.ResourceNotFoundException: <p>A resource that is required for the action doesn't exist.</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.
    """

    def _handler(
        req: "OperationRequest[capo_backup.types.list_recovery_points_by_resource_input.ListRecoveryPointsByResourceInput]",
    ) -> OperationResponse[
        "capo_backup.types.list_recovery_points_by_resource_output.ListRecoveryPointsByResourceOutput"
    ]:
        import capo_backup._operations.cryo_controller_user_manager.list_recovery_points_by_resource

        output, http_response = (
            capo_backup._operations.cryo_controller_user_manager.list_recovery_points_by_resource.list_recovery_points_by_resource(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListRecoveryPointsByResource")
    )
    input_: capo_backup.types.list_recovery_points_by_resource_input.ListRecoveryPointsByResourceInput = {
        "resource_arn": resource_arn
    }
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results
    if managed_by_aws_backup_only is not None:
        input_["managed_by_aws_backup_only"] = managed_by_aws_backup_only

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output