Skip to content

export_snapshot

export_snapshot(
    snapshot_name: SnapshotV2Name,
    export_destination_configuration: ExportDestinationConfiguration,
    *,
    config_overrides: Optional[KinesisAnalyticsV2ClientConfig] = None,
) -> ExportSnapshotResponse

Exports the data of an enhanced snapshot to an Amazon S3 location. Managed Service for Apache Flink assumes the IAM role that you specify in ExportDestinationConfiguration to write the snapshot data. The snapshot must be in the READY status.

This operation is asynchronous. To track the progress of the export, use DescribeSnapshotOperation.

A snapshot can have only one export in progress at a time. If an export of the snapshot is already in progress, LimitExceededException is returned.

For more information, see Import and export.

Parameters:

  • snapshot_name (SnapshotV2Name) –

    The name of the enhanced snapshot to export.

  • export_destination_configuration (ExportDestinationConfiguration) –

    Describes the location, IAM role, and encryption configuration of the export destination.

Raises:

Source code in docs_src/capo_kinesis_analytics_v2/_services/kinesis_analytics_v2.py
def export_snapshot(
    self,
    snapshot_name: "capo_kinesis_analytics_v2.types.snapshot_v2_name.SnapshotV2Name",
    export_destination_configuration: "capo_kinesis_analytics_v2.types.export_destination_configuration.ExportDestinationConfiguration",
    *,
    config_overrides: Optional[KinesisAnalyticsV2ClientConfig] = None,
) -> "capo_kinesis_analytics_v2.types.export_snapshot_response.ExportSnapshotResponse":
    """<p>Exports the data of an enhanced snapshot to an Amazon S3 location. Managed Service for Apache Flink assumes the IAM role that you specify in <code>ExportDestinationConfiguration</code> to write the snapshot data. The snapshot must be in the <code>READY</code> status.</p> <p>This operation is asynchronous. To track the progress of the export, use <code>DescribeSnapshotOperation</code>.</p> <p>A snapshot can have only one export in progress at a time. If an export of the snapshot is already in progress, <code>LimitExceededException</code> is returned.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/managed-flink/latest/java/snapshots-import-export.html">Import and export</a>.</p>

    Args:
        snapshot_name: <p>The name of the enhanced snapshot to export.</p>
        export_destination_configuration: <p>Describes the location, IAM role, and encryption configuration of the export destination.</p>

    Raises:
        capo_kinesis_analytics_v2.errors.concurrent_modification_exception.ConcurrentModificationException: <p>Exception thrown as a result of concurrent modifications to an application or snapshot. This error can be the result of attempting to modify an application without using the current application ID.</p>
        capo_kinesis_analytics_v2.errors.invalid_argument_exception.InvalidArgumentException: <p>The specified input parameter value is not valid.</p>
        capo_kinesis_analytics_v2.errors.limit_exceeded_exception.LimitExceededException: <p>The number of allowed resources has been exceeded.</p>
        capo_kinesis_analytics_v2.errors.resource_in_use_exception.ResourceInUseException: <p>The application or snapshot is not available for this operation.</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.
    """

    def _handler(
        req: "OperationRequest[capo_kinesis_analytics_v2.types.export_snapshot_request.ExportSnapshotRequest]",
    ) -> OperationResponse[
        "capo_kinesis_analytics_v2.types.export_snapshot_response.ExportSnapshotResponse"
    ]:
        import capo_kinesis_analytics_v2._operations.kinesis_analytics_20180523.export_snapshot

        output, http_response = (
            capo_kinesis_analytics_v2._operations.kinesis_analytics_20180523.export_snapshot.export_snapshot(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ExportSnapshot")
    )
    input_: capo_kinesis_analytics_v2.types.export_snapshot_request.ExportSnapshotRequest = {
        "snapshot_name": snapshot_name,
        "export_destination_configuration": export_destination_configuration,
    }

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