You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.
Class: Aws::EC2::Types::ModifyInstanceAttributeRequest
- Inherits:
-
Struct
- Object
- Struct
- Aws::EC2::Types::ModifyInstanceAttributeRequest
- Defined in:
- (unknown)
Overview
When passing ModifyInstanceAttributeRequest as input to an Aws::Client method, you can use a vanilla Hash:
{
source_dest_check: {
value: false,
},
attribute: "instanceType", # accepts instanceType, kernel, ramdisk, userData, disableApiTermination, instanceInitiatedShutdownBehavior, rootDeviceName, blockDeviceMapping, productCodes, sourceDestCheck, groupSet, ebsOptimized, sriovNetSupport, enaSupport, enclaveOptions
block_device_mappings: [
{
device_name: "String",
ebs: {
delete_on_termination: false,
volume_id: "VolumeId",
},
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: "InstanceId", # 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",
}
Instance Attribute Summary collapse
-
#attribute ⇒ String
The name of the attribute.
-
#block_device_mappings ⇒ Array<Types::InstanceBlockDeviceMappingSpecification>
Modifies the
DeleteOnTermination
attribute for volumes that are currently attached. -
#disable_api_termination ⇒ Types::AttributeBooleanValue
If the value is
true
, you can\'t terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. -
#dry_run ⇒ Boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response.
-
#ebs_optimized ⇒ Types::AttributeBooleanValue
Specifies whether the instance is optimized for Amazon EBS I/O.
-
#ena_support ⇒ Types::AttributeBooleanValue
Set to
true
to enable enhanced networking with ENA for the instance. -
#groups ⇒ Array<String>
[EC2-VPC] Changes the security groups of the instance.
-
#instance_id ⇒ String
The ID of the instance.
-
#instance_initiated_shutdown_behavior ⇒ Types::AttributeValue
Specifies whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).
-
#instance_type ⇒ Types::AttributeValue
Changes the instance type to the specified value.
-
#kernel ⇒ Types::AttributeValue
Changes the instance\'s kernel to the specified value.
-
#ramdisk ⇒ Types::AttributeValue
Changes the instance\'s RAM disk to the specified value.
-
#source_dest_check ⇒ Types::AttributeBooleanValue
Specifies whether source/destination checking is enabled.
-
#sriov_net_support ⇒ Types::AttributeValue
Set to
simple
to enable enhanced networking with the Intel 82599 Virtual Function interface for the instance. -
#user_data ⇒ Types::BlobAttributeValue
Changes the instance\'s user data to the specified value.
-
#value ⇒ String
A new value for the attribute.
Instance Attribute Details
#attribute ⇒ String
The name of the attribute.
Possible values:
- instanceType
- kernel
- ramdisk
- userData
- disableApiTermination
- instanceInitiatedShutdownBehavior
- rootDeviceName
- blockDeviceMapping
- productCodes
- sourceDestCheck
- groupSet
- ebsOptimized
- sriovNetSupport
- enaSupport
- enclaveOptions
#block_device_mappings ⇒ Array<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.
#disable_api_termination ⇒ Types::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.
#dry_run ⇒ Boolean
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
.
#ebs_optimized ⇒ Types::AttributeBooleanValue
Specifies whether the instance is optimized for Amazon 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.
#ena_support ⇒ Types::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.
#groups ⇒ Array<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.
#instance_id ⇒ String
The ID of the instance.
#instance_initiated_shutdown_behavior ⇒ Types::AttributeValue
Specifies whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).
#instance_type ⇒ Types::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
.
#kernel ⇒ Types::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.
#ramdisk ⇒ Types::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.
#source_dest_check ⇒ Types::AttributeBooleanValue
Specifies whether source/destination checking is enabled. A value of
true
means that checking is enabled, and false
means that checking
is disabled. This value must be false
for a NAT instance to perform
NAT.
#sriov_net_support ⇒ Types::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.
#user_data ⇒ Types::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.
#value ⇒ String
A new value for the attribute. Use only with the kernel
, ramdisk
,
userData
, disableApiTermination
, or
instanceInitiatedShutdownBehavior
attribute.