Skip to content

list_snapshot_operations async

list_snapshot_operations(
    snapshot_name: SnapshotV2Name,
    *,
    config_overrides: Optional[AsyncKinesisAnalyticsV2ClientConfig] = None,
    snapshot_operation: Optional[SnapshotOperation] = None,
    snapshot_operation_status: Optional[SnapshotOperationStatus] = None,
    limit: Optional[ListSnapshotOperationsLimit] = None,
    next_token: Optional[NextToken] = None,
) -> ListSnapshotOperationsResponse

Lists the operations that were performed on the specified enhanced snapshot, such as CreateSnapshot, ImportSnapshot, and ExportSnapshot. The response includes a summary of each operation.

You can specify only one of the SnapshotOperation or SnapshotOperationStatus filters in a request. If you specify both, InvalidArgumentException is returned.

To get the complete description of a specific operation, use DescribeSnapshotOperation. Snapshot operations are available for 90 days after they are created.

Parameters:

Raises:

Source code in docs_src/capo_kinesis_analytics_v2/_services/async_kinesis_analytics_v2.py
async def list_snapshot_operations(
    self,
    snapshot_name: "capo_kinesis_analytics_v2.types.snapshot_v2_name.SnapshotV2Name",
    *,
    config_overrides: Optional[AsyncKinesisAnalyticsV2ClientConfig] = None,
    snapshot_operation: Optional[
        "capo_kinesis_analytics_v2.types.snapshot_operation.SnapshotOperation"
    ] = None,
    snapshot_operation_status: Optional[
        "capo_kinesis_analytics_v2.types.snapshot_operation_status.SnapshotOperationStatus"
    ] = None,
    limit: Optional[
        "capo_kinesis_analytics_v2.types.list_snapshot_operations_limit.ListSnapshotOperationsLimit"
    ] = None,
    next_token: Optional[
        "capo_kinesis_analytics_v2.types.next_token.NextToken"
    ] = None,
) -> "capo_kinesis_analytics_v2.types.list_snapshot_operations_response.ListSnapshotOperationsResponse":
    """<p>Lists the operations that were performed on the specified enhanced snapshot, such as <code>CreateSnapshot</code>, <code>ImportSnapshot</code>, and <code>ExportSnapshot</code>. The response includes a summary of each operation.</p> <p>You can specify only one of the <code>SnapshotOperation</code> or <code>SnapshotOperationStatus</code> filters in a request. If you specify both, <code>InvalidArgumentException</code> is returned.</p> <p>To get the complete description of a specific operation, use <code>DescribeSnapshotOperation</code>. Snapshot operations are available for 90 days after they are created.</p>

    Args:
        snapshot_name: <p>The name of the enhanced snapshot.</p>
        snapshot_operation: <p>Use this parameter to list only the operations of the specified type.</p>
        snapshot_operation_status: <p>Use this parameter to list only the operations with the specified status.</p>
        limit: <p>The maximum number of snapshot operations to list.</p>

    Raises:
        capo_kinesis_analytics_v2.errors.invalid_argument_exception.InvalidArgumentException: <p>The specified input parameter value is not valid.</p>
        capo_kinesis_analytics_v2.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified application, snapshot, or snapshot operation can't be found.</p>
        capo_kinesis_analytics_v2.errors.unsupported_operation_exception.UnsupportedOperationException: <p>The request was rejected because a specified parameter is not supported or a specified resource is not valid for this operation. </p>
        capo_kinesis_analytics_v2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_kinesis_analytics_v2.types.list_snapshot_operations_request.ListSnapshotOperationsRequest]",
    ) -> AsyncOperationResponse[
        "capo_kinesis_analytics_v2.types.list_snapshot_operations_response.ListSnapshotOperationsResponse"
    ]:
        import capo_kinesis_analytics_v2._operations.kinesis_analytics_20180523.list_snapshot_operations

        (
            output,
            http_response,
        ) = await capo_kinesis_analytics_v2._operations.kinesis_analytics_20180523.list_snapshot_operations.async_list_snapshot_operations(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListSnapshotOperations")
    )
    input_: capo_kinesis_analytics_v2.types.list_snapshot_operations_request.ListSnapshotOperationsRequest = {
        "snapshot_name": snapshot_name
    }
    if snapshot_operation is not None:
        input_["snapshot_operation"] = snapshot_operation
    if snapshot_operation_status is not None:
        input_["snapshot_operation_status"] = snapshot_operation_status
    if limit is not None:
        input_["limit"] = limit
    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