Skip to content

describe_recovery_snapshots async

describe_recovery_snapshots(
    source_server_id: SourceServerID,
    *,
    config_overrides: Optional[AsyncdrsClientConfig] = None,
    filters: Optional[DescribeRecoverySnapshotsRequestFilters] = None,
    order: Optional[RecoverySnapshotsOrder] = None,
    max_results: Optional[StrictlyPositiveInteger] = None,
    next_token: Optional[PaginationToken] = None,
) -> DescribeRecoverySnapshotsResponse

Lists all Recovery Snapshots for a single Source Server.

Parameters:

Raises:

Source code in docs_src/capo_drs/_services/async_drs.py
async def describe_recovery_snapshots(
    self,
    source_server_id: "capo_drs.types.source_server_id.SourceServerID",
    *,
    config_overrides: Optional[AsyncdrsClientConfig] = None,
    filters: Optional[
        "capo_drs.types.describe_recovery_snapshots_request_filters.DescribeRecoverySnapshotsRequestFilters"
    ] = None,
    order: Optional[
        "capo_drs.types.recovery_snapshots_order.RecoverySnapshotsOrder"
    ] = None,
    max_results: Optional[
        "capo_drs.types.strictly_positive_integer.StrictlyPositiveInteger"
    ] = None,
    next_token: Optional["capo_drs.types.pagination_token.PaginationToken"] = None,
) -> "capo_drs.types.describe_recovery_snapshots_response.DescribeRecoverySnapshotsResponse":
    """<p>Lists all Recovery Snapshots for a single Source Server.</p>

    Args:
        source_server_id: <p>Filter Recovery Snapshots by Source Server ID.</p>
        filters: <p>A set of filters by which to return Recovery Snapshots.</p>
        order: <p>The sorted ordering by which to return Recovery Snapshots.</p>
        max_results: <p>Maximum number of Recovery Snapshots to retrieve.</p>
        next_token: <p>The token of the next Recovery Snapshot to retrieve.</p>

    Raises:
        capo_drs.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_drs.errors.internal_server_exception.InternalServerException: <p>The request processing has failed because of an unknown error, exception or failure.</p>
        capo_drs.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_drs.errors.uninitialized_account_exception.UninitializedAccountException: <p>The account performing the request has not been initialized.</p>
        capo_drs.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the AWS service.</p>
        capo_drs.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_drs.types.describe_recovery_snapshots_request.DescribeRecoverySnapshotsRequest]",
    ) -> AsyncOperationResponse[
        "capo_drs.types.describe_recovery_snapshots_response.DescribeRecoverySnapshotsResponse"
    ]:
        import capo_drs._operations.elastic_disaster_recovery_service.describe_recovery_snapshots

        (
            output,
            http_response,
        ) = await capo_drs._operations.elastic_disaster_recovery_service.describe_recovery_snapshots.async_describe_recovery_snapshots(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeRecoverySnapshots")
    )
    input_: capo_drs.types.describe_recovery_snapshots_request.DescribeRecoverySnapshotsRequest = {
        "source_server_id": source_server_id
    }
    if filters is not None:
        input_["filters"] = filters
    if order is not None:
        input_["order"] = order
    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