{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-ec2/json-schema/amazon-ec2-create-image-request-schema.json",
  "title": "CreateImageRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-ec2-image-api-openapi.yml#/components/schemas/CreateImageRequest",
  "type": "object",
  "properties": {
    "TagSpecifications": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/TagSpecification"
      },
      "description": "The tags to apply to the AMI and snapshots on creation. You can tag the AMI, the snapshots, or both. To tag the AMI, the value for ResourceType must be image. To tag the snapshots that are created of the root volume and of other Amazon EBS volumes that are attached to the instance, the value for ResourceType must be snapshot. The same tag is applied to all of the snapshots that are created. If you specify other values for ResourceType, the request fails. To tag an AMI or snapshot after it has been created, see CreateTags."
    },
    "SnapshotLocation": {
      "type": "string",
      "enum": [
        "regional",
        "local"
      ],
      "description": "Only supported for instances in Local Zones and for instances on Outposts that support local snapshots. If the source instance is not in one of these locations, omit this parameter. The Amazon S3 location where the snapshots will be stored. To create local snapshots in the same Local Zone or on the same Outpost as the source instance, specify local. To create regional snapshots in the parent Region of the Local Zone or Outpost, specify regional. If the source instance is in a Local Zone and you omit this parameter, regional snapshots are created in the parent Region of the Local Zone. If the s"
    },
    "BootModeOverride": {
      "type": "string",
      "enum": [
        "uefi"
      ],
      "description": "The boot mode of the new image, which overrides the default boot mode. By default, if you do not specify this parameter, the new image inherits the boot-mode from the source instance. A value of uefi indicates that the image only supports UEFI boot mode. You can specify this parameter only if the current-instance-boot-mode of the source instance is uefi. To find the boot-mode or current-instance-boot-mode of an instance, see DescribeInstances. The operating system contained in the AMI must be configured to support the specified boot mode. For more information, see Instance launch behavior with"
    },
    "DryRun": {
      "type": "boolean",
      "description": "Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation."
    },
    "InstanceId": {
      "type": "string",
      "description": "The ID of the instance."
    },
    "Name": {
      "type": "string",
      "description": "A name for the new image. Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)"
    },
    "Description": {
      "type": "string",
      "description": "A description for the new image."
    },
    "NoReboot": {
      "type": "boolean",
      "description": "Indicates whether or not the instance should be automatically rebooted before creating the image. Specify one of the following values: true - The instance is not rebooted before creating the image. This creates crash-consistent snapshots that include only the data that has been written to the volumes at the time the snapshots are created. Buffered data and data in memory that has not yet been written to the volumes is not included in the snapshots. false - The instance is rebooted before creating the image. This ensures that all buffered data and data in memory is written to the volumes before"
    },
    "BlockDeviceMappings": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/BlockDeviceMapping"
      },
      "description": "The block device mappings. When using the CreateImage action: You can't change the volume size using the VolumeSize parameter. If you want a different volume size, you must first change the volume size of the source instance. You can't modify the encryption status of existing volumes or snapshots. To create an AMI with volumes or snapshots that have a different encryption status (for example, where the source volume and snapshots are unencrypted, and you want to create an AMI with encrypted volumes or snapshots), copy the image instead. The only option that can be changed for existing mappings"
    }
  },
  "required": [
    "InstanceId",
    "Name"
  ],
  "$defs": {
    "BlockDeviceMapping": {
      "type": "object",
      "properties": {
        "Ebs": {
          "$ref": "#/$defs/EbsBlockDevice"
        },
        "NoDevice": {
          "type": "string",
          "description": "To omit the device from the block device mapping, specify an empty string. When this property is specified, the device is removed from the block device mapping regardless of the assigned value."
        },
        "DeviceName": {
          "type": "string",
          "description": "The device name. For available device names, see Device names for volumes."
        },
        "VirtualName": {
          "type": "string",
          "description": "The virtual device name (ephemeralN). Instance store volumes are numbered starting from 0. An instance type with 2 available instance store volumes can specify mappings for ephemeral0 and ephemeral1. The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume. NVMe instance store volumes are automatically enumerated and assigned a device name. Including them in your block device mapping has no effect. Constraints: For M3 instances, you must specify instance store volumes in the block device mapping for the instance. "
        }
      }
    },
    "EbsBlockDevice": {
      "type": "object",
      "properties": {
        "DeleteOnTermination": {
          "type": "boolean",
          "description": "Indicates whether the EBS volume is deleted on instance termination. For more information, see Preserving Amazon EBS volumes on instance termination in the Amazon EC2 User Guide."
        },
        "Iops": {
          "type": "integer",
          "description": "The number of I/O operations per second (IOPS). For gp3, io1, and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. The following are the supported values for each volume type: gp3: 3,000 - 80,000 IOPS io1: 100 - 64,000 IOPS io2: 100 - 256,000 IOPS For io2 volumes, you can achieve up to 256,000 IOPS on instances built on the Nitro System. On other instances, you can achieve performance up to 32,000 IOPS. This parameter"
        },
        "SnapshotId": {
          "type": "string",
          "description": "The ID of the snapshot."
        },
        "VolumeSize": {
          "type": "integer",
          "description": "The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size. The following are the supported sizes for each volume type: gp2: 1 - 16,384 GiB gp3: 1 - 65,536 GiB io1: 4 - 16,384 GiB io2: 4 - 65,536 GiB st1 and sc1: 125 - 16,384 GiB standard: 1 - 1024 GiB"
        },
        "VolumeType": {
          "type": "string",
          "enum": [
            "standard",
            "io1",
            "io2",
            "gp2",
            "sc1",
            "st1",
            "gp3"
          ],
          "description": "The volume type. For more information, see Amazon EBS volume types in the Amazon EBS User Guide."
        },
        "KmsKeyId": {
          "type": "string",
          "description": "Identifier (key ID, key alias, key ARN, or alias ARN) of the customer managed KMS key to use for EBS encryption. This parameter is only supported on BlockDeviceMapping objects called by RunInstances, RequestSpotFleet, and RequestSpotInstances."
        },
        "Throughput": {
          "type": "integer",
          "description": "The throughput that the volume supports, in MiB/s. This parameter is valid only for gp3 volumes. Valid Range: Minimum value of 125. Maximum value of 2,000."
        },
        "OutpostArn": {
          "type": "string",
          "description": "The ARN of the Outpost on which the snapshot is stored. This parameter is not supported when using CreateImage."
        },
        "AvailabilityZone": {
          "type": "string",
          "description": "The Availability Zone where the EBS volume will be created (for example, us-east-1a). Either AvailabilityZone or AvailabilityZoneId can be specified, but not both. If neither is specified, Amazon EC2 automatically selects an Availability Zone within the Region. This parameter is not supported when using CreateFleet, CreateImage, DescribeImages, RequestSpotFleet, RequestSpotInstances, and RunInstances."
        },
        "Encrypted": {
          "type": "boolean",
          "description": "Indicates whether the encryption state of an EBS volume is changed while being restored from a backing snapshot. The effect of setting the encryption state to true depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see Amazon EBS encryption in the Amazon EBS User Guide. In no case can you remove encryption from an encrypted volume. Encrypted volumes can only be attached to instances that support Amazon EBS encryption. For more information, see Supported instance types. This parameter i"
        },
        "VolumeInitializationRate": {
          "type": "integer",
          "description": "Specifies the Amazon EBS Provisioned Rate for Volume Initialization (volume initialization rate), in MiB/s, at which to download the snapshot blocks from Amazon S3 to the volume. This is also known as volume initialization. Specifying a volume initialization rate ensures that the volume is initialized at a predictable and consistent rate after creation. For more information, see Initialize Amazon EBS volumes in the Amazon EC2 User Guide. This parameter is supported only for volumes created from snapshots. Omit this parameter if: You want to create the volume using fast snapshot restore. You mu"
        },
        "AvailabilityZoneId": {
          "type": "string",
          "description": "The ID of the Availability Zone where the EBS volume will be created (for example, use1-az1). Either AvailabilityZone or AvailabilityZoneId can be specified, but not both. If neither is specified, Amazon EC2 automatically selects an Availability Zone within the Region. This parameter is not supported when using CreateFleet, CreateImage, DescribeImages, RequestSpotFleet, RequestSpotInstances, and RunInstances."
        },
        "EbsCardIndex": {
          "type": "integer",
          "description": "The index of the EBS card. Some instance types support multiple EBS cards. The default EBS card index is 0."
        }
      }
    },
    "Tag": {
      "type": "object",
      "properties": {
        "Key": {
          "type": "string",
          "description": "The key of the tag. Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:."
        },
        "Value": {
          "type": "string",
          "description": "The value of the tag. Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters."
        }
      }
    },
    "TagSpecification": {
      "type": "object",
      "properties": {
        "ResourceType": {
          "type": "string",
          "enum": [
            "capacity-reservation",
            "client-vpn-endpoint",
            "customer-gateway",
            "carrier-gateway",
            "coip-pool",
            "declarative-policies-report",
            "dedicated-host",
            "dhcp-options",
            "egress-only-internet-gateway",
            "elastic-ip",
            "elastic-gpu",
            "export-image-task",
            "export-instance-task",
            "fleet",
            "fpga-image",
            "host-reservation",
            "image",
            "image-usage-report",
            "import-image-task",
            "import-snapshot-task",
            "instance",
            "instance-event-window",
            "internet-gateway",
            "ipam",
            "ipam-pool",
            "ipam-scope",
            "ipv4pool-ec2",
            "ipv6pool-ec2",
            "key-pair",
            "launch-template",
            "local-gateway",
            "local-gateway-route-table",
            "local-gateway-virtual-interface",
            "local-gateway-virtual-interface-group",
            "local-gateway-route-table-vpc-association",
            "local-gateway-route-table-virtual-interface-group-association",
            "natgateway",
            "network-acl",
            "network-interface",
            "network-insights-analysis",
            "network-insights-path",
            "network-insights-access-scope",
            "network-insights-access-scope-analysis",
            "outpost-lag",
            "placement-group",
            "prefix-list",
            "replace-root-volume-task",
            "reserved-instances",
            "route-table",
            "security-group",
            "security-group-rule",
            "service-link-virtual-interface",
            "snapshot",
            "spot-fleet-request",
            "spot-instances-request",
            "subnet",
            "subnet-cidr-reservation",
            "traffic-mirror-filter",
            "traffic-mirror-session",
            "traffic-mirror-target",
            "transit-gateway",
            "transit-gateway-attachment",
            "transit-gateway-connect-peer",
            "transit-gateway-multicast-domain",
            "transit-gateway-policy-table",
            "transit-gateway-metering-policy",
            "transit-gateway-route-table",
            "transit-gateway-route-table-announcement",
            "volume",
            "vpc",
            "vpc-endpoint",
            "vpc-endpoint-connection",
            "vpc-endpoint-service",
            "vpc-endpoint-service-permission",
            "vpc-peering-connection",
            "vpn-connection",
            "vpn-gateway",
            "vpc-flow-log",
            "capacity-reservation-fleet",
            "traffic-mirror-filter-rule",
            "vpc-endpoint-connection-device-type",
            "verified-access-instance",
            "verified-access-group",
            "verified-access-endpoint",
            "verified-access-policy",
            "verified-access-trust-provider",
            "vpn-connection-device-type",
            "vpc-block-public-access-exclusion",
            "vpc-encryption-control",
            "route-server",
            "route-server-endpoint",
            "route-server-peer",
            "ipam-resource-discovery",
            "ipam-resource-discovery-association",
            "instance-connect-endpoint",
            "verified-access-endpoint-target",
            "ipam-external-resource-verification-token",
            "capacity-block",
            "mac-modification-task",
            "ipam-prefix-list-resolver",
            "ipam-policy",
            "ipam-prefix-list-resolver-target",
            "ipam-internet-registry-association",
            "secondary-interface",
            "secondary-network",
            "secondary-subnet",
            "capacity-manager-data-export",
            "vpn-concentrator",
            "ipam-pool-allocation",
            "capacity-reservation-cancellation-quote",
            "application-status-check",
            "capacity-reservation-modification-quote"
          ],
          "description": "The type of resource to tag on creation."
        },
        "Tags": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Tag"
          },
          "description": "The tags to apply to the resource."
        }
      }
    }
  }
}