{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-timestream/json-schema/amazon-timestream-restore-from-db-backup-input-schema.json",
  "title": "RestoreFromDbBackupInput",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-timestream-operations-api-openapi.yml#/components/schemas/RestoreFromDbBackupInput",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the new resource to create from the restore. If restoring to an existing resource, the name must match the existing resource name."
    },
    "dbBackupId": {
      "type": "string",
      "description": "The identifier of the backup to restore from."
    },
    "restoreToTime": {
      "type": "string",
      "description": "The point in time to restore to, for continuous backups. Must be within the backup's retention window."
    },
    "restoreMode": {
      "type": "string",
      "enum": [
        "NEW_RESOURCE",
        "REPLACE_EXISTING"
      ],
      "description": "Specifies whether to restore to a new resource or replace the existing resource. Valid values are NEW_RESOURCE (default) and REPLACE_EXISTING."
    },
    "vpcSubnetIds": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "A list of VPC subnet IDs for the restored resource. If not specified, the restored resource uses the same subnets as the backup."
    },
    "vpcSecurityGroupIds": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "A list of VPC security group IDs for the restored resource. If not specified, the restored resource uses the same security groups as the backup."
    },
    "publiclyAccessible": {
      "type": "boolean",
      "description": "Specifies whether the restored resource is publicly accessible."
    },
    "logDeliveryConfiguration": {
      "$ref": "#/$defs/LogDeliveryConfiguration"
    },
    "maintenanceSchedule": {
      "$ref": "#/$defs/MaintenanceSchedule"
    },
    "tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "A list of key-value pairs to associate with the restored resource."
    },
    "port": {
      "type": "integer",
      "description": "The port number on which the restored InfluxDB resource accepts connections."
    },
    "networkType": {
      "type": "string",
      "enum": [
        "IPV4",
        "DUAL"
      ],
      "description": "Specifies the network type of the restored resource. Valid values are IPV4 and DUAL."
    },
    "deploymentType": {
      "type": "string",
      "enum": [
        "SINGLE_AZ",
        "WITH_MULTIAZ_STANDBY",
        "MULTI_NODE_READ_REPLICAS"
      ],
      "description": "Specifies the deployment type of the restored resource. Valid values are SINGLE_AZ, WITH_MULTIAZ_STANDBY, and MULTI_NODE_READ_REPLICAS."
    },
    "dbBackupConfigurations": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/DbBackupConfiguration"
      },
      "description": "A list of backup configurations to apply to the restored resource."
    },
    "kmsKeyId": {
      "type": "string",
      "description": "The Amazon Web Services KMS key identifier to use for encryption of the restored resource. Can be a key ID, key ARN, alias name, or alias ARN."
    }
  },
  "required": [
    "name",
    "dbBackupId"
  ],
  "$defs": {
    "DbBackupConfiguration": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "HOURLY",
            "DAILY",
            "WEEKLY",
            "MONTHLY",
            "CUSTOM_SCHEDULE",
            "CONTINUOUS"
          ],
          "description": "The type of automated backup schedule. Valid values are HOURLY, DAILY, WEEKLY, MONTHLY, CUSTOM_SCHEDULE, and CONTINUOUS."
        },
        "retentionDays": {
          "type": "integer",
          "description": "The number of days to retain automated backups. Valid values are 1 to 365."
        },
        "enabled": {
          "type": "boolean",
          "description": "Specifies whether this backup configuration is enabled."
        },
        "customSchedule": {
          "type": "string",
          "description": "A custom cron schedule expression for the backup. Required when type is CUSTOM_SCHEDULE."
        }
      },
      "required": [
        "type",
        "retentionDays",
        "enabled"
      ]
    },
    "LogDeliveryConfiguration": {
      "type": "object",
      "properties": {
        "s3Configuration": {
          "$ref": "#/$defs/TimestreamInfluxdbS3Configuration"
        }
      },
      "required": [
        "s3Configuration"
      ]
    },
    "MaintenanceSchedule": {
      "type": "object",
      "properties": {
        "timezone": {
          "type": "string",
          "description": "The IANA timezone identifier for the maintenance window. Format: Region/City or UTC. For example, America/New_York or UTC."
        },
        "preferredMaintenanceWindow": {
          "type": "string",
          "description": "The preferred maintenance window in the format ddd:HH:MM-ddd:HH:MM (UTC). Day must be one of: Mon, Tue, Wed, Thu, Fri, Sat, Sun. For example, Sun:02:00-Sun:06:00. Provide an empty string to let the system choose a window."
        }
      },
      "required": [
        "timezone",
        "preferredMaintenanceWindow"
      ]
    },
    "TimestreamInfluxdbS3Configuration": {
      "type": "object",
      "properties": {
        "bucketName": {
          "type": "string",
          "description": "The name of the S3 bucket to deliver logs to."
        },
        "enabled": {
          "type": "boolean",
          "description": "Indicates whether log delivery to the S3 bucket is enabled."
        }
      },
      "required": [
        "bucketName",
        "enabled"
      ]
    }
  }
}