Class: Aws::EC2::Types::CreateImageRequest

Inherits:
Struct
  • Object
show all
Defined in:
gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb

Overview

Note:

When making an API call, you may pass CreateImageRequest data as a hash:

{
  block_device_mappings: [
    {
      device_name: "String",
      virtual_name: "String",
      ebs: {
        delete_on_termination: false,
        iops: 1,
        snapshot_id: "String",
        volume_size: 1,
        volume_type: "standard", # accepts standard, io1, gp2, sc1, st1
        kms_key_id: "String",
        encrypted: false,
      },
      no_device: "String",
    },
  ],
  description: "String",
  dry_run: false,
  instance_id: "InstanceId", # required
  name: "String", # required
  no_reboot: false,
}

Constant Summary collapse

SENSITIVE =
[]

Instance Attribute Summary collapse

Instance Attribute Details

#block_device_mappingsArray<Types::BlockDeviceMapping>

The block device mappings. This parameter cannot be used to modify the encryption status of existing volumes or snapshots. To create an AMI with encrypted snapshots, use the CopyImage action.

Returns:



6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 6006

class CreateImageRequest < Struct.new(
  :block_device_mappings,
  :description,
  :dry_run,
  :instance_id,
  :name,
  :no_reboot)
  SENSITIVE = []
  include Aws::Structure
end

#descriptionString

A description for the new image.

Returns:

  • (String)


6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 6006

class CreateImageRequest < Struct.new(
  :block_device_mappings,
  :description,
  :dry_run,
  :instance_id,
  :name,
  :no_reboot)
  SENSITIVE = []
  include Aws::Structure
end

#dry_runBoolean

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.

Returns:

  • (Boolean)


6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 6006

class CreateImageRequest < Struct.new(
  :block_device_mappings,
  :description,
  :dry_run,
  :instance_id,
  :name,
  :no_reboot)
  SENSITIVE = []
  include Aws::Structure
end

#instance_idString

The ID of the instance.

Returns:

  • (String)


6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 6006

class CreateImageRequest < Struct.new(
  :block_device_mappings,
  :description,
  :dry_run,
  :instance_id,
  :name,
  :no_reboot)
  SENSITIVE = []
  include Aws::Structure
end

#nameString

A name for the new image.

Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)

Returns:

  • (String)


6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 6006

class CreateImageRequest < Struct.new(
  :block_device_mappings,
  :description,
  :dry_run,
  :instance_id,
  :name,
  :no_reboot)
  SENSITIVE = []
  include Aws::Structure
end

#no_rebootBoolean

By default, Amazon EC2 attempts to shut down and reboot the instance before creating the image. If the 'No Reboot' option is set, Amazon EC2 doesn't shut down the instance before creating the image. When this option is used, file system integrity on the created image can't be guaranteed.

Returns:

  • (Boolean)


6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 6006

class CreateImageRequest < Struct.new(
  :block_device_mappings,
  :description,
  :dry_run,
  :instance_id,
  :name,
  :no_reboot)
  SENSITIVE = []
  include Aws::Structure
end