{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aws-backup/json-schema/aws-backup-create-backup-plan-input-schema.json",
  "title": "CreateBackupPlanInput",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aws-backup-backup-plans-api-openapi.yml#/components/schemas/CreateBackupPlanInput",
  "type": "object",
  "properties": {
    "BackupPlan": {
      "$ref": "#/$defs/BackupPlanInput"
    },
    "BackupPlanTags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "The tags to assign to the backup plan."
    },
    "CreatorRequestId": {
      "type": "string",
      "description": "Identifies the request and allows failed requests to be retried without the risk of running the operation twice. If the request includes a CreatorRequestId that matches an existing backup plan, that plan is returned. This parameter is optional. If used, this parameter must contain 1 to 50 alphanumeric or '-_.' characters."
    }
  },
  "required": [
    "BackupPlan"
  ],
  "$defs": {
    "AdvancedBackupSetting": {
      "type": "object",
      "properties": {
        "ResourceType": {
          "type": "string",
          "description": "Specifies an object containing resource type and backup options. The only supported resource type is Amazon EC2 instances with Windows Volume Shadow Copy Service (VSS). For a CloudFormation example, see the sample CloudFormation template to enable Windows VSS in the Backup User Guide. Valid values: EC2."
        },
        "BackupOptions": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Specifies the backup option for a selected resource. This option is available for Windows VSS backup jobs and S3 backups. Valid values: Set to \"WindowsVSS\":\"enabled\" to enable the WindowsVSS backup option and create a Windows VSS backup. Set to \"WindowsVSS\":\"disabled\" to create a regular backup. The WindowsVSS option is not enabled by default. For S3 backups, set to \"BackupACLs\":\"disabled\" to exclude ACLs from the backup, or \"BackupObjectTags\":\"disabled\" to exclude object tags from the backup. By default, both ACLs and object tags are included in S3 backups. If you specify an invalid option, y"
        }
      }
    },
    "BackupPlanInput": {
      "type": "object",
      "properties": {
        "BackupPlanName": {
          "type": "string",
          "description": "The display name of a backup plan. Must contain 1 to 50 alphanumeric or '-_.' characters."
        },
        "Rules": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BackupRuleInput"
          },
          "description": "An array of BackupRule objects, each of which specifies a scheduled task that is used to back up a selection of resources."
        },
        "AdvancedBackupSettings": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AdvancedBackupSetting"
          },
          "description": "Specifies a list of BackupOptions for each resource type. These settings are only available for Windows Volume Shadow Copy Service (VSS) backup jobs."
        },
        "ScanSettings": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ScanSetting"
          },
          "description": "Contains your scanning configuration for the backup rule and includes the malware scanner, and scan mode of either full or incremental."
        }
      },
      "required": [
        "BackupPlanName",
        "Rules"
      ]
    },
    "BackupRuleInput": {
      "type": "object",
      "properties": {
        "RuleName": {
          "type": "string",
          "description": "A display name for a backup rule. Must contain 1 to 50 alphanumeric or '-_.' characters."
        },
        "TargetBackupVaultName": {
          "type": "string",
          "description": "The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the Amazon Web Services Region where they are created."
        },
        "TargetLogicallyAirGappedBackupVaultArn": {
          "type": "string",
          "description": "The ARN of a logically air-gapped vault. ARN must be in the same account and Region. If provided, supported fully managed resources back up directly to logically air-gapped vault, while other supported resources create a temporary (billable) snapshot in backup vault, then copy it to logically air-gapped vault. Unsupported resources only back up to the specified backup vault."
        },
        "ScheduleExpression": {
          "type": "string",
          "description": "A CRON expression in UTC specifying when Backup initiates a backup job. When no CRON expression is provided, Backup will use the default expression cron(0 5 ? * * *)."
        },
        "StartWindowMinutes": {
          "type": "integer",
          "description": "A value in minutes after a backup is scheduled before a job will be canceled if it doesn't start successfully. This value is optional. If this value is included, it must be at least 60 minutes to avoid errors. This parameter has a maximum value of 100 years (52,560,000 minutes). During the start window, the backup job status remains in CREATED status until it has successfully begun or until the start window time has run out. If within the start window time Backup receives an error that allows the job to be retried, Backup will automatically retry to begin the job at least every 10 minutes unti"
        },
        "CompletionWindowMinutes": {
          "type": "integer",
          "description": "A value in minutes after a backup job is successfully started before it must be completed or it will be canceled by Backup. This value is optional."
        },
        "Lifecycle": {
          "$ref": "#/$defs/Lifecycle"
        },
        "RecoveryPointTags": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "The tags to assign to the resources."
        },
        "CopyActions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CopyAction"
          },
          "description": "An array of CopyAction objects, which contains the details of the copy operation."
        },
        "EnableContinuousBackup": {
          "type": "boolean",
          "description": "Specifies whether Backup creates continuous backups. True causes Backup to create continuous backups capable of point-in-time restore (PITR). False (or not specified) causes Backup to create snapshot backups."
        },
        "ScheduleExpressionTimezone": {
          "type": "string",
          "description": "The timezone in which the schedule expression is set. By default, ScheduleExpressions are in UTC. You can modify this to a specified timezone."
        },
        "IndexActions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/IndexAction"
          },
          "description": "There can up to one IndexAction in each BackupRule, as each backup can have 0 or 1 backup index associated with it. Within the array is ResourceTypes. Only 1 resource type will be accepted for each BackupRule. Valid values: EBS for Amazon Elastic Block Store S3 for Amazon Simple Storage Service (Amazon S3)"
        },
        "ScanActions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ScanAction"
          },
          "description": "Contains your scanning configuration for the backup rule and includes the malware scanner, and scan mode of either full or incremental."
        }
      },
      "required": [
        "RuleName",
        "TargetBackupVaultName"
      ]
    },
    "CopyAction": {
      "type": "object",
      "properties": {
        "Lifecycle": {
          "$ref": "#/$defs/Lifecycle"
        },
        "DestinationBackupVaultArn": {
          "type": "string",
          "description": "An Amazon Resource Name (ARN) that uniquely identifies the destination backup vault for the copied backup. For example, arn:aws:backup:us-east-1:123456789012:backup-vault:aBackupVault."
        }
      },
      "required": [
        "DestinationBackupVaultArn"
      ]
    },
    "IndexAction": {
      "type": "object",
      "properties": {
        "ResourceTypes": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "0 or 1 index action will be accepted for each BackupRule. Valid values: EBS for Amazon Elastic Block Store S3 for Amazon Simple Storage Service (Amazon S3)"
        }
      }
    },
    "Lifecycle": {
      "type": "object",
      "properties": {
        "MoveToColdStorageAfterDays": {
          "type": "integer",
          "description": "The number of days after creation that a recovery point is moved to cold storage."
        },
        "DeleteAfterDays": {
          "type": "integer",
          "description": "The number of days after creation that a recovery point is deleted. This value must be at least 90 days after the number of days specified in MoveToColdStorageAfterDays."
        },
        "OptInToArchiveForSupportedResources": {
          "type": "boolean",
          "description": "If the value is true, your backup plan transitions supported resources to archive (cold) storage tier in accordance with your lifecycle settings."
        },
        "DeleteAfterEvent": {
          "type": "string",
          "enum": [
            "DELETE_AFTER_COPY"
          ],
          "description": "The event after which a recovery point is deleted. A recovery point with both DeleteAfterDays and DeleteAfterEvent will delete after whichever condition is satisfied first. Not valid as an input."
        }
      }
    },
    "ScanAction": {
      "type": "object",
      "properties": {
        "MalwareScanner": {
          "type": "string",
          "enum": [
            "GUARDDUTY"
          ],
          "description": "The malware scanner to use for the scan action. Currently only GUARDDUTY is supported."
        },
        "ScanMode": {
          "type": "string",
          "enum": [
            "FULL_SCAN",
            "INCREMENTAL_SCAN"
          ],
          "description": "The scanning mode to use for the scan action. Valid values: FULL_SCAN | INCREMENTAL_SCAN."
        }
      }
    },
    "ScanSetting": {
      "type": "object",
      "properties": {
        "MalwareScanner": {
          "type": "string",
          "enum": [
            "GUARDDUTY"
          ],
          "description": "The malware scanner to use for scanning. Currently only GUARDDUTY is supported."
        },
        "ResourceTypes": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "An array of resource types to be scanned for malware."
        },
        "ScannerRoleArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the IAM role that the scanner uses to access resources; for example, arn:aws:iam::123456789012:role/ScannerRole."
        }
      }
    }
  }
}