Class: Aws::EC2::Instance

Inherits:
Object
  • Object
show all
Extended by:
Deprecations
Defined in:
sig/instance.rbs,
lib/aws-sdk-ec2/customizations/instance.rb,
lib/aws-sdk-ec2/instance.rb

Overview

Defined Under Namespace

Classes: Collection

Read-Only Attributes collapse

Actions collapse

Associations collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, options = {}) ⇒ Instance #initialize(options = {}) ⇒ Instance

Returns a new instance of Instance.

Overloads:

  • #initialize(id, options = {}) ⇒ Instance

    Parameters:

    • id (String)

    Options Hash (options):

  • #initialize(options = {}) ⇒ Instance

    Options Hash (options):

    • :id (required, String)
    • :client (Client)


13
14
15
# File 'sig/instance.rbs', line 13

def initialize: (String id, Hash[Symbol, untyped] options) -> void
| (id: String, ?client: Client) -> void
| (Hash[Symbol, untyped] args) -> void

Instance Method Details

#ami_launch_indexInteger

The AMI launch index, which can be used to find this instance in the launch group.

Returns:

  • (Integer)


160
# File 'sig/instance.rbs', line 160

def ami_launch_index: () -> ::Integer

#architectureString

The architecture of the image.

Returns:

  • (String)


22
# File 'sig/instance.rbs', line 22

def architecture: () -> ("i386" | "x86_64" | "arm64" | "x86_64_mac" | "arm64_mac")

Examples:

Request syntax with placeholder values


instance.attach_classic_link_vpc({
  dry_run: false,
  vpc_id: "VpcId", # required
  groups: ["SecurityGroupId"], # required
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :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.

  • :vpc_id (required, String)

    The ID of the ClassicLink-enabled VPC.

  • :groups (required, Array<String>)

    The IDs of the security groups. You cannot specify security groups from a different VPC.

Returns:



231
# File 'sig/instance.rbs', line 231

def attach_classic_link_vpc: (

#attach_volume(options = {}) ⇒ Types::VolumeAttachment

Examples:

Request syntax with placeholder values


instance.attach_volume({
  device: "String", # required
  volume_id: "VolumeId", # required
  ebs_card_index: 1,
  dry_run: false,
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :device (required, String)

    The device name (for example, /dev/sdh or xvdh).

  • :volume_id (required, String)

    The ID of the EBS volume. The volume and instance must be within the same Availability Zone.

  • :ebs_card_index (Integer)

    The index of the EBS card. Some instance types support multiple EBS cards. The default EBS card index is 0.

  • :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.

Returns:



239
# File 'sig/instance.rbs', line 239

def attach_volume: (

#block_device_mappingsArray<Types::InstanceBlockDeviceMapping>

Any block device mapping entries for the instance.



25
# File 'sig/instance.rbs', line 25

def block_device_mappings: () -> ::Array[Types::InstanceBlockDeviceMapping]

#boot_modeString

The boot mode that was specified by the AMI. If the value is uefi-preferred, the AMI supports both UEFI and Legacy BIOS. The currentInstanceBootMode parameter is the boot mode that is used to boot the instance at launch or start.

The operating system contained in the AMI must be configured to support the specified boot mode.

For more information, see Boot modes in the Amazon EC2 User Guide.

Returns:

  • (String)


106
# File 'sig/instance.rbs', line 106

def boot_mode: () -> ("legacy-bios" | "uefi" | "uefi-preferred")

#capacity_block_idString

The ID of the Capacity Block.

For P5 instances, a Capacity Block ID refers to a group of instances. For Trn2u instances, a capacity block ID refers to an EC2 UltraServer.

Returns:

  • (String)


85
# File 'sig/instance.rbs', line 85

def capacity_block_id: () -> ::String

#capacity_reservation_idString

The ID of the Capacity Reservation.

Returns:

  • (String)


88
# File 'sig/instance.rbs', line 88

def capacity_reservation_id: () -> ::String

#capacity_reservation_specificationTypes::CapacityReservationSpecificationResponse

Information about the Capacity Reservation targeting option.



91
# File 'sig/instance.rbs', line 91

def capacity_reservation_specification: () -> Types::CapacityReservationSpecificationResponse

#classic_addressClassicAddress?

Returns:



475
# File 'sig/instance.rbs', line 475

def classic_address: () -> ClassicAddress?

#clientClient

Returns:



481
# File 'lib/aws-sdk-ec2/instance.rb', line 481

def client: () -> Client

#client_tokenString

The idempotency token you provided when you launched the instance, if applicable.

Returns:

  • (String)


28
# File 'sig/instance.rbs', line 28

def client_token: () -> ::String

#console_output(options = {}) ⇒ Types::GetConsoleOutputResult

Examples:

Request syntax with placeholder values


instance.console_output({
  latest: false,
  dry_run: false,
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :latest (Boolean)

    When enabled, retrieves the latest console output for the instance.

    Default: disabled (false)

  • :dry_run (Boolean)

    Checks whether you have the required permissions for the operation, 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:



248
# File 'sig/instance.rbs', line 248

def console_output: (

#cpu_optionsTypes::CpuOptions

The CPU options for the instance.

Returns:



82
# File 'sig/instance.rbs', line 82

def cpu_options: () -> Types::CpuOptions

#create_image(options = {}) ⇒ Image

Examples:

Request syntax with placeholder values


image = instance.create_image({
  tag_specifications: [
    {
      resource_type: "capacity-reservation", # accepts capacity-reservation, client-vpn-endpoint, customer-gateway, carrier-gateway, coip-pool, declarative-policies-report, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, image-usage-report, import-image-task, import-snapshot-task, instance, instance-event-window, internet-gateway, ipam, ipam-pool, ipam-scope, ipv4pool-ec2, ipv6pool-ec2, key-pair, launch-template, local-gateway, local-gateway-route-table, local-gateway-virtual-interface, local-gateway-virtual-interface-group, local-gateway-route-table-vpc-association, local-gateway-route-table-virtual-interface-group-association, natgateway, network-acl, network-interface, network-insights-analysis, network-insights-path, network-insights-access-scope, network-insights-access-scope-analysis, outpost-lag, placement-group, prefix-list, replace-root-volume-task, reserved-instances, route-table, security-group, security-group-rule, service-link-virtual-interface, snapshot, spot-fleet-request, spot-instances-request, subnet, subnet-cidr-reservation, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-connect-peer, transit-gateway-multicast-domain, transit-gateway-policy-table, transit-gateway-metering-policy, transit-gateway-route-table, transit-gateway-route-table-announcement, volume, vpc, vpc-endpoint, vpc-endpoint-connection, vpc-endpoint-service, vpc-endpoint-service-permission, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log, capacity-reservation-fleet, traffic-mirror-filter-rule, vpc-endpoint-connection-device-type, verified-access-instance, verified-access-group, verified-access-endpoint, verified-access-policy, verified-access-trust-provider, vpn-connection-device-type, vpc-block-public-access-exclusion, vpc-encryption-control, route-server, route-server-endpoint, route-server-peer, ipam-resource-discovery, ipam-resource-discovery-association, instance-connect-endpoint, verified-access-endpoint-target, ipam-external-resource-verification-token, capacity-block, mac-modification-task, ipam-prefix-list-resolver, ipam-policy, ipam-prefix-list-resolver-target, secondary-interface, secondary-network, secondary-subnet, capacity-manager-data-export, vpn-concentrator, ipam-pool-allocation, capacity-reservation-cancellation-quote
      tags: [
        {
          key: "String",
          value: "String",
        },
      ],
    },
  ],
  snapshot_location: "regional", # accepts regional, local
  dry_run: false,
  name: "ImageNameRequest", # required
  description: "ImageDescriptionRequest",
  no_reboot: false,
  block_device_mappings: [
    {
      ebs: {
        delete_on_termination: false,
        iops: 1,
        snapshot_id: "SnapshotId",
        volume_size: 1,
        volume_type: "standard", # accepts standard, io1, io2, gp2, sc1, st1, gp3
        kms_key_id: "String",
        throughput: 1,
        outpost_arn: "String",
        availability_zone: "String",
        encrypted: false,
        volume_initialization_rate: 1,
        availability_zone_id: "String",
        ebs_card_index: 1,
      },
      no_device: "String",
      device_name: "String",
      virtual_name: "String",
    },
  ],
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :tag_specifications (Array<Types::TagSpecification>)

    The tags to apply to the AMI and snapshots on creation. You can tag the AMI, the snapshots, or both.

    • To tag the AMI, the value for ResourceType must be image.

    • To tag the snapshots that are created of the root volume and of other Amazon EBS volumes that are attached to the instance, the value for ResourceType must be snapshot. The same tag is applied to all of the snapshots that are created.

    If you specify other values for ResourceType, the request fails.

    To tag an AMI or snapshot after it has been created, see CreateTags.

  • :snapshot_location (String)

    Only supported for instances in Local Zones. If the source instance is not in a Local Zone, omit this parameter.

    The Amazon S3 location where the snapshots will be stored.

    • To create local snapshots in the same Local Zone as the source instance, specify local.

    • To create regional snapshots in the parent Region of the Local Zone, specify regional or omit this parameter.

    Default: regional

  • :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.

  • :name (required, String)

    A name for the new image.

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

  • :description (String)

    A description for the new image.

  • :no_reboot (Boolean)

    Indicates whether or not the instance should be automatically rebooted before creating the image. Specify one of the following values:

    • true - The instance is not rebooted before creating the image. This creates crash-consistent snapshots that include only the data that has been written to the volumes at the time the snapshots are created. Buffered data and data in memory that has not yet been written to the volumes is not included in the snapshots.

    • false - The instance is rebooted before creating the image. This ensures that all buffered data and data in memory is written to the volumes before the snapshots are created.

    Default: false

  • :block_device_mappings (Array<Types::BlockDeviceMapping>)

    The block device mappings.

    When using the CreateImage action:

    • You can't change the volume size using the VolumeSize parameter. If you want a different volume size, you must first change the volume size of the source instance.

    • You can't modify the encryption status of existing volumes or snapshots. To create an AMI with volumes or snapshots that have a different encryption status (for example, where the source volume and snapshots are unencrypted, and you want to create an AMI with encrypted volumes or snapshots), copy the image instead.

    • The only option that can be changed for existing mappings or snapshots is DeleteOnTermination.

Returns:



255
# File 'sig/instance.rbs', line 255

def create_image: (

#create_tags(options = {}) ⇒ Tag::Collection

Examples:

Request syntax with placeholder values


tag = instance.create_tags({
  dry_run: false,
  tags: [ # required
    {
      key: "String",
      value: "String",
    },
  ],
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :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.

  • :tags (required, Array<Types::Tag>)

    The tags. The value parameter is required, but if you don't want the tag to have a value, specify the parameter with no value, and we set the value to an empty string.

Returns:



298
# File 'sig/instance.rbs', line 298

def create_tags: (

#current_instance_boot_modeString

The boot mode that is used to boot the instance at launch or start. For more information, see Boot modes in the Amazon EC2 User Guide.

Returns:

  • (String)


130
# File 'sig/instance.rbs', line 130

def current_instance_boot_mode: () -> ("legacy-bios" | "uefi")

#dataTypes::Instance

Returns the data for this Aws::EC2::Instance. Calls Client#describe_instances if #data_loaded? is false.

Returns:



205
# File 'sig/instance.rbs', line 205

def data: () -> Types::Instance

#data_loaded?Boolean

Returns true if this resource is loaded. Accessing attributes or #data on an unloaded resource will trigger a call to #load.

Returns:

  • (Boolean)

    Returns true if this resource is loaded. Accessing attributes or #data on an unloaded resource will trigger a call to #load.



208
# File 'sig/instance.rbs', line 208

def data_loaded?: () -> bool

#decrypt_windows_password(key_pair_path) ⇒ String

Parameters:

  • key_pair_path (String, Pathname)

Returns:

  • (String)


11
12
13
14
15
16
# File 'lib/aws-sdk-ec2/customizations/instance.rb', line 11

def decrypt_windows_password(key_pair_path)
  decoded = Base64.decode64(encrypted_password)
  pem_bytes = File.open(key_pair_path, 'rb') { |f| f.read }
  private_key = OpenSSL::PKey::RSA.new(pem_bytes)
  private_key.private_decrypt(decoded)
end

#delete_tags(options = {}) ⇒ Tag::Collection

Examples:

Request syntax with placeholder values


tag = instance.delete_tags({
  dry_run: false,
  tags: [
    {
      key: "String",
      value: "String",
    },
  ],
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :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.

  • :tags (Array<Types::Tag>)

    The tags to delete. Specify a tag key and an optional tag value to delete specific tags. If you specify a tag key without a tag value, we delete any tag with this key regardless of its value. If you specify a tag key with an empty string as the tag value, we delete the tag only if its value is an empty string.

    If you omit this parameter, we delete all user-defined tags for the specified resources. We do not delete Amazon Web Services-generated tags (tags that have the aws: prefix).

    Constraints: Up to 1000 tags.

Returns:



310
# File 'sig/instance.rbs', line 310

def delete_tags: (

#describe_attribute(options = {}) ⇒ Types::InstanceAttribute

Examples:

Request syntax with placeholder values


instance.describe_attribute({
  dry_run: false,
  attribute: "instanceType", # required, accepts instanceType, kernel, ramdisk, userData, disableApiTermination, instanceInitiatedShutdownBehavior, rootDeviceName, blockDeviceMapping, productCodes, sourceDestCheck, groupSet, ebsOptimized, sriovNetSupport, enaSupport, enclaveOptions, disableApiStop
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :dry_run (Boolean)

    Checks whether you have the required permissions for the operation, 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.

  • :attribute (required, String)

    The instance attribute.

    Note that the enaSupport attribute is not supported.

Returns:



322
# File 'sig/instance.rbs', line 322

def describe_attribute: (

Examples:

Request syntax with placeholder values


instance.detach_classic_link_vpc({
  dry_run: false,
  vpc_id: "VpcId", # required
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :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.

  • :vpc_id (required, String)

    The ID of the VPC to which the instance is linked.

Returns:



329
# File 'sig/instance.rbs', line 329

def detach_classic_link_vpc: (

#detach_volume(options = {}) ⇒ Types::VolumeAttachment

Examples:

Request syntax with placeholder values


instance.detach_volume({
  device: "String",
  force: false,
  volume_id: "VolumeIdWithResolver", # required
  dry_run: false,
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :device (String)

    The device name.

  • :force (Boolean)

    Forces detachment if the previous detachment attempt did not occur cleanly (for example, logging into an instance, unmounting the volume, and detaching normally). This option can lead to data loss or a corrupted file system. Use this option only as a last resort to detach a volume from a failed instance. The instance won't have an opportunity to flush file system caches or file system metadata. If you use this option, you must perform file system check and repair procedures.

  • :volume_id (required, String)

    The ID of the volume.

  • :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.

Returns:



336
# File 'sig/instance.rbs', line 336

def detach_volume: (

#ebs_optimizedBoolean

Indicates 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 I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.

Returns:

  • (Boolean)


31
# File 'sig/instance.rbs', line 31

def ebs_optimized: () -> bool

#elastic_gpu_associationsArray<Types::ElasticGpuAssociation>

Deprecated.

Amazon Elastic Graphics reached end of life on January 8, 2024.

Returns:



46
# File 'sig/instance.rbs', line 46

def elastic_gpu_associations: () -> ::Array[Types::ElasticGpuAssociation]

#elastic_inference_accelerator_associationsArray<Types::ElasticInferenceAcceleratorAssociation>

Deprecated

Amazon Elastic Inference is no longer available.



49
# File 'sig/instance.rbs', line 49

def elastic_inference_accelerator_associations: () -> ::Array[Types::ElasticInferenceAcceleratorAssociation]

#ena_supportBoolean

Specifies whether enhanced networking with ENA is enabled.

Returns:

  • (Boolean)


34
# File 'sig/instance.rbs', line 34

def ena_support: () -> bool

#enclave_optionsTypes::EnclaveOptions

Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves.



103
# File 'sig/instance.rbs', line 103

def enclave_options: () -> Types::EnclaveOptions

#exists?(options = {}) ⇒ Boolean

Returns true if the Instance exists.

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Returns:

  • (Boolean)

    Returns true if the Instance exists.



211
212
# File 'sig/instance.rbs', line 211

def exists?: (?max_attempts: Integer, ?delay: Numeric, ?before_attempt: (^(Integer attempts) -> void), ?before_wait: (^(Integer attempts, untyped response) -> void)) -> bool
| (?Hash[Symbol, untyped]) -> bool

#hibernation_optionsTypes::HibernationOptions

Indicates whether the instance is enabled for hibernation.



94
# File 'sig/instance.rbs', line 94

def hibernation_options: () -> Types::HibernationOptions

#hypervisorString

The hypervisor type of the instance. The value xen is used for both Xen and Nitro hypervisors.

Returns:

  • (String)


37
# File 'sig/instance.rbs', line 37

def hypervisor: () -> ("ovm" | "xen")

#iam_instance_profileTypes::IamInstanceProfile

The IAM instance profile associated with the instance, if applicable.



40
# File 'sig/instance.rbs', line 40

def iam_instance_profile: () -> Types::IamInstanceProfile

#idString Also known as: instance_id

Returns:

  • (String)


18
# File 'sig/instance.rbs', line 18

def id: () -> String

#identifiersObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Deprecated.


1922
1923
1924
# File 'lib/aws-sdk-ec2/instance.rb', line 1922

def identifiers
  { id: @id }
end

#imageImage?

Returns:



478
# File 'sig/instance.rbs', line 478

def image: () -> Image?

#image_idString

The ID of the AMI used to launch the instance.

Returns:

  • (String)


142
# File 'sig/instance.rbs', line 142

def image_id: () -> ::String

#instance_lifecycleString

Indicates whether this is a Spot Instance or a Scheduled Instance.

Returns:

  • (String)


43
# File 'sig/instance.rbs', line 43

def instance_lifecycle: () -> ("spot" | "scheduled" | "capacity-block" | "interruptible-capacity-reservation")

#instance_typeString

The instance type.

Returns:

  • (String)


166
# File 'sig/instance.rbs', line 166

def instance_type: () -> ("a1.medium" | "a1.large" | "a1.xlarge" | "a1.2xlarge" | "a1.4xlarge" | "a1.metal" | "c1.medium" | "c1.xlarge" | "c3.large" | "c3.xlarge" | "c3.2xlarge" | "c3.4xlarge" | "c3.8xlarge" | "c4.large" | "c4.xlarge" | "c4.2xlarge" | "c4.4xlarge" | "c4.8xlarge" | "c5.large" | "c5.xlarge" | "c5.2xlarge" | "c5.4xlarge" | "c5.9xlarge" | "c5.12xlarge" | "c5.18xlarge" | "c5.24xlarge" | "c5.metal" | "c5a.large" | "c5a.xlarge" | "c5a.2xlarge" | "c5a.4xlarge" | "c5a.8xlarge" | "c5a.12xlarge" | "c5a.16xlarge" | "c5a.24xlarge" | "c5ad.large" | "c5ad.xlarge" | "c5ad.2xlarge" | "c5ad.4xlarge" | "c5ad.8xlarge" | "c5ad.12xlarge" | "c5ad.16xlarge" | "c5ad.24xlarge" | "c5d.large" | "c5d.xlarge" | "c5d.2xlarge" | "c5d.4xlarge" | "c5d.9xlarge" | "c5d.12xlarge" | "c5d.18xlarge" | "c5d.24xlarge" | "c5d.metal" | "c5n.large" | "c5n.xlarge" | "c5n.2xlarge" | "c5n.4xlarge" | "c5n.9xlarge" | "c5n.18xlarge" | "c5n.metal" | "c6g.medium" | "c6g.large" | "c6g.xlarge" | "c6g.2xlarge" | "c6g.4xlarge" | "c6g.8xlarge" | "c6g.12xlarge" | "c6g.16xlarge" | "c6g.metal" | "c6gd.medium" | "c6gd.large" | "c6gd.xlarge" | "c6gd.2xlarge" | "c6gd.4xlarge" | "c6gd.8xlarge" | "c6gd.12xlarge" | "c6gd.16xlarge" | "c6gd.metal" | "c6gn.medium" | "c6gn.large" | "c6gn.xlarge" | "c6gn.2xlarge" | "c6gn.4xlarge" | "c6gn.8xlarge" | "c6gn.12xlarge" | "c6gn.16xlarge" | "c6i.large" | "c6i.xlarge" | "c6i.2xlarge" | "c6i.4xlarge" | "c6i.8xlarge" | "c6i.12xlarge" | "c6i.16xlarge" | "c6i.24xlarge" | "c6i.32xlarge" | "c6i.metal" | "cc1.4xlarge" | "cc2.8xlarge" | "cg1.4xlarge" | "cr1.8xlarge" | "d2.xlarge" | "d2.2xlarge" | "d2.4xlarge" | "d2.8xlarge" | "d3.xlarge" | "d3.2xlarge" | "d3.4xlarge" | "d3.8xlarge" | "d3en.xlarge" | "d3en.2xlarge" | "d3en.4xlarge" | "d3en.6xlarge" | "d3en.8xlarge" | "d3en.12xlarge" | "dl1.24xlarge" | "f1.2xlarge" | "f1.4xlarge" | "f1.16xlarge" | "g2.2xlarge" | "g2.8xlarge" | "g3.4xlarge" | "g3.8xlarge" | "g3.16xlarge" | "g3s.xlarge" | "g4ad.xlarge" | "g4ad.2xlarge" | "g4ad.4xlarge" | "g4ad.8xlarge" | "g4ad.16xlarge" | "g4dn.xlarge" | "g4dn.2xlarge" | "g4dn.4xlarge" | "g4dn.8xlarge" | "g4dn.12xlarge" | "g4dn.16xlarge" | "g4dn.metal" | "g5.xlarge" | "g5.2xlarge" | "g5.4xlarge" | "g5.8xlarge" | "g5.12xlarge" | "g5.16xlarge" | "g5.24xlarge" | "g5.48xlarge" | "g5g.xlarge" | "g5g.2xlarge" | "g5g.4xlarge" | "g5g.8xlarge" | "g5g.16xlarge" | "g5g.metal" | "hi1.4xlarge" | "hpc6a.48xlarge" | "hs1.8xlarge" | "h1.2xlarge" | "h1.4xlarge" | "h1.8xlarge" | "h1.16xlarge" | "i2.xlarge" | "i2.2xlarge" | "i2.4xlarge" | "i2.8xlarge" | "i3.large" | "i3.xlarge" | "i3.2xlarge" | "i3.4xlarge" | "i3.8xlarge" | "i3.16xlarge" | "i3.metal" | "i3en.large" | "i3en.xlarge" | "i3en.2xlarge" | "i3en.3xlarge" | "i3en.6xlarge" | "i3en.12xlarge" | "i3en.24xlarge" | "i3en.metal" | "im4gn.large" | "im4gn.xlarge" | "im4gn.2xlarge" | "im4gn.4xlarge" | "im4gn.8xlarge" | "im4gn.16xlarge" | "inf1.xlarge" | "inf1.2xlarge" | "inf1.6xlarge" | "inf1.24xlarge" | "is4gen.medium" | "is4gen.large" | "is4gen.xlarge" | "is4gen.2xlarge" | "is4gen.4xlarge" | "is4gen.8xlarge" | "m1.small" | "m1.medium" | "m1.large" | "m1.xlarge" | "m2.xlarge" | "m2.2xlarge" | "m2.4xlarge" | "m3.medium" | "m3.large" | "m3.xlarge" | "m3.2xlarge" | "m4.large" | "m4.xlarge" | "m4.2xlarge" | "m4.4xlarge" | "m4.10xlarge" | "m4.16xlarge" | "m5.large" | "m5.xlarge" | "m5.2xlarge" | "m5.4xlarge" | "m5.8xlarge" | "m5.12xlarge" | "m5.16xlarge" | "m5.24xlarge" | "m5.metal" | "m5a.large" | "m5a.xlarge" | "m5a.2xlarge" | "m5a.4xlarge" | "m5a.8xlarge" | "m5a.12xlarge" | "m5a.16xlarge" | "m5a.24xlarge" | "m5ad.large" | "m5ad.xlarge" | "m5ad.2xlarge" | "m5ad.4xlarge" | "m5ad.8xlarge" | "m5ad.12xlarge" | "m5ad.16xlarge" | "m5ad.24xlarge" | "m5d.large" | "m5d.xlarge" | "m5d.2xlarge" | "m5d.4xlarge" | "m5d.8xlarge" | "m5d.12xlarge" | "m5d.16xlarge" | "m5d.24xlarge" | "m5d.metal" | "m5dn.large" | "m5dn.xlarge" | "m5dn.2xlarge" | "m5dn.4xlarge" | "m5dn.8xlarge" | "m5dn.12xlarge" | "m5dn.16xlarge" | "m5dn.24xlarge" | "m5dn.metal" | "m5n.large" | "m5n.xlarge" | "m5n.2xlarge" | "m5n.4xlarge" | "m5n.8xlarge" | "m5n.12xlarge" | "m5n.16xlarge" | "m5n.24xlarge" | "m5n.metal" | "m5zn.large" | "m5zn.xlarge" | "m5zn.2xlarge" | "m5zn.3xlarge" | "m5zn.6xlarge" | "m5zn.12xlarge" | "m5zn.metal" | "m6a.large" | "m6a.xlarge" | "m6a.2xlarge" | "m6a.4xlarge" | "m6a.8xlarge" | "m6a.12xlarge" | "m6a.16xlarge" | "m6a.24xlarge" | "m6a.32xlarge" | "m6a.48xlarge" | "m6g.metal" | "m6g.medium" | "m6g.large" | "m6g.xlarge" | "m6g.2xlarge" | "m6g.4xlarge" | "m6g.8xlarge" | "m6g.12xlarge" | "m6g.16xlarge" | "m6gd.metal" | "m6gd.medium" | "m6gd.large" | "m6gd.xlarge" | "m6gd.2xlarge" | "m6gd.4xlarge" | "m6gd.8xlarge" | "m6gd.12xlarge" | "m6gd.16xlarge" | "m6i.large" | "m6i.xlarge" | "m6i.2xlarge" | "m6i.4xlarge" | "m6i.8xlarge" | "m6i.12xlarge" | "m6i.16xlarge" | "m6i.24xlarge" | "m6i.32xlarge" | "m6i.metal" | "mac1.metal" | "p2.xlarge" | "p2.8xlarge" | "p2.16xlarge" | "p3.2xlarge" | "p3.8xlarge" | "p3.16xlarge" | "p3dn.24xlarge" | "p4d.24xlarge" | "r3.large" | "r3.xlarge" | "r3.2xlarge" | "r3.4xlarge" | "r3.8xlarge" | "r4.large" | "r4.xlarge" | "r4.2xlarge" | "r4.4xlarge" | "r4.8xlarge" | "r4.16xlarge" | "r5.large" | "r5.xlarge" | "r5.2xlarge" | "r5.4xlarge" | "r5.8xlarge" | "r5.12xlarge" | "r5.16xlarge" | "r5.24xlarge" | "r5.metal" | "r5a.large" | "r5a.xlarge" | "r5a.2xlarge" | "r5a.4xlarge" | "r5a.8xlarge" | "r5a.12xlarge" | "r5a.16xlarge" | "r5a.24xlarge" | "r5ad.large" | "r5ad.xlarge" | "r5ad.2xlarge" | "r5ad.4xlarge" | "r5ad.8xlarge" | "r5ad.12xlarge" | "r5ad.16xlarge" | "r5ad.24xlarge" | "r5b.large" | "r5b.xlarge" | "r5b.2xlarge" | "r5b.4xlarge" | "r5b.8xlarge" | "r5b.12xlarge" | "r5b.16xlarge" | "r5b.24xlarge" | "r5b.metal" | "r5d.large" | "r5d.xlarge" | "r5d.2xlarge" | "r5d.4xlarge" | "r5d.8xlarge" | "r5d.12xlarge" | "r5d.16xlarge" | "r5d.24xlarge" | "r5d.metal" | "r5dn.large" | "r5dn.xlarge" | "r5dn.2xlarge" | "r5dn.4xlarge" | "r5dn.8xlarge" | "r5dn.12xlarge" | "r5dn.16xlarge" | "r5dn.24xlarge" | "r5dn.metal" | "r5n.large" | "r5n.xlarge" | "r5n.2xlarge" | "r5n.4xlarge" | "r5n.8xlarge" | "r5n.12xlarge" | "r5n.16xlarge" | "r5n.24xlarge" | "r5n.metal" | "r6g.medium" | "r6g.large" | "r6g.xlarge" | "r6g.2xlarge" | "r6g.4xlarge" | "r6g.8xlarge" | "r6g.12xlarge" | "r6g.16xlarge" | "r6g.metal" | "r6gd.medium" | "r6gd.large" | "r6gd.xlarge" | "r6gd.2xlarge" | "r6gd.4xlarge" | "r6gd.8xlarge" | "r6gd.12xlarge" | "r6gd.16xlarge" | "r6gd.metal" | "r6i.large" | "r6i.xlarge" | "r6i.2xlarge" | "r6i.4xlarge" | "r6i.8xlarge" | "r6i.12xlarge" | "r6i.16xlarge" | "r6i.24xlarge" | "r6i.32xlarge" | "r6i.metal" | "t1.micro" | "t2.nano" | "t2.micro" | "t2.small" | "t2.medium" | "t2.large" | "t2.xlarge" | "t2.2xlarge" | "t3.nano" | "t3.micro" | "t3.small" | "t3.medium" | "t3.large" | "t3.xlarge" | "t3.2xlarge" | "t3a.nano" | "t3a.micro" | "t3a.small" | "t3a.medium" | "t3a.large" | "t3a.xlarge" | "t3a.2xlarge" | "t4g.nano" | "t4g.micro" | "t4g.small" | "t4g.medium" | "t4g.large" | "t4g.xlarge" | "t4g.2xlarge" | "u-6tb1.56xlarge" | "u-6tb1.112xlarge" | "u-9tb1.112xlarge" | "u-12tb1.112xlarge" | "u-6tb1.metal" | "u-9tb1.metal" | "u-12tb1.metal" | "u-18tb1.metal" | "u-24tb1.metal" | "vt1.3xlarge" | "vt1.6xlarge" | "vt1.24xlarge" | "x1.16xlarge" | "x1.32xlarge" | "x1e.xlarge" | "x1e.2xlarge" | "x1e.4xlarge" | "x1e.8xlarge" | "x1e.16xlarge" | "x1e.32xlarge" | "x2iezn.2xlarge" | "x2iezn.4xlarge" | "x2iezn.6xlarge" | "x2iezn.8xlarge" | "x2iezn.12xlarge" | "x2iezn.metal" | "x2gd.medium" | "x2gd.large" | "x2gd.xlarge" | "x2gd.2xlarge" | "x2gd.4xlarge" | "x2gd.8xlarge" | "x2gd.12xlarge" | "x2gd.16xlarge" | "x2gd.metal" | "z1d.large" | "z1d.xlarge" | "z1d.2xlarge" | "z1d.3xlarge" | "z1d.6xlarge" | "z1d.12xlarge" | "z1d.metal" | "x2idn.16xlarge" | "x2idn.24xlarge" | "x2idn.32xlarge" | "x2iedn.xlarge" | "x2iedn.2xlarge" | "x2iedn.4xlarge" | "x2iedn.8xlarge" | "x2iedn.16xlarge" | "x2iedn.24xlarge" | "x2iedn.32xlarge" | "c6a.large" | "c6a.xlarge" | "c6a.2xlarge" | "c6a.4xlarge" | "c6a.8xlarge" | "c6a.12xlarge" | "c6a.16xlarge" | "c6a.24xlarge" | "c6a.32xlarge" | "c6a.48xlarge" | "c6a.metal" | "m6a.metal" | "i4i.large" | "i4i.xlarge" | "i4i.2xlarge" | "i4i.4xlarge" | "i4i.8xlarge" | "i4i.16xlarge" | "i4i.32xlarge" | "i4i.metal" | "x2idn.metal" | "x2iedn.metal" | "c7g.medium" | "c7g.large" | "c7g.xlarge" | "c7g.2xlarge" | "c7g.4xlarge" | "c7g.8xlarge" | "c7g.12xlarge" | "c7g.16xlarge" | "mac2.metal" | "c6id.large" | "c6id.xlarge" | "c6id.2xlarge" | "c6id.4xlarge" | "c6id.8xlarge" | "c6id.12xlarge" | "c6id.16xlarge" | "c6id.24xlarge" | "c6id.32xlarge" | "c6id.metal" | "m6id.large" | "m6id.xlarge" | "m6id.2xlarge" | "m6id.4xlarge" | "m6id.8xlarge" | "m6id.12xlarge" | "m6id.16xlarge" | "m6id.24xlarge" | "m6id.32xlarge" | "m6id.metal" | "r6id.large" | "r6id.xlarge" | "r6id.2xlarge" | "r6id.4xlarge" | "r6id.8xlarge" | "r6id.12xlarge" | "r6id.16xlarge" | "r6id.24xlarge" | "r6id.32xlarge" | "r6id.metal" | "r6a.large" | "r6a.xlarge" | "r6a.2xlarge" | "r6a.4xlarge" | "r6a.8xlarge" | "r6a.12xlarge" | "r6a.16xlarge" | "r6a.24xlarge" | "r6a.32xlarge" | "r6a.48xlarge" | "r6a.metal" | "p4de.24xlarge" | "u-3tb1.56xlarge" | "u-18tb1.112xlarge" | "u-24tb1.112xlarge" | "trn1.2xlarge" | "trn1.32xlarge" | "hpc6id.32xlarge" | "c6in.large" | "c6in.xlarge" | "c6in.2xlarge" | "c6in.4xlarge" | "c6in.8xlarge" | "c6in.12xlarge" | "c6in.16xlarge" | "c6in.24xlarge" | "c6in.32xlarge" | "m6in.large" | "m6in.xlarge" | "m6in.2xlarge" | "m6in.4xlarge" | "m6in.8xlarge" | "m6in.12xlarge" | "m6in.16xlarge" | "m6in.24xlarge" | "m6in.32xlarge" | "m6idn.large" | "m6idn.xlarge" | "m6idn.2xlarge" | "m6idn.4xlarge" | "m6idn.8xlarge" | "m6idn.12xlarge" | "m6idn.16xlarge" | "m6idn.24xlarge" | "m6idn.32xlarge" | "r6in.large" | "r6in.xlarge" | "r6in.2xlarge" | "r6in.4xlarge" | "r6in.8xlarge" | "r6in.12xlarge" | "r6in.16xlarge" | "r6in.24xlarge" | "r6in.32xlarge" | "r6idn.large" | "r6idn.xlarge" | "r6idn.2xlarge" | "r6idn.4xlarge" | "r6idn.8xlarge" | "r6idn.12xlarge" | "r6idn.16xlarge" | "r6idn.24xlarge" | "r6idn.32xlarge" | "c7g.metal" | "m7g.medium" | "m7g.large" | "m7g.xlarge" | "m7g.2xlarge" | "m7g.4xlarge" | "m7g.8xlarge" | "m7g.12xlarge" | "m7g.16xlarge" | "m7g.metal" | "r7g.medium" | "r7g.large" | "r7g.xlarge" | "r7g.2xlarge" | "r7g.4xlarge" | "r7g.8xlarge" | "r7g.12xlarge" | "r7g.16xlarge" | "r7g.metal" | "c6in.metal" | "m6in.metal" | "m6idn.metal" | "r6in.metal" | "r6idn.metal" | "inf2.xlarge" | "inf2.8xlarge" | "inf2.24xlarge" | "inf2.48xlarge" | "trn1n.32xlarge" | "i4g.large" | "i4g.xlarge" | "i4g.2xlarge" | "i4g.4xlarge" | "i4g.8xlarge" | "i4g.16xlarge" | "hpc7g.4xlarge" | "hpc7g.8xlarge" | "hpc7g.16xlarge" | "c7gn.medium" | "c7gn.large" | "c7gn.xlarge" | "c7gn.2xlarge" | "c7gn.4xlarge" | "c7gn.8xlarge" | "c7gn.12xlarge" | "c7gn.16xlarge" | "p5.48xlarge" | "m7i.large" | "m7i.xlarge" | "m7i.2xlarge" | "m7i.4xlarge" | "m7i.8xlarge" | "m7i.12xlarge" | "m7i.16xlarge" | "m7i.24xlarge" | "m7i.48xlarge" | "m7i-flex.large" | "m7i-flex.xlarge" | "m7i-flex.2xlarge" | "m7i-flex.4xlarge" | "m7i-flex.8xlarge" | "m7a.medium" | "m7a.large" | "m7a.xlarge" | "m7a.2xlarge" | "m7a.4xlarge" | "m7a.8xlarge" | "m7a.12xlarge" | "m7a.16xlarge" | "m7a.24xlarge" | "m7a.32xlarge" | "m7a.48xlarge" | "m7a.metal-48xl" | "hpc7a.12xlarge" | "hpc7a.24xlarge" | "hpc7a.48xlarge" | "hpc7a.96xlarge" | "c7gd.medium" | "c7gd.large" | "c7gd.xlarge" | "c7gd.2xlarge" | "c7gd.4xlarge" | "c7gd.8xlarge" | "c7gd.12xlarge" | "c7gd.16xlarge" | "m7gd.medium" | "m7gd.large" | "m7gd.xlarge" | "m7gd.2xlarge" | "m7gd.4xlarge" | "m7gd.8xlarge" | "m7gd.12xlarge" | "m7gd.16xlarge" | "r7gd.medium" | "r7gd.large" | "r7gd.xlarge" | "r7gd.2xlarge" | "r7gd.4xlarge" | "r7gd.8xlarge" | "r7gd.12xlarge" | "r7gd.16xlarge" | "r7a.medium" | "r7a.large" | "r7a.xlarge" | "r7a.2xlarge" | "r7a.4xlarge" | "r7a.8xlarge" | "r7a.12xlarge" | "r7a.16xlarge" | "r7a.24xlarge" | "r7a.32xlarge" | "r7a.48xlarge" | "c7i.large" | "c7i.xlarge" | "c7i.2xlarge" | "c7i.4xlarge" | "c7i.8xlarge" | "c7i.12xlarge" | "c7i.16xlarge" | "c7i.24xlarge" | "c7i.48xlarge" | "mac2-m2pro.metal" | "r7iz.large" | "r7iz.xlarge" | "r7iz.2xlarge" | "r7iz.4xlarge" | "r7iz.8xlarge" | "r7iz.12xlarge" | "r7iz.16xlarge" | "r7iz.32xlarge" | "c7a.medium" | "c7a.large" | "c7a.xlarge" | "c7a.2xlarge" | "c7a.4xlarge" | "c7a.8xlarge" | "c7a.12xlarge" | "c7a.16xlarge" | "c7a.24xlarge" | "c7a.32xlarge" | "c7a.48xlarge" | "c7a.metal-48xl" | "r7a.metal-48xl" | "r7i.large" | "r7i.xlarge" | "r7i.2xlarge" | "r7i.4xlarge" | "r7i.8xlarge" | "r7i.12xlarge" | "r7i.16xlarge" | "r7i.24xlarge" | "r7i.48xlarge" | "dl2q.24xlarge" | "mac2-m2.metal" | "i4i.12xlarge" | "i4i.24xlarge" | "c7i.metal-24xl" | "c7i.metal-48xl" | "m7i.metal-24xl" | "m7i.metal-48xl" | "r7i.metal-24xl" | "r7i.metal-48xl" | "r7iz.metal-16xl" | "r7iz.metal-32xl" | "c7gd.metal" | "m7gd.metal" | "r7gd.metal" | "g6.xlarge" | "g6.2xlarge" | "g6.4xlarge" | "g6.8xlarge" | "g6.12xlarge" | "g6.16xlarge" | "g6.24xlarge" | "g6.48xlarge" | "gr6.4xlarge" | "gr6.8xlarge" | "c7i-flex.large" | "c7i-flex.xlarge" | "c7i-flex.2xlarge" | "c7i-flex.4xlarge" | "c7i-flex.8xlarge" | "u7i-12tb.224xlarge" | "u7in-16tb.224xlarge" | "u7in-24tb.224xlarge" | "u7in-32tb.224xlarge" | "u7ib-12tb.224xlarge" | "c7gn.metal" | "r8g.medium" | "r8g.large" | "r8g.xlarge" | "r8g.2xlarge" | "r8g.4xlarge" | "r8g.8xlarge" | "r8g.12xlarge" | "r8g.16xlarge" | "r8g.24xlarge" | "r8g.48xlarge" | "r8g.metal-24xl" | "r8g.metal-48xl" | "mac2-m1ultra.metal" | "g6e.xlarge" | "g6e.2xlarge" | "g6e.4xlarge" | "g6e.8xlarge" | "g6e.12xlarge" | "g6e.16xlarge" | "g6e.24xlarge" | "g6e.48xlarge" | "c8g.medium" | "c8g.large" | "c8g.xlarge" | "c8g.2xlarge" | "c8g.4xlarge" | "c8g.8xlarge" | "c8g.12xlarge" | "c8g.16xlarge" | "c8g.24xlarge" | "c8g.48xlarge" | "c8g.metal-24xl" | "c8g.metal-48xl" | "m8g.medium" | "m8g.large" | "m8g.xlarge" | "m8g.2xlarge" | "m8g.4xlarge" | "m8g.8xlarge" | "m8g.12xlarge" | "m8g.16xlarge" | "m8g.24xlarge" | "m8g.48xlarge" | "m8g.metal-24xl" | "m8g.metal-48xl" | "x8g.medium" | "x8g.large" | "x8g.xlarge" | "x8g.2xlarge" | "x8g.4xlarge" | "x8g.8xlarge" | "x8g.12xlarge" | "x8g.16xlarge" | "x8g.24xlarge" | "x8g.48xlarge" | "x8g.metal-24xl" | "x8g.metal-48xl" | "i7ie.large" | "i7ie.xlarge" | "i7ie.2xlarge" | "i7ie.3xlarge" | "i7ie.6xlarge" | "i7ie.12xlarge" | "i7ie.18xlarge" | "i7ie.24xlarge" | "i7ie.48xlarge" | "i8g.large" | "i8g.xlarge" | "i8g.2xlarge" | "i8g.4xlarge" | "i8g.8xlarge" | "i8g.12xlarge" | "i8g.16xlarge" | "i8g.24xlarge" | "i8g.metal-24xl" | "u7i-6tb.112xlarge" | "u7i-8tb.112xlarge" | "u7inh-32tb.480xlarge" | "p5e.48xlarge" | "p5en.48xlarge" | "f2.12xlarge" | "f2.48xlarge" | "trn2.48xlarge" | "c7i-flex.12xlarge" | "c7i-flex.16xlarge" | "m7i-flex.12xlarge" | "m7i-flex.16xlarge" | "i7ie.metal-24xl" | "i7ie.metal-48xl" | "i8g.48xlarge" | "c8gd.medium" | "c8gd.large" | "c8gd.xlarge" | "c8gd.2xlarge" | "c8gd.4xlarge" | "c8gd.8xlarge" | "c8gd.12xlarge" | "c8gd.16xlarge" | "c8gd.24xlarge" | "c8gd.48xlarge" | "c8gd.metal-24xl" | "c8gd.metal-48xl" | "i7i.large" | "i7i.xlarge" | "i7i.2xlarge" | "i7i.4xlarge" | "i7i.8xlarge" | "i7i.12xlarge" | "i7i.16xlarge" | "i7i.24xlarge" | "i7i.48xlarge" | "i7i.metal-24xl" | "i7i.metal-48xl" | "p6-b200.48xlarge" | "m8gd.medium" | "m8gd.large" | "m8gd.xlarge" | "m8gd.2xlarge" | "m8gd.4xlarge" | "m8gd.8xlarge" | "m8gd.12xlarge" | "m8gd.16xlarge" | "m8gd.24xlarge" | "m8gd.48xlarge" | "m8gd.metal-24xl" | "m8gd.metal-48xl" | "r8gd.medium" | "r8gd.large" | "r8gd.xlarge" | "r8gd.2xlarge" | "r8gd.4xlarge" | "r8gd.8xlarge" | "r8gd.12xlarge" | "r8gd.16xlarge" | "r8gd.24xlarge" | "r8gd.48xlarge" | "r8gd.metal-24xl" | "r8gd.metal-48xl" | "c8gn.medium" | "c8gn.large" | "c8gn.xlarge" | "c8gn.2xlarge" | "c8gn.4xlarge" | "c8gn.8xlarge" | "c8gn.12xlarge" | "c8gn.16xlarge" | "c8gn.24xlarge" | "c8gn.48xlarge" | "c8gn.metal-24xl" | "c8gn.metal-48xl" | "f2.6xlarge" | "p6e-gb200.36xlarge" | "g6f.large" | "g6f.xlarge" | "g6f.2xlarge" | "g6f.4xlarge" | "gr6f.4xlarge" | "p5.4xlarge" | "r8i.large" | "r8i.xlarge" | "r8i.2xlarge" | "r8i.4xlarge" | "r8i.8xlarge" | "r8i.12xlarge" | "r8i.16xlarge" | "r8i.24xlarge" | "r8i.32xlarge" | "r8i.48xlarge" | "r8i.96xlarge" | "r8i.metal-48xl" | "r8i.metal-96xl" | "r8i-flex.large" | "r8i-flex.xlarge" | "r8i-flex.2xlarge" | "r8i-flex.4xlarge" | "r8i-flex.8xlarge" | "r8i-flex.12xlarge" | "r8i-flex.16xlarge" | "m8i.large" | "m8i.xlarge" | "m8i.2xlarge" | "m8i.4xlarge" | "m8i.8xlarge" | "m8i.12xlarge" | "m8i.16xlarge" | "m8i.24xlarge" | "m8i.32xlarge" | "m8i.48xlarge" | "m8i.96xlarge" | "m8i.metal-48xl" | "m8i.metal-96xl" | "m8i-flex.large" | "m8i-flex.xlarge" | "m8i-flex.2xlarge" | "m8i-flex.4xlarge" | "m8i-flex.8xlarge" | "m8i-flex.12xlarge" | "m8i-flex.16xlarge" | "i8ge.large" | "i8ge.xlarge" | "i8ge.2xlarge" | "i8ge.3xlarge" | "i8ge.6xlarge" | "i8ge.12xlarge" | "i8ge.18xlarge" | "i8ge.24xlarge" | "i8ge.48xlarge" | "i8ge.metal-24xl" | "i8ge.metal-48xl" | "mac-m4.metal" | "mac-m4pro.metal" | "r8gn.medium" | "r8gn.large" | "r8gn.xlarge" | "r8gn.2xlarge" | "r8gn.4xlarge" | "r8gn.8xlarge" | "r8gn.12xlarge" | "r8gn.16xlarge" | "r8gn.24xlarge" | "r8gn.48xlarge" | "r8gn.metal-24xl" | "r8gn.metal-48xl" | "c8i.large" | "c8i.xlarge" | "c8i.2xlarge" | "c8i.4xlarge" | "c8i.8xlarge" | "c8i.12xlarge" | "c8i.16xlarge" | "c8i.24xlarge" | "c8i.32xlarge" | "c8i.48xlarge" | "c8i.96xlarge" | "c8i.metal-48xl" | "c8i.metal-96xl" | "c8i-flex.large" | "c8i-flex.xlarge" | "c8i-flex.2xlarge" | "c8i-flex.4xlarge" | "c8i-flex.8xlarge" | "c8i-flex.12xlarge" | "c8i-flex.16xlarge" | "r8gb.medium" | "r8gb.large" | "r8gb.xlarge" | "r8gb.2xlarge" | "r8gb.4xlarge" | "r8gb.8xlarge" | "r8gb.12xlarge" | "r8gb.16xlarge" | "r8gb.24xlarge" | "r8gb.metal-24xl" | "m8a.medium" | "m8a.large" | "m8a.xlarge" | "m8a.2xlarge" | "m8a.4xlarge" | "m8a.8xlarge" | "m8a.12xlarge" | "m8a.16xlarge" | "m8a.24xlarge" | "m8a.48xlarge" | "m8a.metal-24xl" | "m8a.metal-48xl" | "trn2.3xlarge" | "r8a.medium" | "r8a.large" | "r8a.xlarge" | "r8a.2xlarge" | "r8a.4xlarge" | "r8a.8xlarge" | "r8a.12xlarge" | "r8a.16xlarge" | "r8a.24xlarge" | "r8a.48xlarge" | "r8a.metal-24xl" | "r8a.metal-48xl" | "p6-b300.48xlarge" | "c8a.medium" | "c8a.large" | "c8a.xlarge" | "c8a.2xlarge" | "c8a.4xlarge" | "c8a.8xlarge" | "c8a.12xlarge" | "c8a.16xlarge" | "c8a.24xlarge" | "c8a.48xlarge" | "c8a.metal-24xl" | "c8a.metal-48xl" | "c8gb.12xlarge" | "c8gb.16xlarge" | "c8gb.24xlarge" | "c8gb.2xlarge" | "c8gb.4xlarge" | "c8gb.8xlarge" | "c8gb.large" | "c8gb.medium" | "c8gb.metal-24xl" | "c8gb.xlarge" | "c8gb.48xlarge" | "c8gb.metal-48xl" | "m8gb.12xlarge" | "m8gb.16xlarge" | "m8gb.24xlarge" | "m8gb.2xlarge" | "m8gb.4xlarge" | "m8gb.8xlarge" | "m8gb.large" | "m8gb.medium" | "m8gb.xlarge" | "m8gb.48xlarge" | "m8gb.metal-24xl" | "m8gb.metal-48xl" | "m8gn.12xlarge" | "m8gn.16xlarge" | "m8gn.24xlarge" | "m8gn.2xlarge" | "m8gn.48xlarge" | "m8gn.4xlarge" | "m8gn.8xlarge" | "m8gn.large" | "m8gn.medium" | "m8gn.xlarge" | "m8gn.metal-24xl" | "m8gn.metal-48xl" | "x8aedz.12xlarge" | "x8aedz.24xlarge" | "x8aedz.3xlarge" | "x8aedz.6xlarge" | "x8aedz.large" | "x8aedz.metal-12xl" | "x8aedz.metal-24xl" | "x8aedz.xlarge" | "m8azn.medium" | "m8azn.large" | "m8azn.xlarge" | "m8azn.3xlarge" | "m8azn.6xlarge" | "m8azn.12xlarge" | "m8azn.24xlarge" | "m8azn.metal-12xl" | "m8azn.metal-24xl" | "x8i.large" | "x8i.xlarge" | "x8i.2xlarge" | "x8i.4xlarge" | "x8i.8xlarge" | "x8i.12xlarge" | "x8i.16xlarge" | "x8i.24xlarge" | "x8i.32xlarge" | "x8i.48xlarge" | "x8i.64xlarge" | "x8i.96xlarge" | "x8i.metal-48xl" | "x8i.metal-96xl" | "mac-m4max.metal" | "g7e.2xlarge" | "g7e.4xlarge" | "g7e.8xlarge" | "g7e.12xlarge" | "g7e.24xlarge" | "g7e.48xlarge" | "r8id.large" | "r8id.xlarge" | "r8id.2xlarge" | "r8id.4xlarge" | "r8id.8xlarge" | "r8id.12xlarge" | "r8id.16xlarge" | "r8id.24xlarge" | "r8id.32xlarge" | "r8id.48xlarge" | "r8id.96xlarge" | "r8id.metal-48xl" | "r8id.metal-96xl" | "c8id.large" | "c8id.xlarge" | "c8id.2xlarge" | "c8id.4xlarge" | "c8id.8xlarge" | "c8id.12xlarge" | "c8id.16xlarge" | "c8id.24xlarge" | "c8id.32xlarge" | "c8id.48xlarge" | "c8id.96xlarge" | "c8id.metal-48xl" | "c8id.metal-96xl" | "m8id.large" | "m8id.xlarge" | "m8id.2xlarge" | "m8id.4xlarge" | "m8id.8xlarge" | "m8id.12xlarge" | "m8id.16xlarge" | "m8id.24xlarge" | "m8id.32xlarge" | "m8id.48xlarge" | "m8id.96xlarge" | "m8id.metal-48xl" | "m8id.metal-96xl" | "hpc8a.96xlarge")

#ipv_6_addressString

The IPv6 address assigned to the instance.

Returns:

  • (String)


121
# File 'sig/instance.rbs', line 121

def ipv_6_address: () -> ::String

#kernel_idString

The kernel associated with this instance, if applicable.

Returns:

  • (String)


175
# File 'sig/instance.rbs', line 175

def kernel_id: () -> ::String

#key_nameString

The name of the key pair, if this instance was launched with an associated key pair.

Returns:

  • (String)


157
# File 'sig/instance.rbs', line 157

def key_name: () -> ::String

#key_pairKeyPairInfo?

Returns:



481
# File 'sig/instance.rbs', line 481

def key_pair: () -> KeyPairInfo?

#launch_timeTime

The time that the instance was last launched. To determine the time that instance was first launched, see the attachment time for the primary network interface.

Returns:

  • (Time)


169
# File 'sig/instance.rbs', line 169

def launch_time: () -> ::Time

#licensesArray<Types::LicenseConfiguration>

The license configurations for the instance.

Returns:



97
# File 'sig/instance.rbs', line 97

def licenses: () -> ::Array[Types::LicenseConfiguration]

#loadself Also known as: reload

Loads, or reloads #data for the current Aws::EC2::Instance. Returns self making it possible to chain methods.

instance.reload.data

Returns:

  • (self)


201
# File 'sig/instance.rbs', line 201

def load: () -> self

#maintenance_optionsTypes::InstanceMaintenanceOptions

Provides information on the recovery and maintenance options of your instance.



127
# File 'sig/instance.rbs', line 127

def maintenance_options: () -> Types::InstanceMaintenanceOptions

#metadata_optionsTypes::InstanceMetadataOptionsResponse

The metadata options for the instance.



100
# File 'sig/instance.rbs', line 100

def metadata_options: () -> Types::InstanceMetadataOptionsResponse

#modify_attribute(options = {}) ⇒ EmptyStructure

Examples:

Request syntax with placeholder values


instance.modify_attribute({
  source_dest_check: {
    value: false,
  },
  enclave_options: {
    enabled: false,
  },
  disable_api_stop: {
    value: false,
  },
  dry_run: false,
  attribute: "instanceType", # accepts instanceType, kernel, ramdisk, userData, disableApiTermination, instanceInitiatedShutdownBehavior, rootDeviceName, blockDeviceMapping, productCodes, sourceDestCheck, groupSet, ebsOptimized, sriovNetSupport, enaSupport, enclaveOptions, disableApiStop
  value: "ModifyInstanceAttributeValue",
  block_device_mappings: [
    {
      device_name: "String",
      ebs: {
        volume_id: "VolumeId",
        delete_on_termination: false,
      },
      virtual_name: "String",
      no_device: "String",
    },
  ],
  disable_api_termination: {
    value: false,
  },
  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>
  user_data: {
    value: "data",
  },
  instance_initiated_shutdown_behavior: "value", # value <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
  groups: ["SecurityGroupId"],
  ebs_optimized: {
    value: false,
  },
  sriov_net_support: "value", # value <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
  ena_support: {
    value: false,
  },
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :source_dest_check (Types::AttributeBooleanValue)

    Enable or disable source/destination checks, which ensure that the instance is either the source or the destination of any traffic that it receives. If the value is true, source/destination checks are enabled; otherwise, they are disabled. The default value is true. You must disable source/destination checks if the instance runs services such as network address translation, routing, or firewalls.

  • :enclave_options (Types::EnclaveOptionsRequest)

    Enables or disables the instance for Amazon Web Services Nitro Enclaves. For more information, see the Amazon Web Services Nitro Enclaves User Guide.

  • :disable_api_stop (Types::AttributeBooleanValue)

    Indicates whether an instance is enabled for stop protection. For more information, see Enable stop protection for your instance.

  • :dry_run (Boolean)

    Checks whether you have the required permissions for the operation, 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.

  • :attribute (String)

    The name of the attribute to modify.

    When changing the instance type: If the original instance type is configured for configurable bandwidth, and the desired instance type doesn't support configurable bandwidth, first set the existing bandwidth configuration to default using the ModifyInstanceNetworkPerformanceOptions operation.

    You can modify the following attributes only: disableApiTermination | instanceType | kernel | ramdisk | instanceInitiatedShutdownBehavior | blockDeviceMapping | userData | sourceDestCheck | groupSet | ebsOptimized | sriovNetSupport | enaSupport | nvmeSupport | disableApiStop | enclaveOptions

  • :value (String)

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

  • :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. You can't modify the DeleteOnTermination attribute for volumes that are attached to Amazon Web Services-managed resources.

    To add instance store volumes to an Amazon EBS-backed instance, you must add them when you launch the instance. For more information, see Update the block device mapping when launching an instance in the Amazon EC2 User Guide.

  • :disable_api_termination (Types::AttributeBooleanValue)

    Enable or disable termination protection for the instance. If the value is true, you can't terminate the instance using the Amazon EC2 console, command line interface, or API. You can't enable termination protection for Spot Instances.

  • :instance_type (Types::AttributeValue)

    Changes the instance type to the specified value. For more information, see Instance types in the Amazon EC2 User Guide. 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.

  • :user_data (Types::SecureBlobAttributeValue)

    Changes the instance's user data to the specified value. User data must be base64-encoded. Depending on the tool or SDK that you're using, the base64-encoding might be performed for you. For more information, see Work with instance user data.

  • :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).

  • :groups (Array<String>)

    Replaces the security groups of the instance with the specified security groups. You must specify the ID of at least one security group, even if it's just the default security group for the VPC.

  • :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.

  • :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.

  • :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.

Returns:

  • (EmptyStructure)


345
# File 'sig/instance.rbs', line 345

def modify_attribute: (

#monitor(options = {}) ⇒ Types::MonitorInstancesResult

Examples:

Request syntax with placeholder values


instance.monitor({
  dry_run: false,
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :dry_run (Boolean)

    Checks whether you have the required permissions for the operation, 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:



391
# File 'sig/instance.rbs', line 391

def monitor: (

#monitoringTypes::Monitoring

The monitoring for the instance.

Returns:



184
# File 'sig/instance.rbs', line 184

def monitoring: () -> Types::Monitoring

#network_interfacesNetworkInterface::Collection



484
# File 'sig/instance.rbs', line 484

def network_interfaces: () -> NetworkInterface::Collection

#network_performance_optionsTypes::InstanceNetworkPerformanceOptions

Contains settings for the network performance options for your instance.



133
# File 'sig/instance.rbs', line 133

def network_performance_options: () -> Types::InstanceNetworkPerformanceOptions

#operatorTypes::OperatorResponse

The service provider that manages the instance.



136
# File 'sig/instance.rbs', line 136

def operator: () -> Types::OperatorResponse

#outpost_arnString

The Amazon Resource Name (ARN) of the Outpost.

Returns:

  • (String)


52
# File 'sig/instance.rbs', line 52

def outpost_arn: () -> ::String

#password_data(options = {}) ⇒ Types::GetPasswordDataResult

Examples:

Request syntax with placeholder values


instance.password_data({
  dry_run: false,
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :dry_run (Boolean)

    Checks whether you have the required permissions for the operation, 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:



397
# File 'sig/instance.rbs', line 397

def password_data: (

#placementTypes::Placement

The location where the instance launched, if applicable.

Returns:



172
# File 'sig/instance.rbs', line 172

def placement: () -> Types::Placement

#placement_groupPlacementGroup?

Returns:



487
# File 'sig/instance.rbs', line 487

def placement_group: () -> PlacementGroup?

#platformString

The platform. This value is windows for Windows instances; otherwise, it is empty.

Returns:

  • (String)


181
# File 'sig/instance.rbs', line 181

def platform: () -> ("Windows")

#platform_detailsString

The platform details value for the instance. For more information, see AMI billing information fields in the Amazon EC2 User Guide.

Returns:

  • (String)


109
# File 'sig/instance.rbs', line 109

def platform_details: () -> ::String

#private_dns_nameString

[IPv4 only] The private DNS hostname name assigned to the instance. This DNS hostname can only be used inside the Amazon EC2 network. This name is not available until the instance enters the running state.

The Amazon-provided DNS server resolves Amazon-provided private DNS hostnames if you've enabled DNS resolution and DNS hostnames in your VPC. If you are not using the Amazon-provided DNS server in your VPC, your custom domain name servers must resolve the hostname as appropriate.

Returns:

  • (String)


148
# File 'sig/instance.rbs', line 148

def private_dns_name: () -> ::String

#private_dns_name_optionsTypes::PrivateDnsNameOptionsResponse

The options for the instance hostname.



118
# File 'sig/instance.rbs', line 118

def private_dns_name_options: () -> Types::PrivateDnsNameOptionsResponse

#private_ip_addressString

The private IPv4 address assigned to the instance.

Returns:

  • (String)


193
# File 'sig/instance.rbs', line 193

def private_ip_address: () -> ::String

#product_codesArray<Types::ProductCode>

The product codes attached to this instance, if applicable.

Returns:



163
# File 'sig/instance.rbs', line 163

def product_codes: () -> ::Array[Types::ProductCode]

#public_dns_nameString

The public DNS name assigned to the instance. This name is not available until the instance enters the running state. This name is only available if you've enabled DNS hostnames for your VPC. The format of this name depends on the public hostname type.

Returns:

  • (String)


151
# File 'sig/instance.rbs', line 151

def public_dns_name: () -> ::String

#public_ip_addressString

The public IPv4 address, or the Carrier IP address assigned to the instance, if applicable.

A Carrier IP address only applies to an instance launched in a subnet associated with a Wavelength Zone.

Returns:

  • (String)


196
# File 'sig/instance.rbs', line 196

def public_ip_address: () -> ::String

#ramdisk_idString

The RAM disk associated with this instance, if applicable.

Returns:

  • (String)


178
# File 'sig/instance.rbs', line 178

def ramdisk_id: () -> ::String

#reboot(options = {}) ⇒ EmptyStructure

Examples:

Request syntax with placeholder values


instance.reboot({
  dry_run: false,
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :dry_run (Boolean)

    Checks whether you have the required permissions for the operation, 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:

  • (EmptyStructure)


403
# File 'sig/instance.rbs', line 403

def reboot: (

#report_status(options = {}) ⇒ EmptyStructure

Examples:

Request syntax with placeholder values


instance.report_status({
  dry_run: false,
  status: "ok", # required, accepts ok, impaired
  start_time: Time.now,
  end_time: Time.now,
  reason_codes: ["instance-stuck-in-state"], # required, accepts instance-stuck-in-state, unresponsive, not-accepting-credentials, password-not-available, performance-network, performance-instance-store, performance-ebs-volume, performance-other, other
  description: "ReportInstanceStatusRequestDescription",
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :dry_run (Boolean)

    Checks whether you have the required permissions for the operation, 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.

  • :status (required, String)

    The status of all instances listed.

  • :start_time (Time, DateTime, Date, Integer, String)

    The time at which the reported instance health state began.

  • :end_time (Time, DateTime, Date, Integer, String)

    The time at which the reported instance health state ended.

  • :reason_codes (required, Array<String>)

    The reason codes that describe the health state of your instance.

    • instance-stuck-in-state: My instance is stuck in a state.

    • unresponsive: My instance is unresponsive.

    • not-accepting-credentials: My instance is not accepting my credentials.

    • password-not-available: A password is not available for my instance.

    • performance-network: My instance is experiencing performance problems that I believe are network related.

    • performance-instance-store: My instance is experiencing performance problems that I believe are related to the instance stores.

    • performance-ebs-volume: My instance is experiencing performance problems that I believe are related to an EBS volume.

    • performance-other: My instance is experiencing performance problems.

    • other: [explain using the description parameter]

  • :description (String)

    Descriptive text about the health state of your instance.

Returns:

  • (EmptyStructure)


409
# File 'sig/instance.rbs', line 409

def report_status: (

#reset_attribute(options = {}) ⇒ EmptyStructure

Examples:

Request syntax with placeholder values


instance.reset_attribute({
  dry_run: false,
  attribute: "instanceType", # required, accepts instanceType, kernel, ramdisk, userData, disableApiTermination, instanceInitiatedShutdownBehavior, rootDeviceName, blockDeviceMapping, productCodes, sourceDestCheck, groupSet, ebsOptimized, sriovNetSupport, enaSupport, enclaveOptions, disableApiStop
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :dry_run (Boolean)

    Checks whether you have the required permissions for the operation, 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.

  • :attribute (required, String)

    The attribute to reset.

    You can only reset the following attributes: kernel | ramdisk | sourceDestCheck.

Returns:

  • (EmptyStructure)


420
# File 'sig/instance.rbs', line 420

def reset_attribute: (

#reset_kernel(options = {}) ⇒ EmptyStructure

Examples:

Request syntax with placeholder values


instance.reset_kernel({
  dry_run: false,
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :dry_run (Boolean)

    Checks whether you have the required permissions for the operation, 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:

  • (EmptyStructure)


427
# File 'sig/instance.rbs', line 427

def reset_kernel: (

#reset_ramdisk(options = {}) ⇒ EmptyStructure

Examples:

Request syntax with placeholder values


instance.reset_ramdisk({
  dry_run: false,
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :dry_run (Boolean)

    Checks whether you have the required permissions for the operation, 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:

  • (EmptyStructure)


433
# File 'sig/instance.rbs', line 433

def reset_ramdisk: (

#reset_source_dest_check(options = {}) ⇒ EmptyStructure

Examples:

Request syntax with placeholder values


instance.reset_source_dest_check({
  dry_run: false,
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :dry_run (Boolean)

    Checks whether you have the required permissions for the operation, 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:

  • (EmptyStructure)


439
# File 'sig/instance.rbs', line 439

def reset_source_dest_check: (

#root_device_nameString

The device name of the root device volume (for example, /dev/sda1).

Returns:

  • (String)


55
# File 'sig/instance.rbs', line 55

def root_device_name: () -> ::String

#root_device_typeString

The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume.

Returns:

  • (String)


58
# File 'sig/instance.rbs', line 58

def root_device_type: () -> ("ebs" | "instance-store")

#secondary_interfacesArray<Types::InstanceSecondaryInterface>

The secondary interfaces for the instance.



139
# File 'sig/instance.rbs', line 139

def secondary_interfaces: () -> ::Array[Types::InstanceSecondaryInterface]

#security_groupsArray<Types::GroupIdentifier>

The security groups for the instance.

Returns:



61
# File 'sig/instance.rbs', line 61

def security_groups: () -> ::Array[Types::GroupIdentifier]

#source_dest_checkBoolean

Indicates whether source/destination checking is enabled.

Returns:

  • (Boolean)


64
# File 'sig/instance.rbs', line 64

def source_dest_check: () -> bool

#spot_instance_request_idString

If the request is a Spot Instance request, the ID of the request.

Returns:

  • (String)


67
# File 'sig/instance.rbs', line 67

def spot_instance_request_id: () -> ::String

#sriov_net_supportString

Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.

Returns:

  • (String)


70
# File 'sig/instance.rbs', line 70

def sriov_net_support: () -> ::String

#start(options = {}) ⇒ Types::StartInstancesResult

Examples:

Request syntax with placeholder values


instance.start({
  additional_info: "String",
  dry_run: false,
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :additional_info (String)

    Reserved.

  • :dry_run (Boolean)

    Checks whether you have the required permissions for the operation, 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:



445
# File 'sig/instance.rbs', line 445

def start: (

#stateTypes::InstanceState

The current state of the instance.



145
# File 'sig/instance.rbs', line 145

def state: () -> Types::InstanceState

#state_reasonTypes::StateReason

The reason for the most recent state transition.

Returns:



73
# File 'sig/instance.rbs', line 73

def state_reason: () -> Types::StateReason

#state_transition_reasonString

The reason for the most recent state transition. This might be an empty string.

Returns:

  • (String)


154
# File 'sig/instance.rbs', line 154

def state_transition_reason: () -> ::String

#stop(options = {}) ⇒ Types::StopInstancesResult

Examples:

Request syntax with placeholder values


instance.stop({
  hibernate: false,
  skip_os_shutdown: false,
  dry_run: false,
  force: false,
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :hibernate (Boolean)

    Hibernates the instance if the instance was enabled for hibernation at launch. If the instance cannot hibernate successfully, a normal shutdown occurs. For more information, see Hibernate your Amazon EC2 instance in the Amazon EC2 User Guide.

    Default: false

  • :skip_os_shutdown (Boolean)

    Specifies whether to bypass the graceful OS shutdown process when the instance is stopped.

    Bypassing the graceful OS shutdown might result in data loss or corruption (for example, memory contents not flushed to disk or loss of in-flight IOs) or skipped shutdown scripts.

    Default: false

  • :dry_run (Boolean)

    Checks whether you have the required permissions for the operation, 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.

  • :force (Boolean)

    Forces the instance to stop. The instance will first attempt a graceful shutdown, which includes flushing file system caches and metadata. If the graceful shutdown fails to complete within the timeout period, the instance shuts down forcibly without flushing the file system caches and metadata.

    After using this option, you must perform file system check and repair procedures. This option is not recommended for Windows instances. For more information, see Troubleshoot Amazon EC2 instance stop issues in the Amazon EC2 User Guide.

    Default: false

Returns:



452
# File 'sig/instance.rbs', line 452

def stop: (

#subnetSubnet?

Returns:



490
# File 'sig/instance.rbs', line 490

def subnet: () -> Subnet?

#subnet_idString

The ID of the subnet in which the instance is running.

Returns:

  • (String)


187
# File 'sig/instance.rbs', line 187

def subnet_id: () -> ::String

#tagsArray<Types::Tag>

Any tags assigned to the instance.

Returns:



76
# File 'sig/instance.rbs', line 76

def tags: () -> ::Array[Types::Tag]

#terminate(options = {}) ⇒ Types::TerminateInstancesResult

Examples:

Request syntax with placeholder values


instance.terminate({
  force: false,
  skip_os_shutdown: false,
  dry_run: false,
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :force (Boolean)

    Forces the instances to terminate. The instance will first attempt a graceful shutdown, which includes flushing file system caches and metadata. If the graceful shutdown fails to complete within the timeout period, the instance shuts down forcibly without flushing the file system caches and metadata.

  • :skip_os_shutdown (Boolean)

    Specifies whether to bypass the graceful OS shutdown process when the instance is terminated.

    Default: false

  • :dry_run (Boolean)

    Checks whether you have the required permissions for the operation, 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:



461
# File 'sig/instance.rbs', line 461

def terminate: (

#tpm_supportString

If the instance is configured for NitroTPM support, the value is v2.0. For more information, see NitroTPM in the Amazon EC2 User Guide.

Returns:

  • (String)


124
# File 'sig/instance.rbs', line 124

def tpm_support: () -> ::String

#unmonitor(options = {}) ⇒ Types::UnmonitorInstancesResult

Examples:

Request syntax with placeholder values


instance.unmonitor({
  dry_run: false,
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :dry_run (Boolean)

    Checks whether you have the required permissions for the operation, 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:



469
# File 'sig/instance.rbs', line 469

def unmonitor: (

#usage_operationString

The usage operation value for the instance. For more information, see AMI billing information fields in the Amazon EC2 User Guide.

Returns:

  • (String)


112
# File 'sig/instance.rbs', line 112

def usage_operation: () -> ::String

#usage_operation_update_timeTime

The time that the usage operation was last updated.

Returns:

  • (Time)


115
# File 'sig/instance.rbs', line 115

def usage_operation_update_time: () -> ::Time

#virtualization_typeString

The virtualization type of the instance.

Returns:

  • (String)


79
# File 'sig/instance.rbs', line 79

def virtualization_type: () -> ("hvm" | "paravirtual")

#volumes(options = {}) ⇒ Volume::Collection

Examples:

Request syntax with placeholder values


volumes = instance.volumes({
  volume_ids: ["VolumeId"],
  include_managed_resources: false,
  dry_run: false,
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :volume_ids (Array<String>)

    The volume IDs. If not specified, then all volumes are included in the response.

  • :include_managed_resources (Boolean)

    Indicates whether to include managed resources in the output. If this parameter is set to true, the output includes resources that are managed by Amazon Web Services services, even if managed resource visibility is set to hidden.

  • :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.

  • :filters (Array<Types::Filter>)

    The filters.

    • attachment.attach-time - The time stamp when the attachment initiated.

    • attachment.delete-on-termination - Whether the volume is deleted on instance termination.

    • attachment.device - The device name specified in the block device mapping (for example, /dev/sda1).

    • attachment.instance-id - The ID of the instance the volume is attached to.

    • attachment.status - The attachment state (attaching | attached | detaching).

    • availability-zone - The Availability Zone in which the volume was created.

    • availability-zone-id - The ID of the Availability Zone in which the volume was created.

    • create-time - The time stamp when the volume was created.

    • encrypted - Indicates whether the volume is encrypted (true | false)

    • fast-restored - Indicates whether the volume was created from a snapshot that is enabled for fast snapshot restore (true | false).

    • multi-attach-enabled - Indicates whether the volume is enabled for Multi-Attach (true | false)

    • operator.managed - A Boolean that indicates whether this is a managed volume.

    • operator.principal - The principal that manages the volume. Only valid for managed volumes, where managed is true.

    • size - The size of the volume, in GiB.

    • snapshot-id - The snapshot from which the volume was created.

    • status - The state of the volume (creating | available | in-use | deleting | deleted | error).

    • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

    • volume-id - The volume ID.

    • volume-type - The Amazon EBS volume type (gp2 | gp3 | io1 | io2 | st1 | sc1| standard)

Returns:



493
# File 'sig/instance.rbs', line 493

def volumes: (

#vpcVpc?

Returns:



507
# File 'sig/instance.rbs', line 507

def vpc: () -> Vpc?

#vpc_addresses(options = {}) ⇒ VpcAddress::Collection

Examples:

Request syntax with placeholder values


vpc_addresses = instance.vpc_addresses({
  public_ips: ["String"],
  dry_run: false,
  filters: [
    {
      name: "String",
      values: ["String"],
    },
  ],
  allocation_ids: ["AllocationId"],
})

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :public_ips (Array<String>)

    One or more Elastic IP addresses.

    Default: Describes all your Elastic IP addresses.

  • :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.

  • :filters (Array<Types::Filter>)

    One or more filters. Filter names and values are case-sensitive.

    • allocation-id - The allocation ID for the address.

    • association-id - The association ID for the address.

    • instance-id - The ID of the instance the address is associated with, if any.

    • network-border-group - A unique set of Availability Zones, Local Zones, or Wavelength Zones from where Amazon Web Services advertises IP addresses.

    • network-interface-id - The ID of the network interface that the address is associated with, if any.

    • network-interface-owner-id - The Amazon Web Services account ID of the owner.

    • private-ip-address - The private IP address associated with the Elastic IP address.

    • public-ip - The Elastic IP address, or the carrier IP address.

    • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

  • :allocation_ids (Array<String>)

    Information about the allocation IDs.

Returns:



510
# File 'sig/instance.rbs', line 510

def vpc_addresses: (

#vpc_idString

The ID of the VPC in which the instance is running.

Returns:

  • (String)


190
# File 'sig/instance.rbs', line 190

def vpc_id: () -> ::String

#wait_until(options = {}) {|resource| ... } ⇒ Resource

Deprecated.

Use [Aws::EC2::Client] #wait_until instead

Note:

The waiting operation is performed on a copy. The original resource remains unchanged.

Waiter polls an API operation until a resource enters a desired state.

Basic Usage

Waiter will polls until it is successful, it fails by entering a terminal state, or until a maximum number of attempts are made.

# polls in a loop until condition is true
resource.wait_until(options) {|resource| condition}

Example

instance.wait_until(max_attempts:10, delay:5) do |instance|
  instance.state.name == 'running'
end

Configuration

You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. The waiting condition is set by passing a block to #wait_until:

# poll for ~25 seconds
resource.wait_until(max_attempts:5,delay:5) {|resource|...}

Callbacks

You can be notified before each polling attempt and before each delay. If you throw :success or :failure from these callbacks, it will terminate the waiter.

started_at = Time.now
# poll for 1 hour, instead of a number of attempts
proc = Proc.new do |attempts, response|
  throw :failure if Time.now - started_at > 3600
end

  # disable max attempts
instance.wait_until(before_wait:proc, max_attempts:nil) {...}

Handling Errors

When a waiter is successful, it returns the Resource. When a waiter fails, it raises an error.

begin
  resource.wait_until(...)
rescue Aws::Waiters::Errors::WaiterFailed
  # resource did not enter the desired state in time
end

attempts attempt in seconds invoked before each attempt invoked before each wait

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :max_attempts (Integer) — default: 10

    Maximum number of

  • :delay (Integer) — default: 10

    Delay between each

  • :before_attempt (Proc) — default: nil

    Callback

  • :before_wait (Proc) — default: nil

    Callback

Yield Parameters:

  • resource (Resource)

    to be used in the waiting condition.

Returns:

  • (Resource)

    if the waiter was successful

Raises:

  • (Aws::Waiters::Errors::FailureStateError)

    Raised when the waiter terminates because the waiter has entered a state that it will not transition out of, preventing success.

    yet successful.

  • (Aws::Waiters::Errors::UnexpectedError)

    Raised when an error is encountered while polling for a resource that is not expected.

  • (NotImplementedError)

    Raised when the resource does not



689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
# File 'lib/aws-sdk-ec2/instance.rb', line 689

def wait_until(options = {}, &block)
  self_copy = self.dup
  attempts = 0
  options[:max_attempts] = 10 unless options.key?(:max_attempts)
  options[:delay] ||= 10
  options[:poller] = Proc.new do
    attempts += 1
    if block.call(self_copy)
      [:success, self_copy]
    else
      self_copy.reload unless attempts == options[:max_attempts]
      :retry
    end
  end
  Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
    Aws::Waiters::Waiter.new(options).wait({})
  end
end

#wait_until_exists(options = {}, &block) ⇒ Instance

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :max_attempts (Integer) — default: 40
  • :delay (Float) — default: 5
  • :before_attempt (Proc)
  • :before_wait (Proc)

Returns:



215
216
# File 'sig/instance.rbs', line 215

def wait_until_exists: (?max_attempts: Integer, ?delay: Numeric, ?before_attempt: (^(Integer attempts) -> void), ?before_wait: (^(Integer attempts, untyped response) -> void)) ?{ (untyped waiter) -> void } -> Instance
| (?Hash[Symbol, untyped]) ?{ (untyped waiter) -> void } -> Instance

#wait_until_running(options = {}, &block) ⇒ Instance

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :max_attempts (Integer) — default: 40
  • :delay (Float) — default: 15
  • :before_attempt (Proc)
  • :before_wait (Proc)

Returns:



219
220
# File 'sig/instance.rbs', line 219

def wait_until_running: (?max_attempts: Integer, ?delay: Numeric, ?before_attempt: (^(Integer attempts) -> void), ?before_wait: (^(Integer attempts, untyped response) -> void)) ?{ (untyped waiter) -> void } -> Instance
| (?Hash[Symbol, untyped]) ?{ (untyped waiter) -> void } -> Instance

#wait_until_stopped(options = {}, &block) ⇒ Instance

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :max_attempts (Integer) — default: 40
  • :delay (Float) — default: 15
  • :before_attempt (Proc)
  • :before_wait (Proc)

Returns:



223
224
# File 'sig/instance.rbs', line 223

def wait_until_stopped: (?max_attempts: Integer, ?delay: Numeric, ?before_attempt: (^(Integer attempts) -> void), ?before_wait: (^(Integer attempts, untyped response) -> void)) ?{ (untyped waiter) -> void } -> Instance
| (?Hash[Symbol, untyped]) ?{ (untyped waiter) -> void } -> Instance

#wait_until_terminated(options = {}, &block) ⇒ Instance

Parameters:

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :max_attempts (Integer) — default: 40
  • :delay (Float) — default: 15
  • :before_attempt (Proc)
  • :before_wait (Proc)

Returns:



227
228
# File 'sig/instance.rbs', line 227

def wait_until_terminated: (?max_attempts: Integer, ?delay: Numeric, ?before_attempt: (^(Integer attempts) -> void), ?before_wait: (^(Integer attempts, untyped response) -> void)) ?{ (untyped waiter) -> void } -> Instance
| (?Hash[Symbol, untyped]) ?{ (untyped waiter) -> void } -> Instance