You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::EC2::Types::CopyImageRequest

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 CopyImageRequest data as a hash:

{
  client_token: "String",
  description: "String",
  encrypted: false,
  kms_key_id: "String",
  name: "String", # required
  source_image_id: "String", # required
  source_region: "String", # required
  dry_run: false,
}

Contains the parameters for CopyImage.

Instance Attribute Summary collapse

Instance Attribute Details

#client_tokenString

Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see How to Ensure Idempotency in the Amazon Elastic Compute Cloud User Guide.

Returns:

  • (String)


3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 3741

class CopyImageRequest < Struct.new(
  :client_token,
  :description,
  :encrypted,
  :kms_key_id,
  :name,
  :source_image_id,
  :source_region,
  :dry_run)
  include Aws::Structure
end

#descriptionString

A description for the new AMI in the destination Region.

Returns:

  • (String)


3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 3741

class CopyImageRequest < Struct.new(
  :client_token,
  :description,
  :encrypted,
  :kms_key_id,
  :name,
  :source_image_id,
  :source_region,
  :dry_run)
  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)


3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 3741

class CopyImageRequest < Struct.new(
  :client_token,
  :description,
  :encrypted,
  :kms_key_id,
  :name,
  :source_image_id,
  :source_region,
  :dry_run)
  include Aws::Structure
end

#encryptedBoolean

Specifies whether the destination snapshots of the copied image should be encrypted. You can encrypt a copy of an unencrypted snapshot, but you cannot create an unencrypted copy of an encrypted snapshot. The default CMK for EBS is used unless you specify a non-default AWS Key Management Service (AWS KMS) CMK using KmsKeyId. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.

Returns:

  • (Boolean)


3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 3741

class CopyImageRequest < Struct.new(
  :client_token,
  :description,
  :encrypted,
  :kms_key_id,
  :name,
  :source_image_id,
  :source_region,
  :dry_run)
  include Aws::Structure
end

#kms_key_idString

An identifier for the AWS Key Management Service (AWS KMS) customer master key (CMK) to use when creating the encrypted volume. This parameter is only required if you want to use a non-default CMK; if this parameter is not specified, the default CMK for EBS is used. If a KmsKeyId is specified, the Encrypted flag must also be set.

To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. When using an alias name, prefix it with "alias/". For example:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

  • Alias name: alias/ExampleAlias

  • Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias

AWS parses KmsKeyId asynchronously, meaning that the action you call may appear to complete even though you provided an invalid identifier. This action will eventually report failure.

The specified CMK must exist in the Region that the snapshot is being copied to.

Returns:

  • (String)


3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 3741

class CopyImageRequest < Struct.new(
  :client_token,
  :description,
  :encrypted,
  :kms_key_id,
  :name,
  :source_image_id,
  :source_region,
  :dry_run)
  include Aws::Structure
end

#nameString

The name of the new AMI in the destination Region.

Returns:

  • (String)


3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 3741

class CopyImageRequest < Struct.new(
  :client_token,
  :description,
  :encrypted,
  :kms_key_id,
  :name,
  :source_image_id,
  :source_region,
  :dry_run)
  include Aws::Structure
end

#source_image_idString

The ID of the AMI to copy.

Returns:

  • (String)


3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 3741

class CopyImageRequest < Struct.new(
  :client_token,
  :description,
  :encrypted,
  :kms_key_id,
  :name,
  :source_image_id,
  :source_region,
  :dry_run)
  include Aws::Structure
end

#source_regionString

The name of the Region that contains the AMI to copy.

Returns:

  • (String)


3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 3741

class CopyImageRequest < Struct.new(
  :client_token,
  :description,
  :encrypted,
  :kms_key_id,
  :name,
  :source_image_id,
  :source_region,
  :dry_run)
  include Aws::Structure
end