KinesisAnalyticsV2 / Client / export_snapshot

export_snapshot

KinesisAnalyticsV2.Client.export_snapshot(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.export_snapshot(
    SnapshotName='string',
    ExportDestinationConfiguration={
        'DestinationType': 'S3',
        'ExportRoleArn': 'string',
        'DestinationEncryptionConfiguration': {
            'KeyId': 'string',
            'KeyType': 'AWS_OWNED_KEY'|'CUSTOMER_MANAGED_KEY'
        },
        'DestinationS3PrefixLocation': {
            'BucketARN': 'string',
            'KeyPrefix': 'string'
        }
    }
)
Parameters:
  • SnapshotName (string) –

    [REQUIRED]

    The name of the enhanced snapshot to export.

  • ExportDestinationConfiguration (dict) –

    [REQUIRED]

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

    • DestinationType (string) – [REQUIRED]

      The type of the destination location. The only supported value is S3.

    • ExportRoleArn (string) – [REQUIRED]

      The ARN of the IAM role that Managed Service for Apache Flink assumes to write the snapshot data to the destination location. For information about the permissions that this role requires, see Import and export.

    • DestinationEncryptionConfiguration (dict) –

      The encryption configuration of the exported snapshot data. If you don’t specify this parameter, Managed Service for Apache Flink uses a key of type AWS_OWNED_KEY. If you specify a KMS key, you must specify the key ARN.

      • KeyId (string) –

        The KMS key used for encryption. KeyId is used only when KeyType is CUSTOMER_MANAGED_KEY.

      • KeyType (string) – [REQUIRED]

        Specifies the type of key used for encryption.

    • DestinationS3PrefixLocation (dict) – [REQUIRED]

      The Amazon S3 bucket and key prefix to export the snapshot data to. Managed Service for Apache Flink writes the data under a unique prefix that it appends to the key prefix that you specify. After the export completes, use DescribeSnapshotOperation to get the full prefix. The bucket must be owned by your account and must be in the same Region as the request.

      • BucketARN (string) – [REQUIRED]

        The ARN of the Amazon S3 bucket.

      • KeyPrefix (string) – [REQUIRED]

        The key prefix in the Amazon S3 bucket.

Return type:

dict

Returns:

Response Syntax

{
    'SnapshotOperationId': 'string',
    'SnapshotOperationStatus': 'IN_PROGRESS'|'SUCCESSFUL'|'FAILED'|'CANCELLED'
}

Response Structure

  • (dict) –

    • SnapshotOperationId (string) –

      The ID of the snapshot operation. You can use this value with DescribeSnapshotOperation to track the progress of the export.

    • SnapshotOperationStatus (string) –

      The status of the snapshot operation.

Exceptions