{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-managed-apache-flink/json-schema/amazon-managed-apache-flink-import-snapshot-request-schema.json",
  "title": "ImportSnapshotRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-managed-apache-flink-snapshot-api-openapi.yml#/components/schemas/ImportSnapshotRequest",
  "type": "object",
  "properties": {
    "SnapshotName": {
      "type": "string",
      "description": "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": {
      "$ref": "#/$defs/ImportSourceConfiguration"
    },
    "DestinationEncryptionConfiguration": {
      "$ref": "#/$defs/SnapshotEncryptionConfiguration"
    },
    "SnapshotDescription": {
      "type": "string",
      "description": "A summary description of the snapshot."
    },
    "SnapshotFormat": {
      "type": "string",
      "enum": [
        "CANONICAL"
      ],
      "description": "The format of the snapshot being imported."
    },
    "Tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "description": "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."
    }
  },
  "required": [
    "SnapshotName",
    "ImportSourceConfiguration"
  ],
  "$defs": {
    "ImportSourceConfiguration": {
      "type": "object",
      "properties": {
        "SourceType": {
          "type": "string",
          "enum": [
            "S3"
          ],
          "description": "The type of the source location. The only supported value is S3."
        },
        "ImportRoleArn": {
          "type": "string",
          "description": "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": {
          "$ref": "#/$defs/SnapshotEncryptionConfiguration"
        },
        "SourceS3PrefixLocation": {
          "$ref": "#/$defs/S3PrefixLocation"
        }
      },
      "required": [
        "SourceType",
        "ImportRoleArn",
        "SourceS3PrefixLocation"
      ]
    },
    "S3PrefixLocation": {
      "type": "object",
      "properties": {
        "BucketARN": {
          "type": "string",
          "description": "The ARN of the Amazon S3 bucket."
        },
        "KeyPrefix": {
          "type": "string",
          "description": "The key prefix in the Amazon S3 bucket."
        }
      },
      "required": [
        "BucketARN",
        "KeyPrefix"
      ]
    },
    "SnapshotEncryptionConfiguration": {
      "type": "object",
      "properties": {
        "KeyId": {
          "type": "string",
          "description": "The KMS key used for encryption. KeyId is used only when KeyType is CUSTOMER_MANAGED_KEY."
        },
        "KeyType": {
          "type": "string",
          "enum": [
            "AWS_OWNED_KEY",
            "CUSTOMER_MANAGED_KEY"
          ],
          "description": "Specifies the type of key used for encryption."
        }
      },
      "required": [
        "KeyType"
      ]
    },
    "Tag": {
      "type": "object",
      "properties": {
        "Key": {
          "type": "string",
          "description": "The key of the key-value tag."
        },
        "Value": {
          "type": "string",
          "description": "The value of the key-value tag. The value is optional."
        }
      },
      "required": [
        "Key"
      ]
    }
  }
}