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

Class: Aws::EC2::Types::ModifyInstanceAttributeRequest

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

{
  source_dest_check: {
    value: false,
  },
  attribute: "instanceType", # accepts instanceType, kernel, ramdisk, userData, disableApiTermination, instanceInitiatedShutdownBehavior, rootDeviceName, blockDeviceMapping, productCodes, sourceDestCheck, groupSet, ebsOptimized, sriovNetSupport, enaSupport
  block_device_mappings: [
    {
      device_name: "String",
      ebs: {
        delete_on_termination: false,
        volume_id: "String",
      },
      no_device: "String",
      virtual_name: "String",
    },
  ],
  disable_api_termination: {
    value: false,
  },
  dry_run: false,
  ebs_optimized: {
    value: false,
  },
  ena_support: {
    value: false,
  },
  groups: ["String"],
  instance_id: "String", # required
  instance_initiated_shutdown_behavior: "value", # value <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
  instance_type: "value", # value <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
  kernel: "value", # value <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
  ramdisk: "value", # value <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
  sriov_net_support: "value", # value <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
  user_data: {
    value: "data",
  },
  value: "String",
}

Contains the parameters for ModifyInstanceAttribute.

Instance Attribute Summary collapse

Instance Attribute Details

#attributeString

The name of the attribute.

Returns:

  • (String)


16385
16386
16387
16388
16389
16390
16391
16392
16393
16394
16395
16396
16397
16398
16399
16400
16401
16402
16403
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 16385

class ModifyInstanceAttributeRequest < Struct.new(
  :source_dest_check,
  :attribute,
  :block_device_mappings,
  :disable_api_termination,
  :dry_run,
  :ebs_optimized,
  :ena_support,
  :groups,
  :instance_id,
  :instance_initiated_shutdown_behavior,
  :instance_type,
  :kernel,
  :ramdisk,
  :sriov_net_support,
  :user_data,
  :value)
  include Aws::Structure
end

#block_device_mappingsArray<Types::InstanceBlockDeviceMappingSpecification>

Modifies the DeleteOnTermination attribute for volumes that are currently attached. The volume must be owned by the caller. If no value is specified for DeleteOnTermination, the default is true and the volume is deleted when the instance is terminated.

To add instance store volumes to an Amazon EBS-backed instance, you must add them when you launch the instance. For more information, see Updating the Block Device Mapping when Launching an Instance in the Amazon Elastic Compute Cloud User Guide.



16385
16386
16387
16388
16389
16390
16391
16392
16393
16394
16395
16396
16397
16398
16399
16400
16401
16402
16403
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 16385

class ModifyInstanceAttributeRequest < Struct.new(
  :source_dest_check,
  :attribute,
  :block_device_mappings,
  :disable_api_termination,
  :dry_run,
  :ebs_optimized,
  :ena_support,
  :groups,
  :instance_id,
  :instance_initiated_shutdown_behavior,
  :instance_type,
  :kernel,
  :ramdisk,
  :sriov_net_support,
  :user_data,
  :value)
  include Aws::Structure
end

#disable_api_terminationTypes::AttributeBooleanValue

If the value is true, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. You cannot use this parameter for Spot Instances.



16385
16386
16387
16388
16389
16390
16391
16392
16393
16394
16395
16396
16397
16398
16399
16400
16401
16402
16403
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 16385

class ModifyInstanceAttributeRequest < Struct.new(
  :source_dest_check,
  :attribute,
  :block_device_mappings,
  :disable_api_termination,
  :dry_run,
  :ebs_optimized,
  :ena_support,
  :groups,
  :instance_id,
  :instance_initiated_shutdown_behavior,
  :instance_type,
  :kernel,
  :ramdisk,
  :sriov_net_support,
  :user_data,
  :value)
  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)


16385
16386
16387
16388
16389
16390
16391
16392
16393
16394
16395
16396
16397
16398
16399
16400
16401
16402
16403
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 16385

class ModifyInstanceAttributeRequest < Struct.new(
  :source_dest_check,
  :attribute,
  :block_device_mappings,
  :disable_api_termination,
  :dry_run,
  :ebs_optimized,
  :ena_support,
  :groups,
  :instance_id,
  :instance_initiated_shutdown_behavior,
  :instance_type,
  :kernel,
  :ramdisk,
  :sriov_net_support,
  :user_data,
  :value)
  include Aws::Structure
end

#ebs_optimizedTypes::AttributeBooleanValue

Specifies whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.



16385
16386
16387
16388
16389
16390
16391
16392
16393
16394
16395
16396
16397
16398
16399
16400
16401
16402
16403
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 16385

class ModifyInstanceAttributeRequest < Struct.new(
  :source_dest_check,
  :attribute,
  :block_device_mappings,
  :disable_api_termination,
  :dry_run,
  :ebs_optimized,
  :ena_support,
  :groups,
  :instance_id,
  :instance_initiated_shutdown_behavior,
  :instance_type,
  :kernel,
  :ramdisk,
  :sriov_net_support,
  :user_data,
  :value)
  include Aws::Structure
end

#ena_supportTypes::AttributeBooleanValue

Set to true to enable enhanced networking with ENA for the instance.

This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable.



16385
16386
16387
16388
16389
16390
16391
16392
16393
16394
16395
16396
16397
16398
16399
16400
16401
16402
16403
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 16385

class ModifyInstanceAttributeRequest < Struct.new(
  :source_dest_check,
  :attribute,
  :block_device_mappings,
  :disable_api_termination,
  :dry_run,
  :ebs_optimized,
  :ena_support,
  :groups,
  :instance_id,
  :instance_initiated_shutdown_behavior,
  :instance_type,
  :kernel,
  :ramdisk,
  :sriov_net_support,
  :user_data,
  :value)
  include Aws::Structure
end

#groupsArray<String>

[EC2-VPC] Changes the security groups of the instance. You must specify at least one security group, even if it's just the default security group for the VPC. You must specify the security group ID, not the security group name.

Returns:

  • (Array<String>)


16385
16386
16387
16388
16389
16390
16391
16392
16393
16394
16395
16396
16397
16398
16399
16400
16401
16402
16403
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 16385

class ModifyInstanceAttributeRequest < Struct.new(
  :source_dest_check,
  :attribute,
  :block_device_mappings,
  :disable_api_termination,
  :dry_run,
  :ebs_optimized,
  :ena_support,
  :groups,
  :instance_id,
  :instance_initiated_shutdown_behavior,
  :instance_type,
  :kernel,
  :ramdisk,
  :sriov_net_support,
  :user_data,
  :value)
  include Aws::Structure
end

#instance_idString

The ID of the instance.

Returns:

  • (String)


16385
16386
16387
16388
16389
16390
16391
16392
16393
16394
16395
16396
16397
16398
16399
16400
16401
16402
16403
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 16385

class ModifyInstanceAttributeRequest < Struct.new(
  :source_dest_check,
  :attribute,
  :block_device_mappings,
  :disable_api_termination,
  :dry_run,
  :ebs_optimized,
  :ena_support,
  :groups,
  :instance_id,
  :instance_initiated_shutdown_behavior,
  :instance_type,
  :kernel,
  :ramdisk,
  :sriov_net_support,
  :user_data,
  :value)
  include Aws::Structure
end

#instance_initiated_shutdown_behaviorTypes::AttributeValue

Specifies whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).



16385
16386
16387
16388
16389
16390
16391
16392
16393
16394
16395
16396
16397
16398
16399
16400
16401
16402
16403
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 16385

class ModifyInstanceAttributeRequest < Struct.new(
  :source_dest_check,
  :attribute,
  :block_device_mappings,
  :disable_api_termination,
  :dry_run,
  :ebs_optimized,
  :ena_support,
  :groups,
  :instance_id,
  :instance_initiated_shutdown_behavior,
  :instance_type,
  :kernel,
  :ramdisk,
  :sriov_net_support,
  :user_data,
  :value)
  include Aws::Structure
end

#instance_typeTypes::AttributeValue

Changes the instance type to the specified value. For more information, see Instance Types. If the instance type is not valid, the error returned is InvalidInstanceAttributeValue.



16385
16386
16387
16388
16389
16390
16391
16392
16393
16394
16395
16396
16397
16398
16399
16400
16401
16402
16403
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 16385

class ModifyInstanceAttributeRequest < Struct.new(
  :source_dest_check,
  :attribute,
  :block_device_mappings,
  :disable_api_termination,
  :dry_run,
  :ebs_optimized,
  :ena_support,
  :groups,
  :instance_id,
  :instance_initiated_shutdown_behavior,
  :instance_type,
  :kernel,
  :ramdisk,
  :sriov_net_support,
  :user_data,
  :value)
  include Aws::Structure
end

#kernelTypes::AttributeValue

Changes the instance's kernel to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB.



16385
16386
16387
16388
16389
16390
16391
16392
16393
16394
16395
16396
16397
16398
16399
16400
16401
16402
16403
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 16385

class ModifyInstanceAttributeRequest < Struct.new(
  :source_dest_check,
  :attribute,
  :block_device_mappings,
  :disable_api_termination,
  :dry_run,
  :ebs_optimized,
  :ena_support,
  :groups,
  :instance_id,
  :instance_initiated_shutdown_behavior,
  :instance_type,
  :kernel,
  :ramdisk,
  :sriov_net_support,
  :user_data,
  :value)
  include Aws::Structure
end

#ramdiskTypes::AttributeValue

Changes the instance's RAM disk to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB.



16385
16386
16387
16388
16389
16390
16391
16392
16393
16394
16395
16396
16397
16398
16399
16400
16401
16402
16403
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 16385

class ModifyInstanceAttributeRequest < Struct.new(
  :source_dest_check,
  :attribute,
  :block_device_mappings,
  :disable_api_termination,
  :dry_run,
  :ebs_optimized,
  :ena_support,
  :groups,
  :instance_id,
  :instance_initiated_shutdown_behavior,
  :instance_type,
  :kernel,
  :ramdisk,
  :sriov_net_support,
  :user_data,
  :value)
  include Aws::Structure
end

#source_dest_checkTypes::AttributeBooleanValue

Specifies whether source/destination checking is enabled. A value of true means that checking is enabled, and false means checking is disabled. This value must be false for a NAT instance to perform NAT.



16385
16386
16387
16388
16389
16390
16391
16392
16393
16394
16395
16396
16397
16398
16399
16400
16401
16402
16403
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 16385

class ModifyInstanceAttributeRequest < Struct.new(
  :source_dest_check,
  :attribute,
  :block_device_mappings,
  :disable_api_termination,
  :dry_run,
  :ebs_optimized,
  :ena_support,
  :groups,
  :instance_id,
  :instance_initiated_shutdown_behavior,
  :instance_type,
  :kernel,
  :ramdisk,
  :sriov_net_support,
  :user_data,
  :value)
  include Aws::Structure
end

#sriov_net_supportTypes::AttributeValue

Set to simple to enable enhanced networking with the Intel 82599 Virtual Function interface for the instance.

There is no way to disable enhanced networking with the Intel 82599 Virtual Function interface at this time.

This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable.



16385
16386
16387
16388
16389
16390
16391
16392
16393
16394
16395
16396
16397
16398
16399
16400
16401
16402
16403
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 16385

class ModifyInstanceAttributeRequest < Struct.new(
  :source_dest_check,
  :attribute,
  :block_device_mappings,
  :disable_api_termination,
  :dry_run,
  :ebs_optimized,
  :ena_support,
  :groups,
  :instance_id,
  :instance_initiated_shutdown_behavior,
  :instance_type,
  :kernel,
  :ramdisk,
  :sriov_net_support,
  :user_data,
  :value)
  include Aws::Structure
end

#user_dataTypes::BlobAttributeValue

Changes the instance's user data to the specified value. If you are using an AWS SDK or command line tool, Base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide Base64-encoded text.



16385
16386
16387
16388
16389
16390
16391
16392
16393
16394
16395
16396
16397
16398
16399
16400
16401
16402
16403
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 16385

class ModifyInstanceAttributeRequest < Struct.new(
  :source_dest_check,
  :attribute,
  :block_device_mappings,
  :disable_api_termination,
  :dry_run,
  :ebs_optimized,
  :ena_support,
  :groups,
  :instance_id,
  :instance_initiated_shutdown_behavior,
  :instance_type,
  :kernel,
  :ramdisk,
  :sriov_net_support,
  :user_data,
  :value)
  include Aws::Structure
end

#valueString

A new value for the attribute. Use only with the kernel, ramdisk, userData, disableApiTermination, or instanceInitiatedShutdownBehavior attribute.

Returns:

  • (String)


16385
16386
16387
16388
16389
16390
16391
16392
16393
16394
16395
16396
16397
16398
16399
16400
16401
16402
16403
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 16385

class ModifyInstanceAttributeRequest < Struct.new(
  :source_dest_check,
  :attribute,
  :block_device_mappings,
  :disable_api_termination,
  :dry_run,
  :ebs_optimized,
  :ena_support,
  :groups,
  :instance_id,
  :instance_initiated_shutdown_behavior,
  :instance_type,
  :kernel,
  :ramdisk,
  :sriov_net_support,
  :user_data,
  :value)
  include Aws::Structure
end