KinesisAnalyticsV2 / Client / import_snapshot

import_snapshot

KinesisAnalyticsV2.Client.import_snapshot(**kwargs)

Imports an Apache Flink savepoint from an Amazon S3 location as an enhanced snapshot. Managed Service for Apache Flink assumes the IAM role that you specify in ImportSourceConfiguration to read the savepoint data.

This operation is asynchronous. The response returns the snapshot ARN with the CREATING status. To track the progress of the import, use DescribeSnapshotOperation.

For more information, see Import and export.

See also: AWS API Documentation

Request Syntax

response = client.import_snapshot(
    SnapshotName='string',
    ImportSourceConfiguration={
        'SourceType': 'S3',
        'ImportRoleArn': 'string',
        'SourceEncryptionConfiguration': {
            'KeyId': 'string',
            'KeyType': 'AWS_OWNED_KEY'|'CUSTOMER_MANAGED_KEY'
        },
        'SourceS3PrefixLocation': {
            'BucketARN': 'string',
            'KeyPrefix': 'string'
        }
    },
    DestinationEncryptionConfiguration={
        'KeyId': 'string',
        'KeyType': 'AWS_OWNED_KEY'|'CUSTOMER_MANAGED_KEY'
    },
    SnapshotDescription='string',
    SnapshotFormat='CANONICAL',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters:
  • SnapshotName (string) –

    [REQUIRED]

    The name of the enhanced snapshot. The name must be unique among the snapshots in your account and Region. You can’t reuse the name of an existing snapshot, including a snapshot in the FAILED status, until you delete that snapshot. Names that begin with SYSTEMSNAPSHOT are reserved.

  • ImportSourceConfiguration (dict) –

    [REQUIRED]

    Describes the location, IAM role, and encryption configuration of the savepoint data to import.

    • SourceType (string) – [REQUIRED]

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

    • ImportRoleArn (string) – [REQUIRED]

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

    • SourceEncryptionConfiguration (dict) –

      The encryption configuration of the savepoint data at the source location. 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.

    • SourceS3PrefixLocation (dict) – [REQUIRED]

      The Amazon S3 bucket and key prefix that contain the savepoint data to import. 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.

  • DestinationEncryptionConfiguration (dict) –

    The encryption configuration of the imported snapshot. If you don’t specify this parameter, the snapshot is encrypted using 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.

  • SnapshotDescription (string) – A summary description of the snapshot.

  • SnapshotFormat (string) – The format of the snapshot being imported.

  • Tags (list) –

    A list of one or more tags to assign to the snapshot. A tag is a key-value pair that identifies a snapshot. For more information, see Using Tagging.

    • (dict) –

      A key-value pair (the value is optional) that you can define and assign to Amazon resources. If you specify a tag that already exists, the tag value is replaced with the value that you specify in the request. Note that the maximum number of application tags includes system tags. The maximum number of user-defined application tags is 50. For more information, see Using Tagging.

      • Key (string) – [REQUIRED]

        The key of the key-value tag.

      • Value (string) –

        The value of the key-value tag. The value is optional.

Return type:

dict

Returns:

Response Syntax

{
    'SnapshotArn': 'string',
    'SnapshotStatus': 'CREATING'|'READY'|'DELETING'|'FAILED',
    'SnapshotOperationId': 'string',
    'SnapshotOperationStatus': 'IN_PROGRESS'|'SUCCESSFUL'|'FAILED'|'CANCELLED'
}

Response Structure

  • (dict) –

    • SnapshotArn (string) –

      The ARN of the enhanced snapshot.

    • SnapshotStatus (string) –

      The status of the snapshot. When Managed Service for Apache Flink accepts the request, the status is CREATING.

    • SnapshotOperationId (string) –

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

    • SnapshotOperationStatus (string) –

      The status of the snapshot operation.

Exceptions