Skip to content

describe_fast_snapshot_restores

describe_fast_snapshot_restores(
    *,
    config_overrides: Optional[EC2ClientConfig] = None,
    filters: Optional[FilterList] = None,
    max_results: Optional[DescribeFastSnapshotRestoresMaxResults] = None,
    next_token: Optional[NextToken] = None,
    dry_run: Optional[Boolean] = None,
) -> DescribeFastSnapshotRestoresResult

Describes the state of fast snapshot restores for your snapshots.

Parameters:

  • filters (Optional[FilterList], default: None ) –

    The filters. The possible values are:

    • availability-zone: The Availability Zone of the snapshot. For example, us-east-2a.

    • availability-zone-id: The ID of the Availability Zone of the snapshot. For example, use2-az1.

    • owner-id: The ID of the Amazon Web Services account that enabled fast snapshot restore on the snapshot.

    • snapshot-id: The ID of the snapshot.

    • state: The state of fast snapshot restores for the snapshot (enabling | optimizing | enabled | disabling | disabled).

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

    The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see Pagination.

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

    The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.

  • dry_run (Optional[Boolean], default: None ) –

    Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

Raises:

Source code in docs_src/capo_ec2/_services/ec2.py
def describe_fast_snapshot_restores(
    self,
    *,
    config_overrides: Optional[EC2ClientConfig] = None,
    filters: Optional["capo_ec2.types.filter_list.FilterList"] = None,
    max_results: Optional[
        "capo_ec2.types.describe_fast_snapshot_restores_max_results.DescribeFastSnapshotRestoresMaxResults"
    ] = None,
    next_token: Optional["capo_ec2.types.next_token.NextToken"] = None,
    dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
) -> "capo_ec2.types.describe_fast_snapshot_restores_result.DescribeFastSnapshotRestoresResult":
    """<p>Describes the state of fast snapshot restores for your snapshots.</p>

    Args:
        filters: <p>The filters. The possible values are:</p> <ul> <li> <p> <code>availability-zone</code>: The Availability Zone of the snapshot. For example, <code>us-east-2a</code>.</p> </li> <li> <p> <code>availability-zone-id</code>: The ID of the Availability Zone of the snapshot. For example, <code>use2-az1</code>.</p> </li> <li> <p> <code>owner-id</code>: The ID of the Amazon Web Services account that enabled fast snapshot restore on the snapshot.</p> </li> <li> <p> <code>snapshot-id</code>: The ID of the snapshot.</p> </li> <li> <p> <code>state</code>: The state of fast snapshot restores for the snapshot (<code>enabling</code> | <code>optimizing</code> | <code>enabled</code> | <code>disabling</code> | <code>disabled</code>).</p> </li> </ul>
        max_results: <p>The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination">Pagination</a>.</p>
        next_token: <p>The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.</p>
        dry_run: <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>

    Raises:
        capo_ec2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_ec2.types.describe_fast_snapshot_restores_request.DescribeFastSnapshotRestoresRequest]",
    ) -> OperationResponse[
        "capo_ec2.types.describe_fast_snapshot_restores_result.DescribeFastSnapshotRestoresResult"
    ]:
        import capo_ec2._operations.amazon_ec2.describe_fast_snapshot_restores

        output, http_response = (
            capo_ec2._operations.amazon_ec2.describe_fast_snapshot_restores.describe_fast_snapshot_restores(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeFastSnapshotRestores")
    )
    input_: capo_ec2.types.describe_fast_snapshot_restores_request.DescribeFastSnapshotRestoresRequest = {}
    if filters is not None:
        input_["filters"] = filters
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if dry_run is not None:
        input_["dry_run"] = dry_run

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