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
show all
Defined in:
(unknown)

Overview

Note:

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

Instance Attribute Details

#attributeString

The name of the attribute.

Possible values:

  • instanceType
  • kernel
  • ramdisk
  • userData
  • disableApiTermination
  • instanceInitiatedShutdownBehavior
  • rootDeviceName
  • blockDeviceMapping
  • productCodes
  • sourceDestCheck
  • groupSet
  • ebsOptimized
  • sriovNetSupport
  • enaSupport
  • enclaveOptions

Returns:

  • (String)

    The name of the attribute.

#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.

Returns:

#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.

Returns:

  • (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_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)

    Checks whether you have the required permissions for the action, without actually making the request, and provides an error response.

#ebs_optimizedTypes::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.

Returns:

#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.

Returns:

#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>)

    [EC2-VPC] Changes the security groups of the instance.

#instance_idString

The ID of the instance.

Returns:

  • (String)

    The ID of the instance.

#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).

Returns:

  • (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_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.

Returns:

#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.

Returns:

#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.

Returns:

#source_dest_checkTypes::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.

Returns:

#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.

Returns:

  • (Types::AttributeValue)

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

#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.

Returns:

#valueString

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

Returns:

  • (String)

    A new value for the attribute.